|
|
@@ -46,6 +46,7 @@ import java.util.zip.ZipFile; |
|
|
|
import org.apache.tools.ant.BuildException; |
|
|
|
import org.apache.tools.ant.Project; |
|
|
|
import org.apache.tools.ant.taskdefs.Manifest.Section; |
|
|
|
import org.apache.tools.ant.types.ArchiveFileSet; |
|
|
|
import org.apache.tools.ant.types.EnumeratedAttribute; |
|
|
|
import org.apache.tools.ant.types.FileSet; |
|
|
|
import org.apache.tools.ant.types.Path; |
|
|
@@ -1176,6 +1177,18 @@ public class Jar extends Zip { |
|
|
|
} |
|
|
|
for (int j = 0; j < resources[0].length; j++) { |
|
|
|
String name = resources[0][j].getName().replace('\\', '/'); |
|
|
|
if (rcs[i] instanceof ArchiveFileSet) { |
|
|
|
ArchiveFileSet afs = (ArchiveFileSet) rcs[i]; |
|
|
|
if (!"".equals(afs.getFullpath(getProject()))) { |
|
|
|
name = afs.getFullpath(getProject()); |
|
|
|
} else if (!"".equals(afs.getPrefix(getProject()))) { |
|
|
|
String prefix = afs.getPrefix(getProject()); |
|
|
|
if (!prefix.endsWith("/") && !prefix.endsWith("\\")) { |
|
|
|
prefix += "/"; |
|
|
|
} |
|
|
|
name = prefix + name; |
|
|
|
} |
|
|
|
} |
|
|
|
if (name.equalsIgnoreCase(MANIFEST_NAME)) { |
|
|
|
manifests[i] = new Resource[] {resources[0][j]}; |
|
|
|
break; |
|
|
|