ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Schumacher <r...@august.de>
Subject Re: How does >property< function?
Date Wed, 09 Oct 2002 09:38:57 GMT
super - thank's
must have been as trivial as that
but in training ANT philosophy and intentions this was a big step.
Thanks again ...

Rolf
P. Fleury wrote:

> Hi Rolf,
>
> your <classfileset> is not part of any tasks, so it is run before any 
> tasks. However, your <property> is defined within task init, which is 
> run afterwards.
> I think variable/propertry substitutions take place immediately when 
> ant is parsing the file, not delayed until when the snipplet of XML 
> code is actually used or referenced.
>
> --Pascal
>
> Rolf Schumacher wrote:
>
>> I thought I've understood the >property< keyword.
>> But what might be the difference in running ant on the following
>> ---
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project basedir="." default="all" name="helloWorld">
>>    <target name="init">
>>        <property name="classes" 
>> value="/rolf/Java/build/WEB-INF/classes"/>
>>    </target>
>>      <classfileset id="cfs" dir="${classes}">
>>    <!-- classfileset id="cfs" dir="/rolf/Java/build/WEB-INF/classes" -->
>>        <include name="de/toolsprofi/rsc/Log.class"/>
>>    </classfileset>
>>      <target name="all" depends="init">
>>        <jar compress="true" jarfile="/Windows/Temp/helloWorld.jar">
>>            <fileset refid="cfs"/>
>>        </jar>
>>    </target>
>>
>> </project>
>> ---
>> and with the classfileset lines switched?
>>
>> Run as shown leads to an BUILD FAILED with a hint that I do not 
>> understand.
>> Run with the explicit dir="/rolf..." functions as I think it should.
>>
>> Any point I missed?
>>
>> Rolf
>>
>> Appendix: the error message copied from dos window
>> ---
>> C:\rolf\Java\src\de\toolsprofi\helloWorld>ant
>> Buildfile: build.xml
>>
>> init:
>>
>> all:
>>
>> BUILD FAILED
>> file:C:/rolf/Java/src/de/toolsprofi/helloWorld/build.xml:12: 
>> C:\rolf\Java\src\de
>> \toolsprofi\helloWorld\${classes} not found.
>>
>> Total time: 1 second
>> C:\rolf\Java\src\de\toolsprofi\helloWorld>
>> ---
>> the good message with switched dir-specs
>> ---
>> C:\rolf\Java\src\de\toolsprofi\helloWorld>ant
>> Buildfile: build.xml
>>
>> init:
>>
>> all:
>>
>> BUILD SUCCESSFUL
>> Total time: 1 second
>> C:\rolf\Java\src\de\toolsprofi\helloWorld>
>> ---
>>
>>
>> --
>> To unsubscribe, e-mail:   
>> <mailto:ant-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <mailto:ant-user-help@jakarta.apache.org>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
>
>




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message