ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nate Drake <>
Subject Unable to override system properties with 1.8.2
Date Thu, 28 Jul 2011 03:19:07 GMT
Our build file uses the property to let developers customize
property values.  We then use -D to override when doing builds for
dev/production servers.  When using any version of Ant before 1.8.2 this
works without issue.  With 1.8.2, won't be overridden with what we
passed on the command line via -D.  Other non-system properties can
be successfully overridden via -D.  I did some searching in the release
notes and didn't see any changes that would cause this to happen.  Is this a
known issue? Is there a way to get the old behavior back in 1.8.2?



Here is a simple build file to test with:

<?xml version="1.0"?>
<project name="anttest" default="test" basedir=".">

    <!-- Override for other properties to be loaded with a -->
    <echo message="using properties for ${} loading prop
file: properties/${}.properties"/>
    <property file="properties/${}.properties"/>

    <property name="someprop" value="setInBuild"/>

    <target name="test">
        <echo message=" = ${}"/>
        <echo message="java.vendor = ${java.vendor}"/>
        <echo message="someprop = ${someprop}"/>


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message