You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Nau, Michael" <Mi...@pyxis.com> on 2002/12/13 01:26:42 UTC
Filesets within Filesets
Is there a way to make a fileset of filesets?
For example:
<fileset id="foo.jar.classes" dir="${build.out.dir}">
<include name="com/foo/**/*.class"/>
<exclude name="**/test/*"/>
</fileset>
<fileset id="foo.jar" dir="${dev.src.dir}">
<fileset refid="foo.jar.classes" />
<include name="com/foo/xslt/*"/>
<include name="com/foo/*.properties"/>
</fileset>
This seems like a common thing. Here's what I want to do in English:
1. Compile all the .java files in the ${dev.src.dir} to {build.out.dir}
2. Jar the .class files from the ${build.out.dir} and all the xslt and
properties files into a foo.jar.
Thanks,
Mike.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Filesets within Filesets
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Nau, Michael wrote:
> 1. Compile all the .java files in the ${dev.src.dir} to {build.out.dir}
> 2. Jar the .class files from the ${build.out.dir} and all the xslt and
> properties files into a foo.jar.
But wait, I didn't read your use-case before I replied the first time.
You can do this:
<jar ...>
<fileset dir="${build.out.dir}"/>
<fileset dir="${wherever.your.xslt.files.are.etc}"/>
</jar>
Is that sufficient for what you're after?
Erik
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Filesets within Filesets
Posted by Alban Peignier <al...@leuville.com>.
You can use selectors and the and, or, not (..) operations :
http://jakarta.apache.org/ant/manual/CoreTypes/selectors.html. Your
fileset will have a unique base dir.
Alban
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Filesets within Filesets
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
No, there is not.... the reason is because a FileSet must be rooted at a
particular directory.
This is a bit of a bummer, I agree. I think of a file "set" as any ol'
set of files, not just ones under a root directory. This is one area
where I'd like to see/effect improvement in the future.
Erik
Nau, Michael wrote:
> Is there a way to make a fileset of filesets?
>
> For example:
>
> <fileset id="foo.jar.classes" dir="${build.out.dir}">
> <include name="com/foo/**/*.class"/>
> <exclude name="**/test/*"/>
> </fileset>
> <fileset id="foo.jar" dir="${dev.src.dir}">
> <fileset refid="foo.jar.classes" />
> <include name="com/foo/xslt/*"/>
> <include name="com/foo/*.properties"/>
> </fileset> This seems like a common thing. Here's what I want to do in English:
>
> 1. Compile all the .java files in the ${dev.src.dir} to {build.out.dir}
> 2. Jar the .class files from the ${build.out.dir} and all the xslt and
> properties files into a foo.jar.
>
> Thanks,
> Mike.
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>