diff --git a/WHATSNEW b/WHATSNEW
index 1fa3f076c..6348841c6 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -83,6 +83,9 @@ Fixed bugs:
references.
Bugzilla Reports 48961 and 49079
+ * was broken on Windows.
+ Bugzilla Report 49090
+
Other changes:
--------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/Jar.java b/src/main/org/apache/tools/ant/taskdefs/Jar.java
index 92f6672ef..772e89c7f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Jar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Jar.java
@@ -813,7 +813,15 @@ public class Jar extends Zip {
// manifest this means we claim an update was needed and
// only include the manifests, skipping any uptodate
// checks here defering them for the second run
- return new ArchiveState(true, grabManifests(rcs));
+ Resource[][] manifests = grabManifests(rcs);
+ int count = 0;
+ for (int i = 0; i < manifests.length; i++) {
+ count += manifests[i].length;
+ }
+ log("found a total of " + count + " manifests in "
+ + manifests.length + " resource collections",
+ Project.MSG_VERBOSE);
+ return new ArchiveState(true, manifests);
}
// need to handle manifest as a special check
@@ -1167,7 +1175,8 @@ public class Jar extends Zip {
});
}
for (int j = 0; j < resources[0].length; j++) {
- if (resources[0][j].getName().equalsIgnoreCase(MANIFEST_NAME)) {
+ String name = resources[0][j].getName().replace('\\', '/');
+ if (name.equalsIgnoreCase(MANIFEST_NAME)) {
manifests[i] = new Resource[] {resources[0][j]};
break;
}
diff --git a/src/tests/antunit/taskdefs/jar-test.xml b/src/tests/antunit/taskdefs/jar-test.xml
index 82c0a7edf..2c22743c4 100644
--- a/src/tests/antunit/taskdefs/jar-test.xml
+++ b/src/tests/antunit/taskdefs/jar-test.xml
@@ -193,4 +193,18 @@
+
+
+
+
+
+
+
+
+
+
+