conor 01/08/09 23:11:42
Modified: . Tag: ANT_14_BRANCH build.xml
src/main/org/apache/tools/ant/taskdefs Tag: ANT_14_BRANCH
Jar.java
Log:
Add some logging on top of Stefan's fix
Revision Changes Path
No revision
No revision
1.175.2.2 +1 -1 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.175.2.1
retrieving revision 1.175.2.2
diff -u -r1.175.2.1 -r1.175.2.2
--- build.xml 2001/08/09 11:54:06 1.175.2.1
+++ build.xml 2001/08/10 06:11:42 1.175.2.2
@@ -16,7 +16,7 @@
<property name="name" value="ant"/>
<property name="version" value="1.4Beta1"/>
- <property name="debug" value="false" />
+ <property name="debug" value="true" />
<property name="deprecation" value="false" />
<property name="optimize" value="true" />
<property name="junit.fork" value="false" />
No revision
No revision
1.21.2.2 +7 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
Index: Jar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
retrieving revision 1.21.2.1
retrieving revision 1.21.2.2
diff -u -r1.21.2.1 -r1.21.2.2
--- Jar.java 2001/08/10 06:08:12 1.21.2.1
+++ Jar.java 2001/08/10 06:11:42 1.21.2.2
@@ -70,7 +70,9 @@
private File manifestFile;
private Manifest manifest;
- private Manifest execManifest;
+ private Manifest execManifest;
+
+ /** true if a manifest has been specified in the task */
private boolean buildFileManifest = false;
public Jar() {
@@ -279,6 +281,7 @@
theZipFile = new java.util.zip.ZipFile(zipFile);
java.util.zip.ZipEntry entry =
theZipFile.getEntry("META-INF/MANIFEST.MF");
if (entry == null) {
+ log("Updating jar since the current jar has no
manifest", Project.MSG_VERBOSE);
return false;
}
Manifest currentManifest = new
Manifest(theZipFile.getInputStream(entry));
@@ -286,11 +289,14 @@
manifest = getDefaultManifest();
}
if (!currentManifest.equals(manifest)) {
+ log("Updating jar since jar manifest has changed",
Project.MSG_VERBOSE);
return false;
}
}
catch (Exception e) {
// any problems and we will rebuild
+ log("Updating jar since cannot read current jar manifest: "
+ e.getClass().getName() + e.getMessage(),
+ Project.MSG_VERBOSE);
return false;
}
finally {