ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhatia Saurabh" <Bha...@OFAC.CH>
Subject poking into a war file
Date Mon, 25 Jun 2007 07:13:59 GMT

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"


                       <!- ${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 -->




                             <include name="*.jar" />









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.





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message