You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mike Murray <mm...@ptc.com> on 2002/06/10 20:42:02 UTC

Dynamic PatternSet for Set of Directory

I have created an initialization task that will set some properties,
based on a command line property.  I have defined a patternset that uses
one of these dynamically created properties.

        <patternset id="dir.pattern" includes="${dir.pattern.list}"/>

The problem is that the property gets evaluated before my initialization
task can set it.  Is there any straightforward way to dynamically set
this property before the patternset definition evaluates it?

Thanks, Mike


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic PatternSet for Set of Directory

Posted by Mike Murray <mm...@ptc.com>.
Yes, it was.  I didn't realize I could put my patternset definitions inside my
initialization target.  Its not as clean as lazy property evaluation would be,
but it is acceptable.  Much thanks!

Mike

     <target name="init" depends="unit.check">
        <unitproperties unit="${unit}"/>
        <patternset id="dir.pattern" includes="${dir.pattern.list}"/>
     </target>

Erik Hatcher wrote:

> Where are you placing this <patternset> definition?  Outside of targets?
>
> Have you tried placing the <patternset> immediately after calling your
> initialization task?  That should do the trick.  But of course that will mean
> you have to move any other datatype declarations that depend upon that
> patternset also.
>
> ----- Original Message -----
> From: "Mike Murray" <mm...@ptc.com>
> To: "Ant Users List" <an...@jakarta.apache.org>
> Sent: Monday, June 10, 2002 2:42 PM
> Subject: Dynamic PatternSet for Set of Directory
>
> > I have created an initialization task that will set some properties,
> > based on a command line property.  I have defined a patternset that uses
> > one of these dynamically created properties.
> >
> >         <patternset id="dir.pattern" includes="${dir.pattern.list}"/>
> >
> > The problem is that the property gets evaluated before my initialization
> > task can set it.  Is there any straightforward way to dynamically set
> > this property before the patternset definition evaluates it?
> >
> > Thanks, Mike
> >


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic PatternSet for Set of Directory

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Where are you placing this <patternset> definition?  Outside of targets?

Have you tried placing the <patternset> immediately after calling your
initialization task?  That should do the trick.  But of course that will
mean you have to move any other datatype declarations that depend upon that
patternset also.

----- Original Message -----
From: "Mike Murray" <mm...@ptc.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Monday, June 10, 2002 2:42 PM
Subject: Dynamic PatternSet for Set of Directory


> I have created an initialization task that will set some properties,
> based on a command line property.  I have defined a patternset that uses
> one of these dynamically created properties.
>
>         <patternset id="dir.pattern" includes="${dir.pattern.list}"/>
>
> The problem is that the property gets evaluated before my initialization
> task can set it.  Is there any straightforward way to dynamically set
> this property before the patternset definition evaluates it?
>
> Thanks, Mike
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>