ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35109] New: - xml attribute:: the "default" attribute doesn't refer to the right property
Date Fri, 27 May 2005 19:07:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35109>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35109

           Summary: xml attribute:: the "default" attribute doesn't refer to
                    the right property
           Product: Ant
           Version: 1.6.3
          Platform: HP
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: marie-soleil.l.allier@ericsson.com


Hi,

------------------------------------
CONTEXT
------------------------------------
I have 2 build.xml files and both of them are importing common.xml
The first build.xml is calling the second build.xml. And the second build.xml 
is calling a macro of the common.xml

This macro have the following definition:
<property name="jar.dir" location="build/jar"/>     <!-- generated jar files -->
...
<macrodef name="common-jar">
    <attribute name="dir" default="${jar.dir}" Description="Directory in which 
to create the jar file"/>
    <sequential>
		<echo>
			DEBUG INFO :: COMMON-JAR
			jar.dir=${jar.dir}	
			@dir=@{dir}		
		</echo>
    
        <mkdir dir="@{dir}"/>
           ...
    </sequential>
</macrodef>

------------------------------------
PROBLEM
------------------------------------
When the macro is called without defining the attribute "dir", it uses the 
default value... look at those traces:
     [echo] DEBUG INFO :: MMS-JAR
     [echo] 	jar.dir=Y:\mmsoe\common\build\jar
     [echo] 	@dir=Y:\mms_testtools\tstauto\build\jar

The value contains in the @dir attribute is not the same as the property's 
value ${jar.dir}... in fact, it is the one that was defined when common.xml was 
imported by the FIRST build.xml.... 

And I only get this problem when building with ant 1.6.3 (not with ant 1.6.2 or 
1.6.1)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message