[ 
http://jira.codehaus.org/browse/MECLIPSE-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=150960#action_150960
 ] 

Antoni Reus commented on MECLIPSE-360:
--------------------------------------

Same problem here. Is there any workaround for this without manually editing 
generated file  org.eclipse.wst.common.component

> Optional web app dependencies are not treated the same way as maven-ear-plugin
> ------------------------------------------------------------------------------
>
>                 Key: MECLIPSE-360
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-360
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: WTP support
>    Affects Versions: 2.5
>         Environment: eclipse 3.3.0, wtp 2.0.1, jboss 4.2.2
>            Reporter: Keith Naas
>         Attachments: MECLIPSE-360.patch
>
>
> Based on the information in 
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html, 
> we have dependencies declared in our EARs so that all dependencies reside in 
> the ear instead of being isolated (and duplicated) in each of the contained 
> war's "WEB-INF\lib".  This is done by declaring the war dependencies as 
> optional.  Proper manifest entries are added to the war, and the resulting 
> ear contains all of the necessary jars.   
> When running "mvn install" for such an ear project, the resulting ear is 
> created correctly.  
> When running "mvn eclipse:eclipse" for such an ear project, and then using 
> WTP to deploy the artificact to a server (e.g. tomcat or jboss), the 
> generated ear contains a war where all of those war optional dependencies are 
> packaged in the war.  This results in ClassLoader mayhem.  It appears that 
> this is happening because AbstractWtpResourceWriter adds the optional war 
> dependencies with a specific deployPath of "WEB-INF\lib".   To fix this, we 
> would need to either add the "optional" flag to the IDEDependency and then 
> use it withing AbstractWtpResourceWriter.writeWarOrEarResources to only use 
> assign a "WEB-INF\lib" deployDir if the IDEDepedency is not optional.
> I can make those changes and create a patch file so that the 
> maven-eclipse-plugin is made consistent with the maven-ear-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to