conor 01/08/08 04:43:35
Modified: src/main/org/apache/tools/ant/taskdefs/optional/ejb
DescriptorHandler.java GenericDeploymentTool.java
Log:
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 <[EMAIL PROTECTED]>
Revision Changes Path
1.11 +2 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java
Index: DescriptorHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DescriptorHandler.java 2001/06/27 13:09:58 1.10
+++ DescriptorHandler.java 2001/08/08 11:43:35 1.11
@@ -338,7 +338,8 @@
// 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);
1.22 +3 -4
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
Index: GenericDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- GenericDeploymentTool.java 2001/08/02 12:53:51 1.21
+++ GenericDeploymentTool.java 2001/08/08 11:43:35 1.22
@@ -262,10 +262,9 @@
}
}
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