ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: [PATCH] ejb/ to use Jar task
Date Wed, 28 Feb 2001 11:05:17 GMT

Some comments.

I am pretty much against further use of this construct.
 Jar jarTask = (Jar) getTask().getProject().createTask( "jar" );

I think a better approach would be to refactor the jar'ing code out of the
Jar task into a utility class. This jaring would then be available as part
of the core Ant services. I think then there would be a better approach
than creating and adding a zipfileset for each file that is to go into the
jar. You wouldn't need to be constrained by the interface made available by
the Jar task. Of course as part of the refactor the jar task would be
rewritten to use the new jaring service.

I know this is done in a lot of places in Ant now for exec and java
services but it is really not the right way to do it. There is an Execute
class in Ant which provides the Execute service used by the <exec> task. An
ExecuteJava is there for executing non-forking java classes as provided by
the <java> task. Having that handle both forked and non-forked java use may
be nicer. I'm a culprit here, I know, so I will be trying to eliminate all
my current uses of the above construct.

The fundamental problem with the construct is that a build file may
redefine a task by taskdef'ing it which shouldn't, but currently could,
break other tasks.

The other problem with your patch is that it removes the check for Inner
classes. These need to be included in the jar for it to be valid so it will
be necessary to have this code come back. Perhaps an initial iteration
which adds the inner classes to the set of files prior to jaring would


----- Original Message -----
From: "Fernando Padilla" <>
To: <>
Sent: Tuesday, February 27, 2001 4:49 PM
Subject: [PATCH] ejb/ to use Jar task

> hi. i promised a patch, I took my time so not to interrupt 1.3b.
> Attached is a patch to
> It used to have custom code to create Jar files.  I patched it to use the
> Jar task to create it's jar files now.
> have a look.
> fern


> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message