ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <erikhatc...@earthlink.net>
Subject Re: How can I do this in ant?
Date Fri, 17 Aug 2001 20:19:30 GMT
Better yet, would the optional <propertyfile> task work for you in this
case?   It created property files and has some nice features.

    http://jakarta.apache.org/ant/manual/OptionalTasks/propertyfile.html

    Erik


----- Original Message -----
From: "Eric Youngquist" <eric.youngquist@cisco.com>
To: <ant-user@jakarta.apache.org>
Sent: Friday, August 17, 2001 12:48 PM
Subject: RE: How can I do this in ant?


> I figured it out ...
>
>   <target name="build.property">
>    <exec executable="/usr/bin/basename" output="build.property">
>       <arg line="src/util"/>
>    </exec>
>   </target>
>
> -----Original Message-----
> From: Eric Youngquist [mailto:eric.youngquist@cisco.com]
> Sent: Friday, August 17, 2001 3:37 PM
> To: ant-user@jakarta.apache.org
> Subject: How can I do this in ant?
>
>
> I would like to place the string "util" in the file build.properties.
>
>   <target name="build.property">
>    <exec executable="/usr/bin/basename">
>       <arg line="src/util > build.property"/>
>    </exec>
>   </target>
>
> When I run, I get the following error:
>
> build.property:
>      [exec] Current OS is SunOS
>      [exec] /usr/bin/basename src/util > build.property
>      [exec] Usage:  basename [ path [ suffix-pattern ] ]
>      [exec] Result: 1
>
> But when I cut and paste the command to the command line, it works.
>
> Ultimately I would like to do the following:
>
>   <target name="build.property">
>    <exec executable="/usr/bin/basename">
>       <arg line="${mysys.PWD} > build.property"/>
>    </exec>
>   </target>
>
> Thanks,
> Eric
>
> ----------------------------------------------------------------------
> Eric Youngquist                      Email: Eric.Younggquist@cisco.com
> Cisco Systems, Inc                   Voice: 919 392-6157
> 7025 Kit Creek Rd.                   Fax:   919 392-1669
> RTP, NC  27709-4987                  URL:   http://www.cisco.com
>
>


Mime
View raw message