aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven-ear-plugin doubt" Watch "maven-ear-plugin doubt" New topic
Author

maven-ear-plugin doubt

Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 124
Hi,

I am trying to create a shared library for weblogic. The shared library is an ear with the following struture
abcd.ear
|
~~~a.jar
|
~~~META-INF
| |
| ~~~application.xml
| |
| ~~~MANIFEST.MF
|
~~~APP-INF
| |
| ~~~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
<javaModule>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<bundleFileName>hibernate-3.2.5.ga.jar</bundleFileName>
<bundleDir>APP-INF/lib</bundleDir>
</javaModule>

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.

Regards,
Raj

Strange!

Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 124
Hello,
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.

Regards,
Rajesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maven-ear-plugin doubt
 
Similar Threads
jars in the custom ear not getting referenced at compile time
war with dependencies but different names
Maven 2 EJB 3.0
maven2 expert : explode war which is in a ear and then bundle war then bundle ear
Ear Building in Maven