ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40561] - property expansion with prefix troubles in property files
Date Thu, 21 Sep 2006 11:50:31 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40561>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40561





------- Additional Comments From efanomars@yahoo.com  2006-09-21 11:50 -------
(In reply to comment #2)
I tested your example in verbose mode with Ant1.7Beta2 and 
I get the following:

>ant -v

Property "project.interfaces.prefix" has not been set
Property "project.interfaces.suffix" has not been set
Property "project.factories.suffix" has not been set
Property "project.factories.suffix" has not been set
     [echo]
interfaces.format={1}.model.${project.interfaces.prefix}{2}${project.interfaces.suffix}
     [echo] factories.format={1}.factory.{2}${project.factories.suffix}
     [echo] foo={1}.factory.{2}${project.factories.suffix}

which is correct. 

What you get is very strange (and would be a bug IMHO).
As Peter mentioned properties in a property file 
are first resolved among themselves (because
the definitions are returned as a set and have
no ordering) and only afterwards are resolved
against the build's properties.

There are two things you could try:
1. 
Strip the prefix from the names as Peter said.

2. 
Define the project.xxx properties separately
in case you need these properties to be visible in
more than one prefixed property file.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message