Skip to content

Commit

Permalink
Updating build to be reproducible
Browse files Browse the repository at this point in the history
Multiple builds (without changes) will produce the same output (e.g. the hash of the jars will be identical)
  • Loading branch information
bdemers committed Feb 7, 2024
1 parent 2694861 commit 1f1aa23
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions pom.xml
Expand Up @@ -89,6 +89,8 @@

<properties>

<!-- This date is automatically updated by the release and versions plugins -->
<project.build.outputTimestamp>2024-02-17T00:00:00Z</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<arguments />

Expand All @@ -105,6 +107,7 @@
<gmavenplus.version>1.6.1</gmavenplus.version> <!-- higher version used in jdk8AndLater profile below -->
<maven.license.version>4.2.rc3</maven.license.version>
<maven.license.skipExistingHeaders>true</maven.license.skipExistingHeaders>
<felix.version>5.1.9</felix.version>

<jdk.version>7</jdk.version>
<buildNumber>${user.name}-${maven.build.timestamp}</buildNumber>
Expand Down Expand Up @@ -466,7 +469,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.2.3</version>
<configuration>
<shadedClassifierName>deprecated</shadedClassifierName>
<shadedArtifactAttached>true</shadedArtifactAttached>
Expand Down Expand Up @@ -639,10 +642,39 @@
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<!-- Rebuilding the manifest with the maven-bundle-plugin produces different results
https://issues.apache.org/jira/browse/FELIX-6603
Deleting the previously generated manifest is a temporary workaround.
-->
<id>bundle-manifest-fix</id>
<phase>process-resources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.build.outputDirectory}</directory>
<includes>
<include>META-INF/MANIFEST.MF</include>
</includes>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.5.0</version>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down Expand Up @@ -678,6 +710,7 @@
<properties>
<maven.jar.version>3.2.2</maven.jar.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<felix.version>3.5.1</felix.version>
<orgjson.version>20230618</orgjson.version>
<bcprov.artifactId>bcprov-jdk15to18</bcprov.artifactId>
<bcpkix.artifactId>bcpkix-jdk15to18</bcpkix.artifactId>
Expand Down

0 comments on commit 1f1aa23

Please sign in to comment.