ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <>
Subject property value resetting...
Date Wed, 13 Dec 2000 08:57:10 GMT
It seems that once a property has its value set, it cannot be set to
a new value subsequently.  Is that right?

I have 2 targets:

<target name="compile">
  <property name="extension" value="java"/>
  <javac srcdir="${basedir}" target="${JAVA_JDK_VERSION}">

<target name="distribute" depends="compile">
  <property name="extension" value="class"/>
   <fileset dir="${basedir}">

The entity sourcePattern is defined in terms of the extension property:

 <!ENTITY sourcePattern '
   <include name="&buildDir;/EventTime.${extension}"/>
   <include name="&buildDir;/EventOutMail.${extension}"/>

When I do the distribute target, which depends on compile, it attempts
to copy the *.java and not the *.class versions of the files.
Is that right?  I would have wanted the "extension" property value
to be reset in each target, but that doesn't appear to be happening.

The docs are unclear in this case.  Is it meant to be resettable,
or not, and if not, why not.  It would certainly make life easier to
have this abillity.


View raw message