ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Q. Bridges" <ebrid...@citco.com>
Subject Re: setting project classpath from a task
Date Tue, 29 Mar 2005 22:31:39 GMT
bingo!!  worked like a charm.

thanks much!
--e--

Doklovic, Jonathan wrote:

>I had a similar issue.
>Here's what works for me:
>
>In your Task, set the path like this:
>
>Path myPath = new Path(getProject(), somePathString);
>myPath.setProject(getProject()); // you MUST do this or it doesn't seem to
>set the ref properly
>getProject().addReference("my.pathRef", myPath);
>
>Then in your build.xml you can just use a normal refid:
>
><path refid="my.pathRef" />
>
>Hope this helps!
>
>jonathanDoklovic
>seniorProgrammerAnalyst
>LimitedBrandsTechnologyServices
>http://www.victoriassecret.com
>
>
>-----Original Message-----
>From: Bridges, Ed NYC [mailto:EBridges@citco.com] 
>Sent: Tuesday, March 29, 2005 10:47 AM
>To: 'user@ant.apache.org'
>Subject: setting project classpath from a task
>
>Hi,
> 
>I have a task that maintains dependent jars for a project, and would like to
>be able to set a classpath from within the task that the project would use
>for compiling.
> 
>I've tried declaring a <path> element with a refid, and then setting the
>value for that refid from within the task by using project.addReference()
>and the refid name.
> 
>I've also tried declaring a <property> element, and assigning that by name
>and by refid, to no avail.
> 
>I'm kind of at a loss for how to do this.  Please advise.
> 
>Thanks
>--ed
>This e-mail message, and any enclosures, is intended only for the persons to
>whom it is addressed, and may contain information which is confidential
>and/or privileged. Any use, distribution, modification, copying or
>disclosure by any other person is strictly prohibited. If you receive this
>message in error, please notify the sender by return e-mail and delete this
>message from your computer. Emphasis Software Development, Inc. disclaims
>all responsibility from and accepts no liability whatsoever for the
>consequences of any unauthorized person acting, or refraining from acting,
>on any information contained in this message.
>
> 
>
>
>---------------------------------------------------------------------
>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


Mime
View raw message