Browse Source

Ignore any classes from java. and javax hierarchies. This allows

classes such as java.math.BigDecimal to be used as keys.

I also turned the missing file exception into a warning. Who knows
maybe the app server can find it even if ejbjar can't.

Submitted by:	Luis Miguel Hernanz <luish@germinus.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269516 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
2030358e5e
2 changed files with 5 additions and 5 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java
  2. +3
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java

+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java View File

@@ -338,7 +338,8 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {

// If it's a primitive wrapper then we shouldn't try and put
// it into the jar, so ignore it.
if (!className.startsWith("java.lang")) {
if (!className.startsWith("java.") &&
!className.startsWith("javax.")) {
// Translate periods into path separators, add .class to the
// name, create the File object and add it to the Hashtable.
className = className.replace('.', File.separatorChar);


+ 3
- 4
src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java View File

@@ -262,10 +262,9 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
}
}
catch (IOException ioe) {
String msg = "IOException while adding entry "
+ logicalFilename + " to jarfile from " + inputFile.getPath() + "."
+ ioe.getMessage();
throw new BuildException(msg, ioe);
log("WARNING: IOException while adding entry " +
logicalFilename + " to jarfile from " + inputFile.getPath() + " " +
ioe.getClass().getName() + "-" + ioe.getMessage(), Project.MSG_WARN);
}
finally {
// Close up the file input stream for the class file


Loading…
Cancel
Save