Bug 26921 - problem running <borland> task on multiple ejb jars
problem running <borland> task on multiple ejb jars
Status: RESOLVED FIXED
Product: Ant
Classification: Unclassified
Component: Optional Tasks
1.6.1
All All
: P3 minor (vote)
: 1.8.0
Assigned To: Ant Notifications List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2004-02-13 17:05 UTC by David LeRoy
Modified: 2008-07-10 07:54 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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