ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rainer Noack" <rai...@noacks.net>
Subject RE: classpath for custom Ant tasks
Date Wed, 13 Apr 2005 18:54:14 GMT
Michael,

Some times ago I wrote a <classloader/> task for ant.
This task has a report functionality which gives you the information you
want and some more
possibilities to solve classpath-related problems.

There is a chance that it will be released in Ant 1.7. (see
http://wiki.apache.org/ant/Ant17/Planning).
You will find the patch at
http://issues.apache.org/bugzilla/show_bug.cgi?id=28228 .
If you create Ant from CVS you can apply the patch.

Maybe someone can give you the task as a separate jar (Sorry, I'm not able
to do this at the moment).
Try mailto:gabriele.garuglieri@infoblu.it who has voted for this patch.

Rainer

P.S.: if you find the task useful, vote for the patch.


> -----Original Message-----
> From: Michael Pelz Sherman [mailto:mpelzsherman@yahoo.com] 
> Sent: Wednesday, April 13, 2005 8:05 PM
> To: Ant Users List; rainer@noacks.net
> Subject: RE: classpath for custom Ant tasks
> 
> 
> Thanks, Rainer.
> 
> All I can tell you is the only way I can get my task to work 
> is by adding the necessary entries to my System $CLASSPATH. 
> I'll check again, but I'm pretty darn sure the classpath 
> entries in my <taskdef/> are correct.
> 
> Is there any way to print out the "special" classpath being 
> used by an ant task?
> 
> - Michael
> 
> --- Rainer Noack <rainer@noacks.net> wrote:
> > Michael,
> > Java.class.path allways shows the System classpath (i.e. 
> typically the 
> > one you define via $CLASSPATH plus ant/lib). If you define 
> a classpath 
> > in a <taskdef/>, a "special" classloader is created for your task.
> > In "normal" situations this should work as expected.
> > An ant-speciality: If an classpath entry does not exist at 
> the moment you
> > define it, it will (silently) removed from
> > the classpath.
> > Cheers
> > Rainer
> > 
> > > -----Original Message-----
> > > From: Michael Pelz Sherman [mailto:mpelzsherman@yahoo.com]
> > > Sent: Wednesday, April 13, 2005 9:23 AM
> > > To: Ant Users List; Mark Lybarger
> > > Subject: Re: classpath for custom Ant tasks
> > > 
> > > 
> > > Thanks,
> > > 
> > > I tried this but it doesn't seem to help. By printing out
> > > System.getProperty("java.class.path") from within my task, it
> > > seems that the taskdef classpath argument isn't picking up 
> > > the values I put in there. The only way I can seem to effect 
> > > changes to the classpath of the running task is by changing 
> > > the $CLASSPATH in my shell (which I'd rather avoid if possible).
> > > 
> > > Any suggestions? Really appreciate the help!
> > > 
> > > - Michael
> > > 
> > > --- Mark Lybarger <mlybarger@gmail.com> wrote:
> > > > have you looked at the taskdef ? it's a typedef and as 
> such takes 
> > > > a classpath
> > > > 
> > > > On 4/12/05, Michael Pelz Sherman <mpelzsherman@yahoo.com> wrote:
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I'm writing a custom Ant task that has dependencies on our 
> > > > > custom libraries.
> > > > > 
> > > > > Is there some way I can define or code the task so it 
> can take a 
> > > > > "classpath" and/or "classpathref" argument?
> > > > > 
> > > > > Thanks,
> > > > > - Michael
> > > > > 
> > > > > 
> > > 
> --------------------------------------------------------------------
> > > > > -
> > > > > 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
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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