Bug 26921

Summary: problem running <borland> task on multiple ejb jars
Product: Ant Reporter: David LeRoy <David.LeRoy>
Component: Optional TasksAssignee: Ant Notifications List <notifications>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P3    
Version: 1.6.1   
Target Milestone: 1.8.0   
Hardware: All   
OS: All   

Description David LeRoy 2004-02-13 17:05:31 UTC
When the <borland> subtask is run on multiple directories to produce multiple 
ejb jars, each directory includes generated classes from the previous 
directories.

In other words, if the task is run on directories X, Y and Z, Y.jar contains 
classes from X and Z.jar contains classes from Y and Z.  If the task is run 
separately on X, Y and Z only the correct classes are included.

The files that are added are of the form:

    <*>POAInvokeHandler.class
    <*>POA.class
    <*>Operations.class
    <*>.class
    <*>.class

The problem seems to be in the writeJar() method in BorlandDeploymentTool.java:

...
_genfiles.clear();  // <--- added this line

buildBorlandStubs(homes.iterator());

//add the gen files to the collection
files.putAll(_genfiles);

super.writeJar(baseName, jarFile, files, publicId);
...

And the correct files were incorporated in ejb jars.  Not sure of this is the 
correct solution but it seems to be.
Comment 1 Stefan Bodewig 2008-07-10 07:54:50 UTC
I don't know whether the borland appserver is still around, but I know we won't have one around for testing.

The proposed change looks trivial and I feel like applying it to trunk - nobody is going to notice if I broke it anyway. ;-)

Furthermore it looks as if the patch was endorsed by BorlandDeploymentTool's original author http://www.moussaud.org/ejbjar.html

svn rev 675603