Fern, 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 work. Conor ----- Original Message ----- From: "Fernando Padilla" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 27, 2001 4:49 PM Subject: [PATCH] ejb/GenericDeploymentTool.java to use Jar task > > hi. i promised a patch, I took my time so not to interrupt 1.3b. > > Attached is a patch to > org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool > > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
