ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: FileSet within FileSet
Date Fri, 05 Dec 2003 17:01:55 GMT
what you are describing sounds OK from an ant point of view.
Which version of ant are you using ?

Cheers,

Antoine

-----Ursprüngliche Nachricht-----
Von: Thomas Lionel SMETS [mailto:tsmets@netscape.net]
Gesendet: Freitag, 5. Dezember 2003 16:51
An: "Ant Users List"
Betreff: Re: FileSet within FileSet



In the "Definitive guide of ANT", they give an example like this :
<path id="classpath">
  <fileset dir="${lib.dir}">
    <include name="**/*.jar"/>
  </fileset>
</path>

they then can refere this "path" in the javac classpath !

In my Build.xml I have the following description :
    <!-- The build path -->
    <path id="build.path" >
        <fileset dir="${lib.dir}">
            <!-- <patternset refid="pattern.lib.files" /> -->
            <include name="*.jar" />
            <include name="*.zip" />
        </fileset>
    </path>

But refering to it in my build-target, like herebelow :
    <target name="build"
            description="Builds the java code">
        <javac verbose="${verbose.flag}"
               destdir="${build.dir}"
               srcdir="${src.dir}"  >
               <!-- <include name="**/*.java" /> -->
               <classpath refid="build.path" />
        </javac>
    </target>

I get a :
              build.path doesn't denote a path


Any idea ?

\T,




tsmets@netscape.net (Thomas Lionel SMETS) wrote:

>Tx Stephan ... :((
>I actually have no other place where I intend to use it... It is just that
I prefere to prepare all the FileSets / PatternSets in the upper part of my
Build-file. Cleaness caught me ;-)
>
>\T,
>
>
>Stefan Bodewig <bodewig@apache.org> wrote:
>
>>On Fri, 05 Dec 2003, Thomas Lionel SMETS <tsmets@netscape.net> wrote:
>>
>>>     <fileset id="compiled.files"
>>>          dir="${build.dir}">
>>>         <patternset refid="pattern.class.files" />
>>>     </fileset>
>>>
>>>     <!-- The list with all the jars /  libraries -->
>>>     <fileset id="lib.files"
>>>          dir="${lib.dir}" >
>>>         <patternset refid="pattern.lib.files" />    
>>>     </fileset>          
>>>
>>> Now for creating my jar, the would like to include both file sets
>>> defined here above, to have something like :
>>>
>>>    <!-- The files to be jarred -->
>>>    <fileset id="jarred.files">
>>>        <include refid="compiled.files" />
>>>        <include refid="lib.files" />  
>>>        <include refid="java.files" unless="${prod.flag}" />    
>>>    </fileset>
>>
>>which doesn't work as you can't nest filesets into filesets - as
>>filesets are rooted in a common dir by (Ant's) definition.
>>
>>You could simply use
>>
>><jar ...>
>>  <fileset refid="compiled.files" />
>>  <fileset refid="lib.files" />  
>>  <fileset refid="java.files" unless="${prod.flag}" />    
>></jar>
>>
>>but I assume you want to pass the collection of filesets around (or is
>>there any other reason you don't want to place them under <jar>?).
>>What are the "other things" you intended to do with your jarred.files
>>fileset?
>>
>>Stefan
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
>
>--
>
>Thomas SMETS
>rue J. Wytsmanstraat 62
>1050 Brussels
>
>
>__________________________________________________________________
>McAfee VirusScan Online from the Netscape Network.
>Comprehensive protection for your entire computer. Get your free trial
today!
>http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>
>Get AOL Instant Messenger 5.1 free of charge.  Download Now!
>http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>


--

Thomas SMETS
rue J. Wytsmanstraat 62
1050 Brussels


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial
today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message