Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
2.8
-
None
-
None
-
Eclipse 3.5 SR2
WTP 3.1.1 (bundled with Elipse 3.5 SR2)
Description
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:
<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>
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:
<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>
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:
<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>
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).