Hello,
Thanks to your previous inputs, I am able to retrieve my jar and war
dependencies into my war project's lib directory. The next step is to
compile my war project's sources with a classpath pointing to these jar
and war dependencies in the project's lib directory. In my <classpath>
element of my ant task, I can find my classes in the jars but not in the
wars. I am looking for a way to poke into a war's WEB-INF/lib directory
to find more jars and to be able to add them to my classpath for the
compilation of my sources.
Is there a way to poke inside a war file to look for the jars inside it
?
Here is the snippet of my javac task.
<target name="compile" depends="retrieve"
description="-> compile the source ">
<javac srcdir="${src}" destdir="${build}" debug="on"
compiler="javac1.4" deprecation="true"
optimize="true">
<classpath>
<!- ${lib} is the lib directory of my war project
which contains the retrieved dependencies -->
<fileset dir="${lib}">
<include name="*.war" /> <!-- how can poke
into this war's /WEB-INF/lib to find the jars I need ? -->
<include name="*.jar" /> <!-- no problem
adding jars directly in my lib directory to the classpath -->
</fileset>
<fileset
dir="C:/Program
Files/IBM/SDP70/runtimes/base_v61/java/jre/lib">
<include name="*.jar" />
</fileset>
<fileset>
</fileset>
</classpath>
</javac>
</target>
I checked the ant-contrib project also to find some way of adding jar
files inside a war file to the classpath but didn't find anything yet.
Would appreciate any pointers you all might have.
Thanks