I think I may have discovered a potential problem in M2Eclipse, but I want to confirm before I make a bug out of it...

I have a project that has a lot of dependencies. One of those dependencies is both a war and a jar. This is okay...I just have to <dependency> items for it with classifiers. However, during the maven lifecycle, the war gets unpackaged into the target directory somewhere, including the pom.xml. M2Eclipse sees it, as said by this log message:

06/02/07 1:57:48 EST PM: ca.nanometrics:configuration:jar:jar:1.0.1 in Eclipse Workspace C:\work\apollo\core\trunk\target\checkout\target\war\work\configuration-1.0.1\META-INF\maven\ca.nanometrics\configuration\pom.xml

This is not the jar file, just the pom.xml that it found. This has two issues:

1) When the location is in the same project (as in this example), nothing is done. The jar does not get added to the classpath b/c I'm assuming M2Eclipse is just adding the Eclipse Project that it found the pom in to the classpath, but since it is the same project nothing happens. 2) If the location of the pom is in a different project, that other project may be a project that depends on the current one. I have seen this happen too. Then, you get the potential for a circular classpath loop.

My suggestion:
- Make the searching for poms in the eclipse workspace limited to the root directory of the project. I'm assuming that in most cases this is the use case. At very least, this should be an option.
Has anyone else encountered an issue like this before in version 0.0.10?

-Ben

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to