ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Lohman <dloh...@ind.alcatel.com>
Subject RE: <path/> depends attribute workaround available?
Date Mon, 22 Jan 2001 22:31:27 GMT
Thanks for the reply.

The reason I want to do this:

The <path/> task is depending on property ${lib.dir} to build the classpath.
In cases where ${lib.dir} did not exist I want to do a mkdir otherwise the
build fails. I was looking for a way to create the required dirs prior to
<path/> executing.

I will try your script solution.

-Dan

> -----Original Message-----
> From: Nico Seessle [mailto:Nico.Seessle@epost.de]
> Sent: Monday, January 22, 2001 1:49 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: <path/> depends attribute workaround available?
> 
> 
> ----- Original Message -----
> From: "Dan Lohman" <dlohman@ind.alcatel.com>
> To: <ant-user@jakarta.apache.org>
> Sent: Monday, January 22, 2001 8:28 PM
> Subject: <path/> depends attribute workaround available?
> 
> 
> > The <path/> element does not support depends attribute is there a
> > workaround?
> > use case:
> > I would like to execute init and prepare targets prior to <path/>
> execution.
> >
> 
> Why do you want to do this? Do you want your path depend on a 
> property? If
> nothing happened to this in the meantime (I don't think so) 
> you can't do
> this. You can do this using a <script> like this:
> 
>     <script language="javascript"> <![CDATA[
>         dir = myProject.getProperty('base.path') + '/' +
> myProject.getProperty('subDir');
>         file = new java.io.File(dir);
>         path = myProject.createDataType('path');
>         fileset = myProject.createDataType('fileset');
>         fileset.setDir(file);
>         fileset.setIncludes('*.xml');
>         path.addFileset(fileset);
>         myProject.addReference('xml-files', path);
>     ]]></script>
> 
> Nico
> 
> 
> 

Mime
View raw message