Skip to content

Commit be5e39b

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 52a5a06 commit be5e39b

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

pom.xml

+32-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</repositories>
9090

9191
<properties>
92-
92+
<project.build.outputTimestamp>2023-03-17T00:00:00Z</project.build.outputTimestamp>
9393
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
9494
<arguments/>
9595

@@ -452,7 +452,7 @@
452452
<plugin>
453453
<groupId>org.apache.maven.plugins</groupId>
454454
<artifactId>maven-shade-plugin</artifactId>
455-
<version>3.2.1</version>
455+
<version>3.2.3</version>
456456
<configuration>
457457
<shadedClassifierName>deprecated</shadedClassifierName>
458458
<shadedArtifactAttached>true</shadedArtifactAttached>
@@ -592,10 +592,39 @@
592592
<autoReleaseAfterClose>false</autoReleaseAfterClose>
593593
</configuration>
594594
</plugin>
595+
<plugin>
596+
<groupId>org.apache.maven.plugins</groupId>
597+
<artifactId>maven-clean-plugin</artifactId>
598+
<version>3.2.0</version>
599+
<executions>
600+
<execution>
601+
<!-- Rebuilding the manifest with the maven-bundle-plugin produces different results
602+
https://issues.apache.org/jira/browse/FELIX-6603
603+
Deleting the previously generated manifest is a temporary workaround.
604+
-->
605+
<id>bundle-manifest-fix</id>
606+
<phase>process-resources</phase>
607+
<goals>
608+
<goal>clean</goal>
609+
</goals>
610+
<configuration>
611+
<excludeDefaultDirectories>true</excludeDefaultDirectories>
612+
<filesets>
613+
<fileset>
614+
<directory>${project.build.outputDirectory}</directory>
615+
<includes>
616+
<include>META-INF/MANIFEST.MF</include>
617+
</includes>
618+
</fileset>
619+
</filesets>
620+
</configuration>
621+
</execution>
622+
</executions>
623+
</plugin>
595624
<plugin>
596625
<groupId>org.apache.felix</groupId>
597626
<artifactId>maven-bundle-plugin</artifactId>
598-
<version>3.3.0</version>
627+
<version>5.1.8</version>
599628
<executions>
600629
<execution>
601630
<id>bundle-manifest</id>

0 commit comments

Comments
 (0)