* Build: Add built-by to jars; check for corrupt jars on debug page

This commit is contained in:
zzz
2012-03-01 16:04:17 +00:00
parent 5af6c97bee
commit cadedeb06c
16 changed files with 44 additions and 2 deletions

View File

@ -92,6 +92,7 @@
<!-- DTG added in 0.8.4, not in the classpath for very old installs, before we changed wrapper.config to specify * -->
<attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.j.tr}" />
@ -172,6 +173,7 @@
basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, *.jsi, web-fragment.xml, web-out.xml">
<manifest>
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.w.tr}" />

View File

@ -18,6 +18,7 @@ import java.util.jar.Manifest;
import net.i2p.crypto.SHA256Generator;
import net.i2p.data.DataHelper;
import net.i2p.util.FileUtil;
/**
* Dump info on jars and wars
@ -29,7 +30,7 @@ public class FileDumpHelper extends HelperBase {
public String getFileSummary() {
StringBuilder buf = new StringBuilder(16*1024);
buf.append("<table><tr><th>File</th><th>Size</th><th>Date</th><th>SHA 256</th><th>Revision</th>" +
"<th>JDK</th><th>Built</th><th>Mods</th></tr>");
"<th>JDK</th><th>Built</th><th>By</th><th>Mods</th></tr>");
// jars added in wrapper.config
URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
@ -95,7 +96,9 @@ public class FileDumpHelper extends HelperBase {
buf.append((new Date(mod)).toString());
else
buf.append("<font color=\"red\">Not found</font>");
buf.append("</td><td>");
buf.append("</td><td align=\"center\">");
if (mod > 0 && !FileUtil.verifyZip(f))
buf.append("<font color=\"red\">CORRUPT</font><br>");
byte[] hash = sha256(f);
if (hash != null) {
byte[] hh = new byte[16];
@ -132,6 +135,10 @@ public class FileDumpHelper extends HelperBase {
buf.append(s);
buf.append("</td><td>");
s = getAtt(att, "Build-Date");
if (s != null)
buf.append(s);
buf.append("</td><td align=\"center\">");
s = getAtt(att, "Built-By");
if (s != null)
buf.append(s);
buf.append("</td><td><font color=\"red\">");