ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <ja...@squaretrade.com>
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}">
    &sourcePattern; 
  </javac>
</target>

<target name="distribute" depends="compile">
  <property name="extension" value="class"/>
  <copy todir="${DISTRIBUTE_PLUGIN_CLASSES}">
   <fileset dir="${basedir}">
    &sourcePattern; 
   </fileset>
  </copy>
</target>

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

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

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.

Jason

Mime
View raw message