In the J2EE 1.3 spec, section 184.108.40.206 explains how to deal with this.
In short we can specify dependencies in manifest files of J2EE modules included an EAR file.
With Ant 1.5, the jar task has a manifest subtask and it my help add the CLASS-Path attribute to a manifest file:
But I don't know whether we could use the manifect subtask in a war task.
If only the EAR format has a lib directory like WAR. ;-)
>But I don't know whether we could use the manifect subtask in a war task.
So we don't have to make manifest files manually for packaging jar files.
Thanks for the reply, it works for me too now.
I am trying to do something similar. I have several jar files - call them B, C, and D, each of which is dependent upon a common jar file, A. I want to be able to deploy B, C, and D without copying A into each one. All of these jar files are deployed to the jboss server\default\deploy directory.
I've implemented the manifest approch mentioned in this thread, and jboss does indeed deploy A when B is deployed. However, it then attempts to deploy A independently, and gets error messages because A has already been deployed.
What is the proper way to build and deploy these jar files without getting these duplicate deployment errors?