ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <tanguy.rademak...@swift.com>
Subject Re: How to pass list of filenames to javac task
Date Mon, 02 Feb 2004 19:10:24 GMT
shoule be - use a <path> with a <fileset> (or other) to read the files, 
then a <pathconvert/>
to turn the path into a space delimited list and pass that into javac 
using an <arg> or <|compilerarg>.

YMMV: i use this trick to run ejbgen via <java> (due to a problem on 
HPUX), not for <javac>
|
/t

   <target name="generate" depends="check_required, init" 
if="generate.required">

        <!-- scan the ${COMP_JAVA_SRC} directory and get the *.java 
files -->
        <path id="ejbgen.path">
            <fileset dir="${COMP_JAVA_SRC}" casesensitive="yes">
                <include name="**/*Bean.java"/>
                <exclude name="**/entities/*Bean.java"/>
            </fileset>
        </path>

        <!-- turn that into a space seperated list of file paths -->
        <pathconvert property="ejbjen.files" refid="ejbgen.path" 
dirsep="/" pathsep=" "/>

        <!-- invoke ejbGen on these file paths -->
        <java classname="weblogic.tools.ejbgen.EJBGen" 
classpathref="path.ejbgen" fork="True" failonerror="True" maxmemory="256m">
            <arg line="-sourcepath ${COMP_JAVA_SRC}"/>
            <arg line="-templateDir ${EJBGEN_TEMPLATES}"/>
            <arg line="-d ${COMP_GENERATED}"/>
            <arg line="-descriptorDir ${COMP_EJB}/META-INF"/>
            <arg line="-errorFile ${basedir}/ejbgen_errors.txt"/>
            <arg line="-wls81"/>
            <arg line="${ejbjen.files}"/>
        </java>
    </target>



Veerappan Saravanan-ESV007 wrote:

>Is there a way to give list of filenames instead of specifying srcdir attribute?
>
>Thanks
>
> 
>
>  
>

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


Mime
View raw message