Skip to content

Commit

Permalink
Add dependencies for reproducible builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ubhaller committed Sep 10, 2020
1 parent e0500b6 commit acc7d6a
Showing 1 changed file with 65 additions and 1 deletion.
66 changes: 65 additions & 1 deletion dpppt-backend-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>

</dependencies>

<dependencyManagement>
Expand All @@ -110,6 +109,10 @@
</repositories>

<build>
<finalName>
dpppt-backend-shared
</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -119,6 +122,67 @@
<target>${java-version}</target>
</configuration>
</plugin>

<!-- Reproducible Builds -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<executions>
<execution>
<id>retrieve-git-info</id>
<phase>prepare-package</phase>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<injectAllReactorProjects>true</injectAllReactorProjects>
<runOnlyOnce>true</runOnlyOnce>
<skipPoms>false</skipPoms>
<dateFormat>yyyyMMddHHmmss</dateFormat>
<dateFormatTimeZone>UTC</dateFormatTimeZone>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Last-Commit-Id>${git.commit.id}</Last-Commit-Id>
<Last-Commit-Time>${git.commit.time}</Last-Commit-Time>
<Reproducible-Build>true</Reproducible-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.12</version>
<executions>
<execution>
<id>strip-jaxb</id>
<goals>
<goal>strip-jaxb</goal>
</goals>
</execution>
<execution>
<id>strip-jar</id>
<goals>
<goal>strip-jar</goal>
</goals>
<configuration>
<zipDateTime>${git.commit.time}</zipDateTime>
<!-- Set custom date/time format pattern, "yyyyMMddHHmmss" by default -->
<!-- <zipDateTimeFormatPattern>yyyyMMddHHmmss</zipDateTimeFormatPattern> -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit acc7d6a

Please sign in to comment.