ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <>
Subject Re: newbie
Date Thu, 18 Oct 2001 20:50:35 GMT

Ant works perfectly.  Think about your design more . Newbie. heh

This is my directory structure:

+-  src           my java code
+- class                 my compiled class files
+- dist                    my jar files belong here

>     <jar jarfile="myjar.jar"
>          basedir="./classoutput" excludes="./*"/>

You are excluding everything from being jar'ed.

----- Original Message -----
From: "Winston Finnick" <>
To: <>
Sent: Thursday, October 18, 2001 3:34 PM
Subject: newbie

> 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\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

View raw message