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
Please sign in to leave a comment.
Did you import it as a Maven project from pom.xml? Does pom.xml override the default Maven source/test source roots?
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>
Your pom.xml does override it with the following line:
Remove it and reimport the project.