Hi,

I would like to define set of dependent libraries for compile and
reuse the list for creating a war.  I have seen posts recommending the
use of pathtofileset.  It looked good except that the resulting war
contained the relative paths to the dependent libs.

We have a repository of all the thirdparty libs: e.g.
<THIRD_PARTY>/lib/oracle/*.jar
<THIRD_PARTY>/lib/mysql/*.jar
<THIRD_PARTY>/lib/apache.commons/*.jar

For compile, I have set up a path: e.g.
   <path id="pathid.build.classpath">
       <fileset dir="<THIRD_PARTY>/lib/oracle">
           <include name="*.jar" />
       </fileset>
       <fileset dir="<THIRD_PARTY>/lib/apache.commons">
           <include name="*.jar" />
       </fileset>
       ...
   </path>

Then for the war target, I have:
  <pathtofileset name="war.lib.thirdparty"
                              pathrefid="pathid.build.classpath"
                              dir="${THIRDPARTY_HOME}/lib"/>
   <war warfile="mywarfile.war" webxml="${war.webxml}">
       <zipfileset refid="war.lib.thirdparty" prefix="WEB-INF/lib">
       ...
   </war>

This produces war contents as:
   WEB-INF/lib/apache.commons/commons-dbcp-1.2.1.jar
   WEB-INF/lib/apache.commons/commons-pool-1.2.jar
   WEB-INF/lib/apache.commons/commons-validator-1.3.0.jar
   WEB-INF/lib/oracle/classes12.jar

How can I get rid of the "apache.commons" and "oracle" prefixes above?

What is a good way to define dependencies in one place and reuse?

Thanks,
Jennifer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to