Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven-ear-plugin doubt

 
Rajesh So
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic