You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jonathan Allen <al...@spawar.navy.mil> on 2004/05/07 00:58:08 UTC

Passing files to a java target

I would like to send a list of filenames to a java target. i.e.

java myProgram c:\root c:\root\test\bean.properties
c:\root\test\bean.properties c:\root\boat\try2\bean.properties
c:\root\fish\bean.properties

Below is as close as I cen get. The problem is that it won't recognize
codeGen.path.

C:\ksa_dev\build.xml:435: Reference ${codeGen.path} not found.

Jonathan Allen

********************
<path id="codeGen.path">
    <fileset dir="${src.dir}" casesensitive="yes">
        <include name="**/bean.properties"/>
    </fileset>
</path>

<target name="codeGen"
            description="Regenerate code">
        <java classname="myProgram">
            <classpath refid="classpath" />
            <arg path="${src.dir}"/>
            <arg pathref="${codeGen.path}"/>
        </java>
</target>
**********************


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


RE: Passing files to a java target

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Hi Jonathan,

Have you tried to use pathref="codeGen.path" instead of ${codeGen.path}? I
haven't got the time to test it, but I think that should do what you want.

-Filip S. Adamsen

-----Original Message-----
From: Jonathan Allen [mailto:allenj@spawar.navy.mil] 
Sent: Friday, May 07, 2004 12:58 AM
To: user@ant.apache.org
Subject: Passing files to a java target

I would like to send a list of filenames to a java target. i.e.

java myProgram c:\root c:\root\test\bean.properties
c:\root\test\bean.properties c:\root\boat\try2\bean.properties
c:\root\fish\bean.properties

Below is as close as I cen get. The problem is that it won't recognize
codeGen.path.

C:\ksa_dev\build.xml:435: Reference ${codeGen.path} not found.

Jonathan Allen

********************
<path id="codeGen.path">
    <fileset dir="${src.dir}" casesensitive="yes">
        <include name="**/bean.properties"/>
    </fileset>
</path>

<target name="codeGen"
            description="Regenerate code">
        <java classname="myProgram">
            <classpath refid="classpath" />
            <arg path="${src.dir}"/>
            <arg pathref="${codeGen.path}"/>
        </java>
</target>
**********************


---------------------------------------------------------------------
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