ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <sflo...@nc.rr.com>
Subject Re: Passing list of classes to exclude from build as macrodef attribute
Date Fri, 09 Mar 2012 15:18:08 GMT

You'll need to do something like this...

<macrodef name="jpp-javac-convert>
    <element name="additional" optional="true"/>
    <element name="post" optional="true"/>

    <sequential>
        <javac ...>
            <additional/>
        </javac>

        <post/>
    </sequential>
</macrodef>

Then you can do things like:

<jpp-javac-convert>
     <additional>
         <exclude .../>
     </additional>

     <post>
         <delete dir="foo"/>
     </post>
</jpp-javac-convert>


Arguably, a little uglier notation...

On Fri, 9 Mar 2012, Noam Postavsky wrote:

> On Fri, Mar 9, 2012 at 8:20 AM, Scot P. Floess <sfloess@nc.rr.com> wrote:
>>
>> Why not just use a child element for the macrodef?  Something like:
>
> Ah, I didn't realize that was possible.
>
>> <jpp-javac-convert>
>>    <exclude name="**/Foo.java"/>
>>    <exclude name="**/Bar.java"/>
>> </jpp-javac-convert>
>
> That's better, but I also need to get rid of the class files (convert
> is JavaCard converter and it takes all the class files in the
> directory). Is there a way to get the class names as well without
> giving both source and class name?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Scot P. Floess             RHCT  (Certificate Number 605010084735240)
Chief Architect FlossWare  http://sourceforge.net/projects/flossware
                            http://flossware.sourceforge.net
                            https://github.com/organizations/FlossWare

Mime
View raw message