Skip to main content

EAR file w/ External JAR dependency cannot be deployed from Eclipse

1 reply [Last post]
Joined: 2004-04-07

Eclipse Galileo w/ Glassfish Plugin 1.0.52 (ver? not so easy to find from within eclipse!)

I'm attempting to move a # of jar file dependencies from WEB-INF/lib/* (of multiple WAR files... redundant!) to the containing EAR file's lib. I tried to do so using Eclipse's "Java EE Module Dependencies" dialog via "Add External JARs..."

Using that dialog, I note that when I do not select 'In Lib Dir' for a given external jar file, then the jar is labeled 'myFile.jar' in the 'JAR/Module' column of the dialog. Publish to glassfish... and 'myFile.jar' appears in the root of the exploded EAR file: myEar/myFile.jar. As expected.. but not where I want it.

So, I go back to the dialog, and now I select 'In Lib Dir' for 'myFile.jar', then "OK". Publish to glassfish... and 'myFile.jar' appears in myEar/lib/lib/myFile.jar of the exploded EAR file! Pull up the "Java EE Module Dependencies" dialog, and sure enough, the "label" under the 'JAR/Module' column has been changed to 'lib/myFile.jar', and the 'In Lib Dir' is checked.

And, of course, my jar file can't be seen with, or without, 'In Lib Dir' checked. Works just find for 'project' dependencies BTW.

Apparently eclipse is being too smart for it's own good. Neither is it clear that this is (strictly) a "glassfish" problem, because the same behavior occurs when I export an EAR file from Eclipse directly.

It would seem that the glassfish plugin should be compensating for this behavior? What a pain.. not only can I not use the Glassfish plugin, I don't even have a work around by exporting from eclipse.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-04-07

Still no answer from Eclipse.
Possibly to be resolved by the Helios release.

Message was edited by: rsitze