ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steffen Euch <...@ep-ag.com>
Subject Re: Attributes for several tasks all at once?
Date Thu, 12 Jul 2001 16:24:14 GMT
Hi!

Sounds great, but how kann I pass a whole patternset via such a <param> 
to generic-compile?
It supports no refid attribute.

<patternset id="ps" >
     <include name="foo/aaa/*"/>
     <include name="foo/bbb/*"/>
     <include name="foo2/*"/>
</patternset>

<target name="foo">
     <antcall target="generic-compile">
         <param name="generic.compile" refid="ps"/> <!-- doesn't work -->
     </antcall>
</target>

Thanks in advance,

Steffen


Larry V. Streepy, Jr. wrote:

> I came up with a pattern that uses one target to do the compile and
> then other targets use antcall to invoke it, like this:
> 
>   <!-- ==================================================================== -->
>   <!-- Generic compilation target - uses javac.patternset to control        -->
>   <!-- what gets compiled                                                   -->
>   <!-- ==================================================================== -->
>   <target name="generic-compile">
>     <javac srcdir="${src.dir}"
>            destdir="${build.lib}"
>            debug="${debug}"
>            deprecation="${deprecation}"
>            optimize="${optimize}"
>            failonerror="yes"
>            depend="yes"
>            includeAntRuntime="no" >
>       <bootclasspath refid="rt.path" />
>       <classpath refid="base.path" />
>       <patternset refid="${javac.patternset}" />
>     </javac>
>   </target>
>   
>   <!-- ==================================================================== -->
>   <!-- Compile everything at once                                           -->
>   <!-- ==================================================================== -->
>   <target name="compile"
>           depends="prepare-build"
>           description="Compile ALL classes at once" >
> 
>     <antcall target="generic-compile">
>       <param name="javac.patternset" value="le.paths.all"/>
>     </antcall>
>   </target>
>   
>   <!-- ==================================================================== -->
>   <!-- Compile the utility classes                                          -->
>   <!-- ==================================================================== -->
>   <target name="compile-util"
>           depends="prepare-build"
>           description="Compile the utility classes" >
> 
>     <antcall target="generic-compile">
>       <param name="javac.patternset" value="le.paths.util"/>
>     </antcall>
>   </target>



Mime
View raw message