maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wren Weburg (JIRA)" <>
Subject [jira] Commented: (MECLIPSE-586) Using -Declipse.projectNameTemplate is broken on multi module projects
Date Wed, 03 Mar 2010 21:35:56 GMT


Wren Weburg commented on MECLIPSE-586:

I'm also having problems with getting the child projects to reference the correct project
name when the eclipse project files are generated. The unchanged artifactId is referenced,
not the custom artifact id where we like to have groupId and version added. It would be great
if this could be fixed so that my team can set up many branches of the same project in the
same Eclipse workspace without all the hassle of manually fixing the dependencies.

For now our manual fix is to change two things with the sub (child) project's files:

1) In the .project file, update the listed project name from "core" to the proper project,

2) In the .classpath file, make similar change, changing core as per below:
<classpathentry kind="src" path="/com.mycompany.core-1.0"/>

It is hard to write a programmatic fix for this because it would basically have to replicate
everything the eclipse plugin does by reading the POM, and of course it's better to fix it
at the root cause. :-)

> Using -Declipse.projectNameTemplate is broken on multi module projects
> ----------------------------------------------------------------------
>                 Key: MECLIPSE-586
>                 URL:
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project, Core : Dependencies resolution and build path (.classpath),
Core : Multi-projects
>    Affects Versions: 2.6, 2.7
>         Environment: Maven version: 2.0.9
> Java version: 1.6.0_10-rc
> OS name: "linux" version: "2.6.27-14-generic" arch: "amd64" Family: "unix"
>            Reporter: Baard Johansen
> In version 2.5.1 when specifying projectNameTemplate on the commandline, the .project
file and references are generated correcly. In 2.6 and 2.7 the project has the correct name,
but referenced projects is not using the specified pattern. This renderes the .project-file
and .classpath useless.
> Example (using mvn eclipse:eclipse -Declipse.projectNameTemplate=trunk-[artifactId])
where moduleA depends on moduleB:
> moduleA/.project
> <projectDescription>
>   <name>trunk-moduleA</name>
>   <projects>
>     <project>moduleB</project>
>   </projects>
>   [..]
> </projectDescription>
> moduleA/.classpath
> <classpath>
>   [..]
>   <classpathentry kind="src" path="/moduleA"/>
> </classpath>
> moduleB/.project
> <projectDescription>
>   <name>trunk-moduleB</name>
>   [..]
> </projectDescription>

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message