ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: property value resetting...
Date Wed, 13 Dec 2000 17:06:36 GMT
Jason,

You can reset the value of properties if you use the <ant> or <antcall>
task. Can't say if they'd be workable for what you're looking to do, but I
use them fairly liberally in my build process (primarily for
"template"-type targets).

Diane

--- Jason Rosenberg <jason@squaretrade.com> wrote:
> 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
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message