ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <william.lo...@eds.com>
Subject RE: Adding absolute filenames to a jar
Date Wed, 01 Oct 2003 21:33:18 GMT
...not tested but try this

<jar destfile="goo.jar">
  <fileset dir="/home/olhotak" 
           includes="foo.txt"/>
  <fileset dir="/tmp" 
           includes="bar.txt"/>
</jar>

...will these directories be relative to your build file's base directory?
If not just copy the files under the main class source dir ( use the basedir
attribute)...see the Ant Manual jar task doco. 

HTH,
-Will
    

-----Original Message-----
From: Ondrej Lhotak [mailto:olhotak@sable.mcgill.ca] 
Sent: Wednesday, October 01, 2003 10:09 AM
To: user@ant.apache.org
Subject: Adding absolute filenames to a jar


I'm using the <jar> task to create a jar file. The absolute pathnames of the
files to be included in the jar are in separate properties. How can I get
the <jar> task to include them? <fileset> requires a dir and a relative
filename, and I have absolute names.

For example:
<property name="file1" location="/home/olhotak/foo.txt"/>
<property name="file2" location="/tmp/bar.txt"/>
<jar destfile="goo.jar">
    <!-- How to include ${file1} and ${file2} in the jar? --> </jar>

Ondrej

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message