ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Winston Finnick <wins...@finnick.com>
Subject newbie
Date Thu, 18 Oct 2001 21:34:33 GMT

Don't ya luv reading that in the subject.  I'm using ant to build a
project and jar the files together.  That works great.  I then need to add
pre-existing .class files to the jar file that was created earlier.  Ant
does not seem to add the .class files that it does not build.  So I
accomplished that with the exec tag.  It adds them just fine however it
adds the full path in the jar file rather than from the build directory.
Here is a bit of my build.xml...

<target name="myjar.jar" depends="compile">
    <jar jarfile="myjar.jar"
         basedir="./classoutput" excludes="./*"/>
    <exec dir="D:\jdk1.3\bin" executable="jar.exe" os="Windows 2000">
		<arg line="uf
\MYCOMP\PIJAVA\CENTER\java\myjar.jar
\MYCOMP\PIJAVA\CENTER\java\com\sun\server\
\MYCOMP\PIJAVA\CENTER\java\org\
\MYCOMP\PIJAVA\CENTER\java\com\sun\xml\
\MYCOMP\PIJAVA\CENTER\java\com\cps\util\
\MYCOMP\PIJAVA\CENTER\java\com\cps\CVE\"/>
    </exec>
</target>


I have to use the \MYCOMP\PIJAV........ path or else it tells me no such
directory.  My question is is there another way to jar (add) pre-existing
.class files that ant does not build but are there with all of the other
.java and .class files and have them retain there build paths? ie
com\cps\CVE\existingclass.class and not
D:\MYCOMP\PIJAVA\CENTER\java\cps\CVE\existingclass.class.  I also
tried the includesfile tag and could not get any .class files to be
included. Thanks for any help.  I apoligize if it's something stupid.

Winston


Mime
View raw message