ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter West <li...@pbw.id.au>
Subject Classpath for taskdef'd tasks
Date Sun, 10 Jun 2012 09:54:23 GMT
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


Mime
View raw message