ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7719] - need to ref filesets
Date Wed, 03 Apr 2002 15:11:07 GMT
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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message