ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <billr...@attglobal.net>
Subject RE: -propertyfile does not expand properties
Date Fri, 27 Feb 2004 16:07:38 GMT
Yes, I experienced the same problem.  For that and some other reasons I changed to making
a project file that imports the common project file and sets specific properties in its
init target.

Like this:

	<!-- Set up the environment. -->
	<property environment="env"/>
	<!-- Import the L10NProcess ant file so we can use its targets in this project. -->
	<import file="${env.LEVTOOLSDIR}/L10NProcess/L10NProcess.xml"/>

	<target name="init" description="Set up properties needed throughout this project.">
		<property name="PROJECTFILE" value="IS_Caffeine.slpd"/>
		<property name="PRODUCT" value="b2b/Elbe"/>
		<property name="SOURCELOCALE" value="en_US"/>
		<property name="TARGETLOCALE" value="ja_JP"/>
		<property name="TARGETLANG" value="ja"/>
		<property name="SDLXTARGETLANG" value="JA"/>
		<property file="IS_P4.properties"/>
	</target>

In this example the project file is named IS_Caffeine_ja.xml and the common project file
is L10NProcess.xml.  The L10NProcess.xml file has an L10NProcess.init target that depends
on init.  You can run the local project and use the targets in the common project with a
command like this:
"ant -f IS_Caffeine_ja.xml -e tok" where tok is a target in L10NProcess.xml.

I am new to ant but find it very flexible and easy to work with to make complex projects.
I can probably find a better way to do many things but that will come with more
experience.

Thanks.  Bill

Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA  95120-3905
phone:      +1 408 268-2452
mobile:     +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:        +1 413 669-9716
billrich@wilandra.com or billrich@attglobal.net
http://www.wilandra.com

-----Original Message-----
From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
Sent: Friday, February 27, 2004 7:38 AM
To: Ant Users List (E-mail)
Subject: -propertyfile does not expand properties


it seems that using the -propertyfile switch to ant does not expand properties in the
file.  if i have a property file whose contents are:
a=a
b=${a}b
c=${b}c

then c ends up being set to ${b}c instead of "abc" as expected when running ant via:
ant -propertyfile abc.properties .the expansion works fine if i use a <property
file="abc.properties"/> element within the build.xml file. anyone else notice this
behavior?

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.574 / Virus Database: 364 - Release Date: 1/29/2004




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


Mime
View raw message