Bug 25169

Summary: Property file specified from command line doesn't expand all properties
Product: Ant Reporter: Tompa <tompa>
Component: OtherAssignee: Ant Notifications List <notifications>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 1.5.4   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Tompa 2003-12-03 17:32:13 UTC
Apache Ant version 1.5.4 compiled on August 12 2003
Red Hat Linux, J2SE 1.4

Consider following build.properties file:
base.path=/usr/local
base.file=${base.path}/abc.txt

and build.xml:
<project name="Test" default="dflt">
<property  file="build.properties"/>
<property name="xyz" value="${base.file}"/>
    <target name="dflt">
        <echo message="test message: ${xyz}"/>
    </target>
</project>

${xyz} is printed correctly as /usr/local//abc.txt

Now remove <property  file="build.properties"/> from buil.xml and run:
ant -propertyfile build.properties

${xyz} is now printed as
${base.path}/abc.txt
Comment 1 Jan Mat 2003-12-09 11:22:35 UTC

*** This bug has been marked as a duplicate of 23404 ***