You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Peter Reilly <pe...@corvil.com> on 2003/12/03 14:37:29 UTC

Macrodef @{x}

I have committed the changes to change from ${x} to @{x} for
macro attributes substitution.

Usage of macrodef is now as follows:
<macrodef name="example">
   <attribute name="x"/>
   <sequential>
      <echo>The attribute has the value '@{x}'</echo>
  </sequential>
</macrodef>

This can be called as follows:
<example x="a value"/>

The escape sequence @@{ may be used to escape the substitution:

<macrodef name="example">
   <attribute name="x"/>
   <sequential>
      <echo>The attribute @@{x} has the value '@{x}'</echo>
  </sequential>
</macrodef>

<example x="a value"/>

Will result in:
     [echo] The attribute @{x} has the value 'a value'

The mechanisms for substition are different for properties and
macrodef attributes so one may now do the following:

    <macrodef name="double">
      <attribute name="prop"/>
      <sequential>
        <echo>@@{prop} is '@{prop}', value of $${@{prop}} is 
'${@{prop}}'</echo>
      </sequential>
    </macrodef>
    <property name="property" value="A property value"/>
    <double prop="property"/>

resulting in:
     [echo] @{prop} is 'property', value of ${property} is 'A property 
value'

These changes will be available for the next ant 1.6 beta build.

Peter

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


AW: Macrodef @{x}

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Sounds very very good. The light of the 1.6 release seems to come closer to
the horizon.

Cheers from Walldorf,

Antoine

-----Ursprüngliche Nachricht-----
Von: Peter Reilly [mailto:peter.reilly@corvil.com]
Gesendet: Mittwoch, 3. Dezember 2003 14:37
An: Ant Developers List; Ant Users List
Betreff: Macrodef @{x}


I have committed the changes to change from ${x} to @{x} for
macro attributes substitution.

Usage of macrodef is now as follows:
<macrodef name="example">
   <attribute name="x"/>
   <sequential>
      <echo>The attribute has the value '@{x}'</echo>
  </sequential>
</macrodef>

This can be called as follows:
<example x="a value"/>

The escape sequence @@{ may be used to escape the substitution:

<macrodef name="example">
   <attribute name="x"/>
   <sequential>
      <echo>The attribute @@{x} has the value '@{x}'</echo>
  </sequential>
</macrodef>

<example x="a value"/>

Will result in:
     [echo] The attribute @{x} has the value 'a value'

The mechanisms for substition are different for properties and
macrodef attributes so one may now do the following:

    <macrodef name="double">
      <attribute name="prop"/>
      <sequential>
        <echo>@@{prop} is '@{prop}', value of $${@{prop}} is
'${@{prop}}'</echo>
      </sequential>
    </macrodef>
    <property name="property" value="A property value"/>
    <double prop="property"/>

resulting in:
     [echo] @{prop} is 'property', value of ${property} is 'A property
value'

These changes will be available for the next ant 1.6 beta build.

Peter

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



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


Re: Macrodef @{x}

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 4 Dec 2003, Conor MacNeill <co...@cortexebusiness.com.au>
wrote:

> Let's crank out the next beta

+1

Stefan

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


Re: Failing testcases [was Macrodef @{x}]

Posted by Peter Reilly <pe...@corvil.com>.
Antoine Lévy-Lambert wrote:

>OK I have fixed some problems, as usual rather simple.
>
>I still have 3 testcases of
>org.apache.tools.ant.taskdefs.AntLikeTasksAtTopLevelTest failing under
>cygwin, but not under plain Windows.
>I did not look at the guts of the test yet to find out what is wrong.
>
>JDependTest has still 2 testcases failing, and is currently disabled in
>build.xml.
>
>Here is the output of one of the failing testcase of JDependTest :
>
>  
>
....

>    [junit]             <DependsUpon>
>    [junit]                 <Package>junit.framework</Package>
>    [junit]                 <Package>org.apache.tools.ant.types</Package>
>    [junit]             </DependsUpon>
>
>
>  
>
Strange, the output in linux using jvm 1.4.2_02 is different:

                 <DependsUpon>
                     <Package>java.lang</Package>
                     <Package>junit.framework</Package>
                     <Package>org.apache.tools.ant.types</Package>
                 </DependsUpon>


Peter

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


Failing testcases [was Macrodef @{x}]

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
OK I have fixed some problems, as usual rather simple.

I still have 3 testcases of
org.apache.tools.ant.taskdefs.AntLikeTasksAtTopLevelTest failing under
cygwin, but not under plain Windows.
I did not look at the guts of the test yet to find out what is wrong.

JDependTest has still 2 testcases failing, and is currently disabled in
build.xml.

Here is the output of one of the failing testcase of JDependTest :

    [junit] Testcase: testXml took 0,08 sec
    [junit] 	FAILED
    [junit] expecting output to contain "<Package>java.lang</Package>"
output was "<?xml version="1.0"?>
    [junit] <JDepend>
    [junit]     <Packages>

    [junit]         <Package name="junit.framework">
    [junit]             <error>No stats available: package referenced, but
not analyzed.</error>
    [junit]         </Package>

    [junit]         <Package name="org.apache.tools.ant.types">
    [junit]             <error>No stats available: package referenced, but
not analyzed.</error>
    [junit]         </Package>

    [junit]         <Package name="org.apache.tools.ant.util.facade">
    [junit]             <Stats>
    [junit]                 <TotalClasses>2</TotalClasses>
    [junit]                 <ConcreteClasses>2</ConcreteClasses>
    [junit]                 <AbstractClasses>0</AbstractClasses>
    [junit]                 <Ca>0</Ca>
    [junit]                 <Ce>2</Ce>
    [junit]                 <A>0</A>
    [junit]                 <I>1</I>
    [junit]                 <D>0</D>
    [junit]             </Stats>

    [junit]             <AbstractClasses>
    [junit]             </AbstractClasses>

    [junit]             <ConcreteClasses>
    [junit]
<Class>org.apache.tools.ant.util.facade.FacadeTaskHelperTest</Class>
    [junit]
<Class>org.apache.tools.ant.util.facade.ImplementationSpecificArgumentTest</
Class>
    [junit]             </ConcreteClasses>

    [junit]             <DependsUpon>
    [junit]                 <Package>junit.framework</Package>
    [junit]                 <Package>org.apache.tools.ant.types</Package>
    [junit]             </DependsUpon>

    [junit]             <UsedBy>
    [junit]             </UsedBy>
    [junit]         </Package>
    [junit]     </Packages>

    [junit]     <Cycles>
    [junit]     </Cycles>
    [junit] </JDepend>

Cheers,

Antoine

-----Ursprüngliche Nachricht-----
Von: Peter Reilly [mailto:peter.reilly@corvil.com]
Gesendet: Mittwoch, 3. Dezember 2003 18:15
An: Ant Developers List
Betreff: Re: AW: Macrodef @{x}


Antoine Lévy-Lambert wrote:

>Hi Conor,
>
>I would like to have a look at the failing testcases before releasing the
>next beta, but it is going to be quick.
>
>
+1 sounds great.
Peter

>Cheers,
>Antoine
>



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


Re: AW: Macrodef @{x}

Posted by Peter Reilly <pe...@corvil.com>.
Antoine Lévy-Lambert wrote:

>Hi Conor,
>
>I would like to have a look at the failing testcases before releasing the
>next beta, but it is going to be quick.
>  
>
+1 sounds great.
Peter

>Cheers,
>Antoine
>
>-----Ursprüngliche Nachricht-----
>Von: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
>Gesendet: Mittwoch, 3. Dezember 2003 15:06
>An: Ant Developers List
>Betreff: RE: Macrodef @{x}
>
>
>  
>
>>From: Peter Reilly [mailto:peter.reilly@corvil.com]
>>
>>
>>These changes will be available for the next ant 1.6 beta build.
>>
>>    
>>
>
>+1 - sounds cool.
>
>Let's crank out the next beta - is there anything else we are waiting for?
>
>Conor
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>  
>


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


AW: Macrodef @{x}

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Hi Conor,

I would like to have a look at the failing testcases before releasing the
next beta, but it is going to be quick.
Cheers,
Antoine

-----Ursprüngliche Nachricht-----
Von: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
Gesendet: Mittwoch, 3. Dezember 2003 15:06
An: Ant Developers List
Betreff: RE: Macrodef @{x}


> From: Peter Reilly [mailto:peter.reilly@corvil.com]
>
>
> These changes will be available for the next ant 1.6 beta build.
>

+1 - sounds cool.

Let's crank out the next beta - is there anything else we are waiting for?

Conor




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


RE: Macrodef @{x}

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> From: Peter Reilly [mailto:peter.reilly@corvil.com]
> 
> 
> These changes will be available for the next ant 1.6 beta build.
> 

+1 - sounds cool.

Let's crank out the next beta - is there anything else we are waiting for?

Conor


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


Re: xml-apis.jar [was Macrodef @{x}]

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 3 Dec 2003, Jacob Kjome <ho...@visi.com> wrote:

> So, maybe it was updated on the 1.6 branch but not the head.

Correct.  For HEAD I've held back the change since the xml-commons
project is looking into doing a new release (and I'd prefer to use
that over the Xerces version later).

Stefan

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


Re: xml-apis.jar [was Macrodef @{x}]

Posted by Jacob Kjome <ho...@visi.com>.
I'm at work now, but I think I checked out the HEAD, not the 1.6 branch.  I 
think when I checked out the 1.6 branch before, the xml-apis.jar was the 
correct new version.  So, maybe it was updated on the 1.6 branch but not the 
head.  I believe the xercesImpl.jar is correct in both cases.  You'll have to 
verify all this, but I just wanted to alert everyone about it.

Jake

Quoting Antoine Levy-Lambert <an...@antbuild.com>:

> 
> Hi Jake,
> I will have a look at this one too.
> Cheers,
> Antoine
> -----Ursprungliche Nachricht-----
> Von: Jacob Kjome [mailto:hoju@visi.com]
> Gesendet: Mittwoch, 3. Dezember 2003 15:02
> An: Ant Users List
> Betreff: Re: Macrodef @{x}
> 
> 
> 
> This is offtopic from the macrodef change, but the xml-apis.jar seems to
> have mysteriously reverted to a much older one.  Even recently it had been
> the one from Xerces-2.6.0.  xercesImpl.jar *is* from 2.6.0, but
> xml-apis.jar is from back in 2002.  It should be 122k and is only 106k
> right now.  Better make sure that gets changed before the next beta.
> 
> Jake
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

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


xml-apis.jar [was Macrodef @{x}]

Posted by Antoine Levy-Lambert <an...@antbuild.com>.
Hi Jake,
I will have a look at this one too.
Cheers,
Antoine
-----Ursprungliche Nachricht-----
Von: Jacob Kjome [mailto:hoju@visi.com]
Gesendet: Mittwoch, 3. Dezember 2003 15:02
An: Ant Users List
Betreff: Re: Macrodef @{x}



This is offtopic from the macrodef change, but the xml-apis.jar seems to 
have mysteriously reverted to a much older one.  Even recently it had been 
the one from Xerces-2.6.0.  xercesImpl.jar *is* from 2.6.0, but 
xml-apis.jar is from back in 2002.  It should be 122k and is only 106k 
right now.  Better make sure that gets changed before the next beta.

Jake



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


Re: Macrodef @{x}

Posted by Jacob Kjome <ho...@visi.com>.
This is offtopic from the macrodef change, but the xml-apis.jar seems to 
have mysteriously reverted to a much older one.  Even recently it had been 
the one from Xerces-2.6.0.  xercesImpl.jar *is* from 2.6.0, but 
xml-apis.jar is from back in 2002.  It should be 122k and is only 106k 
right now.  Better make sure that gets changed before the next beta.

Jake

At 01:37 PM 12/3/2003 +0000, you wrote:
>I have committed the changes to change from ${x} to @{x} for
>macro attributes substitution.
>
>Usage of macrodef is now as follows:
><macrodef name="example">
>   <attribute name="x"/>
>   <sequential>
>      <echo>The attribute has the value '@{x}'</echo>
>  </sequential>
></macrodef>
>
>This can be called as follows:
><example x="a value"/>
>
>The escape sequence @@{ may be used to escape the substitution:
>
><macrodef name="example">
>   <attribute name="x"/>
>   <sequential>
>      <echo>The attribute @@{x} has the value '@{x}'</echo>
>  </sequential>
></macrodef>
>
><example x="a value"/>
>
>Will result in:
>     [echo] The attribute @{x} has the value 'a value'
>
>The mechanisms for substition are different for properties and
>macrodef attributes so one may now do the following:
>
>    <macrodef name="double">
>      <attribute name="prop"/>
>      <sequential>
>        <echo>@@{prop} is '@{prop}', value of $${@{prop}} is 
> '${@{prop}}'</echo>
>      </sequential>
>    </macrodef>
>    <property name="property" value="A property value"/>
>    <double prop="property"/>
>
>resulting in:
>     [echo] @{prop} is 'property', value of ${property} is 'A property value'
>
>These changes will be available for the next ant 1.6 beta build.
>
>Peter
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


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