The moose likes Ant, Maven and Other Build Tools and the fly likes maven-ear-plugin doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven-ear-plugin doubt" Watch "maven-ear-plugin doubt" New topic

maven-ear-plugin doubt

Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 148

I am trying to create a shared library for weblogic. The shared library is an ear with the following struture
| |
| ~~~application.xml
| |
| |
| ~~~lib
| |
| ~~~~all the jars

abcd.ear has a structure with a.jar, META-INF and APP-INF in the root directory.
META-INF has application.xml and Manifest.MF
APP-INF has a folder lib
lib has all the jars except a.jar.

I have managed to copy the jars in APP-INF\lib. However, not all of them move in. For example, if I have to keep the hibernate jar in APP-INF\lib. It happens, but the hibernate's dependencies move to the root.

The javaModule I have written is

The dependencies of hibernate antlr.jar, asm.jar. cglib.jar et al remain in the root while the parent, the hibernate is at APP-INF\lib.

May I know what I am missing in the configuration.



Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 148
The NO REPLY could mean either no one has faced this problem or the problem is too silly. I have not found the correct solution, but have made a workaround. I have included the implicit dependencies to the <JarModule>, so that can be moved to the APP-INF\lib. The code is similar to the following:

I wish this will help anyone who faces this problem. If you find a better solution, please append this thread.

I agree. Here's the link:
subject: maven-ear-plugin doubt
It's not a secret anymore!