You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by RP...@360commerce.com on 2004/08/05 17:50:42 UTC
Replacing Text In a File with a Property Value
The Install Anywhere task does not allow you to pass in variables to be
used within the installer creation. So, I have a bunch of iap_xml files
that have hardcoded install build locations.
I need these to be dynamic because my build system builds official builds
in different locations every time. Also, I don't want my builds tied to
the file system structure.
So, I'm attempting to replace c:\foo\bar with my current installer build
directory stored in ${assemble.dir}. However, the replace target will
explicitly put in ${assemble.dir} instead of c:\real\installer\dir. The
same thing happens with copy and filterchains.
How can I tell Ant to use the value stored in ${assemble.dir} and not the
actual text?
Thanks,
Robert
Re: Replacing Text In a File with a Property Value
Posted by RP...@360commerce.com.
Thanks!
I was actually dorking it up. I had gotten the replace task wrong and was
replacing the source file not the destination. So, after I fixed it, I
neglected to do a fresh get. Silly me...
FWIW, InstallAnywhere doesn't allow you to pass in variables for grabbing
the contents of the installer. Locations are hardcoded in the iap_xml
files. So, you can set up the IA job on a workstation relative to some
arbitrary path. Then, you can use the replace task during the build to
change those paths in your iap_xml files. It's not very elegant, but does
allow you the ability to have platform independent builds with
InstallAnywhere.
Now if only I could get an Open Source alternative to InstallAnywhere...
Robert
Erik Hatcher <er...@ehatchersolutions.com>
08/06/2004 03:11 AM
Please respond to
"Ant Users List" <us...@ant.apache.org>
To
"Ant Users List" <us...@ant.apache.org>
cc
Subject
Re: Replacing Text In a File with a Property Value
Have a look at <copy> with a nested <filterset>.
Also, one of the most special Ant tasks out there is VPPCopy (or its
companion filter reader):
http://vpp.sourceforge.net
VPP is a Velocity Pre-Processor - using it for generation from
templated text files is one of its strong suits.
Erik
On Aug 5, 2004, at 11:50 AM, RPearse@360commerce.com wrote:
> The Install Anywhere task does not allow you to pass in variables to be
> used within the installer creation. So, I have a bunch of iap_xml files
> that have hardcoded install build locations.
>
> I need these to be dynamic because my build system builds official
> builds
> in different locations every time. Also, I don't want my builds tied to
> the file system structure.
>
> So, I'm attempting to replace c:\foo\bar with my current installer
> build
> directory stored in ${assemble.dir}. However, the replace target will
> explicitly put in ${assemble.dir} instead of c:\real\installer\dir. The
> same thing happens with copy and filterchains.
>
> How can I tell Ant to use the value stored in ${assemble.dir} and not
> the
> actual text?
>
> Thanks,
>
> Robert
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Replacing Text In a File with a Property Value
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Have a look at <copy> with a nested <filterset>.
Also, one of the most special Ant tasks out there is VPPCopy (or its
companion filter reader):
http://vpp.sourceforge.net
VPP is a Velocity Pre-Processor - using it for generation from
templated text files is one of its strong suits.
Erik
On Aug 5, 2004, at 11:50 AM, RPearse@360commerce.com wrote:
> The Install Anywhere task does not allow you to pass in variables to be
> used within the installer creation. So, I have a bunch of iap_xml files
> that have hardcoded install build locations.
>
> I need these to be dynamic because my build system builds official
> builds
> in different locations every time. Also, I don't want my builds tied to
> the file system structure.
>
> So, I'm attempting to replace c:\foo\bar with my current installer
> build
> directory stored in ${assemble.dir}. However, the replace target will
> explicitly put in ${assemble.dir} instead of c:\real\installer\dir. The
> same thing happens with copy and filterchains.
>
> How can I tell Ant to use the value stored in ${assemble.dir} and not
> the
> actual text?
>
> Thanks,
>
> Robert
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org