EAR projects with defaultLibBundleDir set to "APP-INF/lib" generate wrong
.components descriptor for eclipse
------------------------------------------------------------------------------------------------------------
Key: MECLIPSE-673
URL: http://jira.codehaus.org/browse/MECLIPSE-673
Project: Maven 2.x Eclipse Plugin
Issue Type: Bug
Components: WTP support
Affects Versions: 2.8
Environment: Eclipse 3.5 SR2
WTP 3.1.1 (bundled with Elipse 3.5 SR2)
Reporter: Luca De Petrillo
The eclipse plugin doesn't handle correctly the property defaultLibBundleDir
for ear projects when it's set to a multiple sub-directory path (it work well
if it's set to "lib", but not if it's set to "APP-INF/lib").
Looking at the generated .components file for the ear project, dependencies are
declared in this manner:
{code:xml}
<dependent-module archiveName="../antlr-2.7.6.jar" deploy-path="APP-INF/lib"
handle="module:/classpath/var/M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
{code}
This make eclipse to copy the library in "<ear-root>/APP-INF/lib/APP-INF" due
the well know bug in WTP.
I've tried to edit the .components adding another "../" in the archiveName like
this:
{code:xml}
<dependent-module archiveName="../../antlr-2.7.6.jar" deploy-path="APP-INF/lib"
handle="module:/classpath/var/M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
{code}
and the library has been placed correctly in "<ear-root>/APP-INF/lib".
I've also tried to fully remove the archiveName property as i read somewhere (i
don't remember where i read it) like this:
{code:xml}
<dependent-module deploy-path="APP-INF/lib"
handle="module:/classpath/var/M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
{code}
and also with this declaration, the library has been placed correctly.
So, i think that a fix for this could be to add a "../" for each directory
specified in defaultLibBundleDir, or simply remove the archiveName property
from the descriptor (i don't know if removing the archiveName property works on
all WTP version... but for me it works well with WTP 3.1).
--
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