[ 
http://jira.codehaus.org/browse/MECLIPSE-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124570
 ] 

Jos van der Heiden commented on MECLIPSE-184:
---------------------------------------------

Adding <defaultLibBundleDir>lib</defaultLibBundleDir> might put the jars in 
that folder when packaging an ear with maven.
However, the org.eclipse.wst.common.component file generated by 
maven-eclipse-plugin still uses /WEB-INF/lib as deploy-path for these utility 
jars.

Now when another project (in my case a simple java project with some utility 
classes) needs one of these jars on it's classpath, the wtp wizard 'J2EE 
modules dependencies' in the properties of that project in eclipse allows you 
to add the jars available in the ear to the classpath in the manifest of that 
project.
This wizard doesn't recognize the /WEB-INF/lib deploy-path in the ear settings 
(perhaps a bug in wtp, but still...), so I end up with a 'broken' class path.

And anyway it just doesn't feel right to generate an .ear file with a 
WEB-INF/lib folder in it's root for the utility jars.

So I would agree that writeWarOrEarResources() should be replace with two 
dedicated methods writeWarResources() and writeEarResources() 


> Ear utility-jar are put in WEB-INF/lib of the wtp ear
> -----------------------------------------------------
>
>                 Key: MECLIPSE-184
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-184
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: WTP support
>    Affects Versions: 2.3
>         Environment: Tested on Windows XP and Linux Ubuntu Dapper Drake
>            Reporter: Elid OR
>            Assignee: Arnaud Heritier
>            Priority: Critical
>
> It seems that the maven eclipse plugin add ear jar dependencies in the 
> WEB-INF/lib directory.
> I've used the following command : mvn eclipse:clean 
> eclipse:eclipse -Dwtpversion=1.0 (I've also tried 1.5 with the snapshot 
> version)
> And when deploy the ear project through WTP in a J2EE Server I see the 
> following structure :
> my-ear
>   |---- my-ejb.jar
>   |---- my-webapp.war
>   |---- META-INF/
>                 |---- application.xml
>                 |---- MANIFEST.MF
>   |
>   |----- WEB-INF/
>                 |---- lib
>                         |---- dependency-1.jar
>                         |---- dependency-2.jar
> But I don't expect these dependencies to be here, I expect something like 
> this :
> my-ear
>   |---- my-ejb.jar
>   |---- my-webapp.war
>   |---- META-INF/
>                 |---- application.xml
>                 |---- MANIFEST.MF
>   |
>   |----- dependency-1.jar
>   |----- dependency-2.jar
> So I've checked quickly the SVN repository and it seems that the directory in 
> which we put "ear utility jar" is hard coded as "WEB-INF/lib" (-> 
> AbstractWtpResourceWritter.addDependency() which is the same for the war and 
> the ear ... )
> Are you OK with this packaging ? It can be a good thing if we could configure 
> where wtp will 
> put these ear utility-jars and by default it would be in "/" or "lib".
> Thanks In Advance
> Elid OR 

-- 
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