Re: ant, jar with selected directories
- From: "DaveO." <daveoverbeck@xxxxxxxxx>
- Date: 30 Mar 2006 11:00:42 -0800
Well, I solved it... The key was in this sentence in the Ant docs for
the jar task:
The extended fileset and groupfileset child elements from the zip task
are also available in the jar task.
Which enabled me to do this:
<property name="top.dir" value="/javasrc"/>
<property name="util.dir" value="my/stuff/util"/>
<property name="Proj1.dir" value="other/stuff/Proj1"/>
<property name="jar.file" value="Proj1.jar"/>
<target name="jar">
<jar destfile="${top.dir}/${jar.file}">
<zipfileset dir="${top.dir}/${jws.dir}" prefix="${util.dir}"
includes="*.class"/>
<zipfileset dir="${top.dir}/${jcw.dir}" prefix="${Proj1.dir}"
includes="*.class"/>
</jar>
</target>
The jar task specifies no contents, and each of the zipfileset elements
specifies a directory, and prepends the path when the files are stored.
cheers,
Dave
.
- Follow-Ups:
- Re: ant, jar with selected directories
- From: Roedy Green
- Re: ant, jar with selected directories
- References:
- ant, jar with selected directories
- From: DaveO.
- ant, jar with selected directories
- Prev by Date: Re: A question about a generic method
- Next by Date: Re: File IO -- Reading Config Files Easily
- Previous by thread: ant, jar with selected directories
- Next by thread: Re: ant, jar with selected directories
- Index(es):