Reputation: 123
Suppose I have a top level maven project with two modules:
moduleA
moduleB
and a groupId of my.group.
running mvn eclipse:eclipse on the parent project should generate eclipse files for all subprojects. The issue with this is that it doesn't include the groupId by default and only uses the artifactId.
So:
mvn eclipse:eclipse -Declipse.projectNameTemplate=[groupId].[artifactId]
This includes the group id in the project name, which is what the default behaviour should have been to begin with. Now the projects are named correctly in the .project files (my.group.moduleA, my.group.moduleB), but the .classpath files are all screwed up because they are still only using the artifactId and trying to reference projects moduleA and moduleB.
Am I missing something here or is this a bug in the maven eclipse plugin? It seems like a name change should propagate to everywhere the name is used. I.e. It should reference the project dependencies correctly and not require a bunch of manual classpath fixes inside eclipse that will get overwritten the next time mvn eclipse:eclipse is run.
The <name> element of the .project file gets set correctly, but it's using the wrong names in both the .classpath file and <projects> section of the .project file.
MVN Version: 3.2.5
Upvotes: 1
Views: 191
Reputation: 11909
The maven-eclipse-plugin is nowadays considered as abandonned. You better have to simply import your raw projects direcly from Eclipse (with m2eclipse installed) as Maven projects. Then the setup should be done properly.
Upvotes: 2