ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter West <...@pbw.id.au>
Subject Re: Classpath for taskdef'd tasks
Date Mon, 11 Jun 2012 04:07:40 GMT
Thanks Rainer. I'll take a look.

Peter West

"Are not all these who are speaking Galileans?"

On 11/06/2012, at 4:55 AM, Rainer Noack wrote:

> Maybe you will take a look at
> 
> http://enitsys.sourceforge.net/ant-classloadertask/
> 
> a little older, but works fine.
> (classloaderreport is broken with ant 1.8.x)
> 
> Am 10.06.2012 11:54, schrieb Peter West:
>> I'm looking at a complex build that builds a jar file with a collection of classes,
then runs a series of tests on the distribution that will include that jar.  The tests affectively
mirror what users of the distribution will be doing.
>> 
>> When I do not have the generated jar in the startup classpath for the build, I can
generate the jar file, define the tasks in terms of the jar file's classes, and begin to execute
particular taskdef'd tasks. All good, and the classes are discovered.
>> 
>> However, within the executing task, other classes from the jar are required. The
attempt to load the first of these classes fails. It seems that within the executing task,
even though the classpath for the execution of that task requires the new jar file, that class
environment is lost. Hence the requirement for the initial classpath entry. Or so I believe.
>> 
>> Is this correct? What is happening within the executing task that resets the classpath
environment?
>> 
>> Is there a way around this, such that I can define the classpath within the build?
One possibility is to fork ant via a java task for the testing phase, but I am looking for
other alternatives.
>> 
>> Is antlib relevant to this problem?
>> 
>> 
>> Peter West
>> 
>> "Are not all these who are speaking Galileans?"
>> 
>> 
>> ---------------------------------------------------------------------
>> 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