On Fri, Jan 13, 2012 at 9:22 AM, Paul Rivera <[email protected]> wrote:
> 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?

The first step would be to check JIRA
https://jira.codehaus.org/browse/MECLIPSE to see if it has already
been reported.

Remember, maven-eclipse-plugin is trying to configure your Eclipse
environment for you but not all cases may be catered for.
While running your web project from a server within eclipse is common
enough it might be that not well supported.
I don't know the answer to that, since I don't do web based development.

To help enhance the plugin's support, someone needs to work out what
the "Eclipse Way" is via manually fiddling with things.
And then someone needs to update the plugin to automate this.
Feel free to help out, that's the quickest way to ensure things get fixed.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to