https://issues.apache.org/bugzilla/show_bug.cgi?id=49989

           Summary: Environment variables no longer work from property
                    files
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=26069)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26069)
Verbose/Debug output from Ant 1.8.1

In Ant 1.7.1 and probably before you could load environment variables then use
them in a property file.  This doesn't seem to work in 1.8.1.  See
debug/verbose output attached. For example:

build.xml:
<project default="test">
    <property environment="env" />
    <property file="test.properties" prefix="test" />

    <target name="test">
        <echo>${test.value}</echo>
    </target>
</project>

test.properties:
value = ${env.VAR}-suffix

Output in 1.7.1:
Buildfile: build.xml

test:
     [echo] value-suffix

BUILD SUCCESSFUL
Total time: 0 seconds

Output in 1.8.1:
Buildfile: /home/XXXXX/build.xml

test:
     [echo] ${env.VAR}-suffix

BUILD SUCCESSFUL
Total time: 0 seconds

Same thing happens if just using a regular property like:
<project default="test">

    <property name="global-prop" value="test" />
    <property file="test.properties" prefix="test" />

    <target name="test">
        <echo>${test.value}</echo>
    </target>
</project>

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

Reply via email to