How to change a project name in intellij

Answered

Hi, I imported a project into intellij and I have a few problems with it handing my maven projects. For example, my test folder was appended to my class path.

test.java.com.m2mi.storage.mongodb...

How do I fix it so it is a proper Maven structure? test->java with the contents com.m2mi.storage.mongodb

0
3 comments

Did you import it as a Maven project from pom.xml? Does pom.xml override the default Maven source/test source roots?

0
Avatar
Permanently deleted user

It was imported as a Maven Project. To be more specific,there is a parent project with a number of child projects. Intellij recursively added the child projects.

I don't think the pom.xml overrides the setting. The only reference I see is the src directory element.

<build>
    <sourceDirectory>src</sourceDirectory>
     <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
            <source>1.8</source>
            <target>1.8</target>
        </configuration>
    </plugin>
  </plugins>
</build>

0

Your pom.xml does override it with the following line:

<sourceDirectory>src</sourceDirectory>

Remove it and reimport the project.

0

Please sign in to leave a comment.