Skip to content

Commit 1f1aa23

Browse files
committed
Updating build to be reproducible
Multiple builds (without changes) will produce the same output (e.g. the hash of the jars will be identical)
1 parent 2694861 commit 1f1aa23

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

pom.xml

+35-2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989

9090
<properties>
9191

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

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

109112
<jdk.version>7</jdk.version>
110113
<buildNumber>${user.name}-${maven.build.timestamp}</buildNumber>
@@ -466,7 +469,7 @@
466469
<plugin>
467470
<groupId>org.apache.maven.plugins</groupId>
468471
<artifactId>maven-shade-plugin</artifactId>
469-
<version>3.2.1</version>
472+
<version>3.2.3</version>
470473
<configuration>
471474
<shadedClassifierName>deprecated</shadedClassifierName>
472475
<shadedArtifactAttached>true</shadedArtifactAttached>
@@ -639,10 +642,39 @@
639642
<autoReleaseAfterClose>false</autoReleaseAfterClose>
640643
</configuration>
641644
</plugin>
645+
<plugin>
646+
<groupId>org.apache.maven.plugins</groupId>
647+
<artifactId>maven-clean-plugin</artifactId>
648+
<version>3.3.2</version>
649+
<executions>
650+
<execution>
651+
<!-- Rebuilding the manifest with the maven-bundle-plugin produces different results
652+
https://issues.apache.org/jira/browse/FELIX-6603
653+
Deleting the previously generated manifest is a temporary workaround.
654+
-->
655+
<id>bundle-manifest-fix</id>
656+
<phase>process-resources</phase>
657+
<goals>
658+
<goal>clean</goal>
659+
</goals>
660+
<configuration>
661+
<excludeDefaultDirectories>true</excludeDefaultDirectories>
662+
<filesets>
663+
<fileset>
664+
<directory>${project.build.outputDirectory}</directory>
665+
<includes>
666+
<include>META-INF/MANIFEST.MF</include>
667+
</includes>
668+
</fileset>
669+
</filesets>
670+
</configuration>
671+
</execution>
672+
</executions>
673+
</plugin>
642674
<plugin>
643675
<groupId>org.apache.felix</groupId>
644676
<artifactId>maven-bundle-plugin</artifactId>
645-
<version>3.5.0</version>
677+
<version>5.1.9</version>
646678
<executions>
647679
<execution>
648680
<id>bundle-manifest</id>
@@ -678,6 +710,7 @@
678710
<properties>
679711
<maven.jar.version>3.2.2</maven.jar.version>
680712
<maven.compiler.version>3.8.1</maven.compiler.version>
713+
<felix.version>3.5.1</felix.version>
681714
<orgjson.version>20230618</orgjson.version>
682715
<bcprov.artifactId>bcprov-jdk15to18</bcprov.artifactId>
683716
<bcpkix.artifactId>bcpkix-jdk15to18</bcpkix.artifactId>

0 commit comments

Comments
 (0)