On 31-Mar-09, at 11:40 AM, Tobias Gierke wrote:
Hi,
Hi,
Eclipse can't seem to handle two modules in the same workspace
that have the
same artifactId. For example if I have a multi-module
project (groupId:artifact) as below:
- carworld:carworld
- carworld:ferrari
- carworld.ferrari:car
- carworld:porsche
- carworld.porsche:car
There are two modules that have <artifactId>car</artifactId> (but
different
groupId's). m2Eclipse+Eclipse appears to use the artifactId as the
project
identifier and when the two "car" projects are imported only one
is actually
imported.
Is this a known issue? are there any workarounds?
Give your projects different names.
We're not going to support duplicate artifactIds in the reactor.
You can't have two artifacts with the same coordinate and expect it
to work.
Name your projects properly.
I always thought Maven artifacts are uniquely identified by
{ groupId , artifactId , version } - how come two artifacts with
same artifact IDs but *different* group IDs have "the same
coordinate" ?
The GAV is the coordinate. Beyond that the only rule I generally have
is that an artifact can land in a directory (assembly) which
everything else and not get clobbered, and that you can easily
identify what you are looking at. Having N car-1.0.jar artifacts does
not appear to be something I would want in a system I was trying to
maintain. Be unique at all levels == less aggravating over time.
@op: At work we're using some Perl script magic along with the maven-
eclipse-plugin to automatically generate/update .classpath /.project
files. The plugin has a <addGroupIdToProjectName>/ option
that might solve your problem (haven't tried it myself but I'm
afraid you would have to disable m2eclipse for the project to make
this work). Changing one of the conflicting projects to use a
different artifactId might be way easier (assuming you don't have
released these artifacts to the "public" / clients).
Regards,
Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
http://twitter.com/jvanzyl
----------------------------------------------------------
To do two things at once is to do neither.
-—Publilius Syrus, Roman slave, first century B.C.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]