Skip to content

Commit 11c953b

Browse files
authored
Remove environment-specific manifest entries (#147)
These make it hard to support reproducible builds
1 parent 4111cb7 commit 11c953b

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

  • takari-lifecycle-plugin/src

takari-lifecycle-plugin/src/main/java/io/takari/maven/plugins/jar/Jar.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ private Iterable<ExtendedArchiveEntry> jarManifestSource(MavenProject project) t
242242
main.putValue("Manifest-Version", "1.0");
243243
main.putValue("Archiver-Version", "Provisio Archiver");
244244
main.putValue("Created-By", "Takari Inc.");
245-
main.putValue("Built-By", System.getProperty("user.name"));
246-
main.putValue("Build-Jdk", System.getProperty("java.version"));
247245
main.putValue("Specification-Title", project.getArtifactId());
248246
main.putValue("Specification-Version", project.getVersion());
249247
main.putValue("Implementation-Title", project.getArtifactId());

takari-lifecycle-plugin/src/test/java/io/takari/maven/plugins/jar/JarTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import static io.takari.maven.testing.TestResources.create;
66
import static org.junit.Assert.assertEquals;
77
import static org.junit.Assert.assertFalse;
8-
import static org.junit.Assert.assertNotNull;
98
import static org.junit.Assert.assertNull;
109
import static org.junit.Assert.assertTrue;
1110
import static org.junit.Assert.fail;
@@ -105,8 +104,6 @@ public void jarCreation() throws Exception {
105104
if (manifestEntry != null) {
106105
InputStream is = zip1.getInputStream(manifestEntry);
107106
Manifest p = new Manifest(is);
108-
assertNotNull(p.getMainAttributes().getValue("Built-By"));
109-
assertNotNull(p.getMainAttributes().getValue("Build-Jdk"));
110107
assertEquals("1.0", p.getMainAttributes().getValue("Manifest-Version"));
111108
assertEquals("test", p.getMainAttributes().getValue("Implementation-Title"));
112109
assertEquals("1.0", p.getMainAttributes().getValue("Implementation-Version"));
@@ -286,8 +283,6 @@ public void testCustomManifestEntries() throws Exception {
286283
try (JarFile jar = new JarFile(new File(basedir, "target/test-1.0.jar"))) {
287284
Manifest mf = jar.getManifest();
288285
Attributes main = mf.getMainAttributes();
289-
assertNotNull(main.getValue("Built-By"));
290-
assertNotNull(main.getValue("Build-Jdk"));
291286
assertEquals("1.0", main.getValue("Manifest-Version"));
292287
assertEquals("test", main.getValue("Implementation-Title"));
293288
assertEquals("1.0", main.getValue("Implementation-Version"));

0 commit comments

Comments
 (0)