ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: task with arbitrary classpath
Date Tue, 13 Jun 2000 23:06:32 GMT

If you have a look at my Weblogic classes (ejbc and ddcreator) which I
posted a while back, you will see that the ant Task creates a separate
helper JVM to do the work. The necessary parameters are passed as command
line arguments to the helper JVM which runs a helper class. The classpath of
this JVM can be directly controlled, which was the reason I chose to do it
that way.

The relevant code is

String systemClassPath = System.getProperty("java.class.path");
String execClassPath = project.translatePath(systemClassPath + ":" +
Java ddCreatorTask = new Java();

Note that I add the classpath which has been used to invoke ant so that the
helper class can be found by the helper JVM.

Let me know if you need more info.


Conor MacNeill
Cortex eBusiness

> -----Original Message-----
> From: Jim Stiefel []
> Sent: Wednesday, 14 June 2000 7:53
> To:
> Subject: task with arbitrary classpath
> I am faced with an interesting problem I hope someone with more
> experience with ant might be able to help me solve.  I want to define a
> new ant task that will compare serial version UID's of freshly compiled
> classes to the same class files in a known baseline jar so that my build
> process can flag problems in serialization compatibility between our
> development version and our last release version.
> Retrieving the Serial Version UID is easy enough using
> The challenge is that the operation needs to
> be run twice with different classpaths.  In one case,  the classpath
> needs to include the baseline jar,  while in the second case,  it needs
> to include the newly built jar.
> Can someone suggest a simple or elegant way to accomplish this?
> Thanks,
>  Jim

View raw message