Browse Source

Make both ddcreator and ejbc respect the hierarchy of the descriptors.

So, when writing the .ser file, it will be placed into the same relative
directory in which the source .txt file is found in the descriptor hierarchy.
Similary the .ser files will have the correct manifest entires in the generated
manifest file.


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

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

@@ -116,8 +116,7 @@ public class DDCreatorHelper {
for (int i = 0; i < descriptors.length; ++i) { for (int i = 0; i < descriptors.length; ++i) {
String descriptorName = descriptors[i]; String descriptorName = descriptors[i];
File descriptorFile = new File(descriptorDirectory, descriptorName); File descriptorFile = new File(descriptorDirectory, descriptorName);
// flatten the generated file so all go into the
descriptorName = descriptorFile.getName();

int extIndex = descriptorName.lastIndexOf("."); int extIndex = descriptorName.lastIndexOf(".");
String serName = null; String serName = null;
if (extIndex != -1) { if (extIndex != -1) {
@@ -132,7 +131,7 @@ public class DDCreatorHelper {
if (!serFile.exists() || serFile.lastModified() < descriptorFile.lastModified()) { if (!serFile.exists() || serFile.lastModified() < descriptorFile.lastModified()) {
String[] args = {"-noexit", String[] args = {"-noexit",
"-d", generatedFilesDirectory.getPath(),
"-d", serFile.getParent(),
"-outputfile", serFile.getName(), "-outputfile", serFile.getName(),
descriptorFile.getPath()}; descriptorFile.getPath()};
try { try {


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

@@ -256,7 +256,7 @@ public class EjbcHelper {
else { else {
System.out.println(descriptorFile.getName() + " is up to date"); System.out.println(descriptorFile.getName() + " is up to date");
} }
manifest += "Name: " + descriptorFile.getName() + "\nEnterprise-Bean: True\n\n";
manifest += "Name: " + descriptorName.replace('\\', '/') + "\nEnterprise-Bean: True\n\n";
} }
FileWriter fw = new FileWriter(manifestFile); FileWriter fw = new FileWriter(manifestFile);


Loading…
Cancel
Save