ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Exec Perl Prog with Arguments
Date Mon, 21 Mar 2005 10:25:09 GMT
On Mon, 21 Mar 2005, Sven Waibel <sven.waibel@imbus.de> wrote:
>         	<arg path= "${perl.translate.script.name} {refid='plugin.files.xsl'}"/>

I don't think you mean path here, but rather line.

path="foo bar" will pass "foo bar" as a single command line argument
to Perl.

I'm not exactly sure what file is supposed to look like here

> perl script syntax: translate2.pl file

if you have multiple files.  Space separated list?  Really a path
(i.e. colon-separated on Unix, semicolon-separated on Windows).

My best guess is space separated, then you'd do

    <!-- turn fileset into space separated string -->
    <pathconvert pathsep=" " property="plugin.files.xsl">
      <path>
        <fileset dir="./plugins" includes="*.xsl" />
      </path>
    <pathconvert>
    <exec executable="${perl}" >
      <!-- one arg for the Perl script name -->
      <arg value="${perl.translate.script.name}"/>
      <!-- have Ant split the command line at ' ' and create multiple args -->
      <arg line= "${plugin.files.xsl}"/>
    </exec>

Stefan

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


Mime
View raw message