Jon,
I noticed for your javac task, you used a patternset directly. In
comparison, I have used the following (which works):
<path id="project.src.path">
<fileset dir="${src.dir}">
<include name="**/*.java"/>
<exclude name="**/*Test.java"/>
</fileset>
</path>
<target name="compile" depends="init">
<javac destdir="${build.dir}"
debug="off"
verbose="false">
<classpath refid="project.class.path"/>
<src>
<path refid="project.src.path">
</src>
</javac>
</target>
T Master
----- Original Message -----
From: "Jon Eaves" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 5:13 PM
Subject: Re: javac and filesets
> Hi all,
>
> This is how I've done it: (actually it's some fragments from
> my build files, so there's bits missing from below)
>
> I hope this helps. I'm happy to share more of how I do this
> with anybody who is interested.
>
> I'd also like to talk to others to find out how they've done
> their build/release/package environments with multiple versions.
>
> I think I've got a rather neat way of doing it (that's probably
> been superceded by Ant1.4 ;-) )
>
> Cheers
> -- jon
>
> common.xml (among other things)
> -----
> <patternset id="tar.extras" >
> <include name="*.xml" />
> <include name="*.html" />
> </patternset>
>
> <patternset id="lw.excludes" >
> <exclude name="**/javax/**" />
> <exclude name="**/jce/**" />
> </patternset>
>
> <patternset id="package.tar" >
> <include name="classes/**" />
> <include name="src/**" />
> <include name="docs/**" />
> </patternset>
> -----
>
> build.xml
> -----
> <!DOCTYPE project [
> <!ENTITY Common SYSTEM "common.xml">
> %Common;
> ]>
>
> <project name="midp" default="init" basedir=".">
>
> <!-- include the common element -->
> &Common;
>
> <path id="compile.cp">
> <pathelement location="${master.classes}" />
> <pathelement location="${midp.classes}" />
> </path>
>
> <target name="lw-compile" depends="init" if="is.lw" >
> <javac srcdir="${master.src}"
> destdir="${master.classes}" >
> <patternset refid="lw.excludes" />
> <classpath refid = "compile.cp" />
> </javac>
> </target>
>
> <target name="lw-release" if="is.lw">
> <mkdir dir="${master.lw-release}" />
> <copy todir="${master.lw-release}" >
> <fileset dir="${master.home}/" >
> <patternset refid="package.tar" />
> <patternset refid="lw.excludes" />
> <patternset refid="tar.extras" />
> </fileset>
> </copy>
>
> <jar jarfile="${master.lw-release}.jar"
> basedir="${master.lw-release}/classes" />
> </target>
>
> <target name="jce-release" if="is.jce">
> <mkdir dir="${master.jce-release}" />
> <copy todir="${master.jce-release}" >
> <fileset dir="${master.home}/" >
> <patternset refid="package.tar" />
> <patternset refid="tar.extras" />
> </fileset>
> </copy>
> </project>
> -------
>
>
> ----- Original Message -----
> From: "T Master" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 22, 2001 3:43 AM
> Subject: Re: javac and filesets
>
>
> > Ooookay.
> >
> > <jar> can accept a nested <fileset> (yet to try this out).
> > <javac> can accept a nested <src> element which is a path like
structure,
> > and hence allows nested <fileset>'s within it.
> > <delete> allows nested <fileset> elements.
> >
> > Would be simple to have a few patternsets for use within a fileset, for
each
> > function and pass this to a common.xml file.
> >
> > Question: How does one pass a fileset or patternset from one file to
> > another? Use of params? Example snippet anyone?
> >
> > My email RFE is thus moot, unless i run into problems.
> >
> > TIA.
> > T Master.
>
> --
> Jon Eaves <[EMAIL PROTECTED]>
> http://www.eaves.org/jon
>
>
>