Hi Guys,

In a nutshell, I'm using maven on a web project which has a dependency on a 
java project.  Both projects are in my eclipse workspace.  By running "mvn 
eclipse:eclipse -Dwtpversion=2.0", maven resolves that the java project 
dependency is in my workspace.  But when I run my web project on a server from 
within eclipse (i.e. the servers tab), it does not load the jar of my java 
project.  I've looked into the folder where my webapp gets deployed 
(blahblahblah\workspace-helios\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\mywebapp\WEB-INF\lib)
 and confirmed that the jar is not there.

I think that the problem is when maven tries to resolve that the java project 
is in my workspace and loads it from there instead of the M2_REPO.  Changing 
the following fixes this:
FROM:
<dependent-module archiveName="opinionwatch-core.jar" 
deploy-path="/WEB-INF/lib" 
handle="module:/resource/opinionwatch-core/opinionwatch-core">
      <dependency-type>uses</dependency-type>
    </dependent-module>

TO:

<dependent-module archiveName="opinionwatch-core-3.0-SNAPSHOT.jar" 
deploy-path="/WEB-INF/lib" 
handle="module:/classpath/var/M2_REPO/nicta/opinionwatch-core/3.0-SNAPSHOT/opinionwatch-core-3.0-SNAPSHOT.jar">
      <dependency-type>uses</dependency-type>
    </dependent-module>

(NOTE: opinionwatch-core is the name of the java project dependency)


This seems to be a clear bug.  I've seen some people post some overcomplicated 
workarounds.  Is there any plan to fix this?


Best Regards,
Paul Rivera

Reply via email to