You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/04/03 17:11:07 UTC
DO NOT REPLY [Bug 7719] -
need to ref filesets
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7719>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7719
need to ref filesets
bodewig@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From bodewig@apache.org 2002-04-03 15:11 -------
You can ref filesets or filelists - the reason why it doesn't work for you
is that you use <antcall> and Ant doesn't transport references to child builds.
Now the good news, in the current CVS version, you can do what you want, you
need could use <ant> and set inheritRefs to true.
You can even control which references will be passed down (and change the ids
on the fly).
Rewriting your example for Ant 1.5:
<target name="smartJar" description="helper target">
<dependset>
<srcfileset refid="sourceFileset"/>
<targetfilelist refid="jarFile"/>
</dependset>
<jar jarfilerefid="${jarFile}">
<fileset refid="sourceFileset"/>
</jar>
</target>
and
<fileset id="classfiles.production" dir="classes">
<include name="**/*.class"/>
<exclude name="**/test/*" />
</fileset>
<filelist id="jarfile.production" dir="release" files="myApplication.jar">
<antcall target="smartJar">
<reference toid="sourceFileset" refid="classfiles.production"/>
<reference toid="jarFile" refid="jarfile.production"/>
</antcall>
<fileset id="classfiles.unittests" dir="classes">
<include name="**/test/*.class"/>
</fileset>
<filelist id="jarfile.unittests" dir="release" files="unittests.jar">
<antcall target="smartJar">
<reference toid="sourceFileset" refid="classfiles.unittests"/>
<reference toid="jarFile" refid="unittests.jar"/>
</antcall>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>