[
https://issues.apache.org/jira/browse/FELIX-6304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157975#comment-17157975
]
Jochen Schalanda commented on FELIX-6304:
-----------------------------------------
Digging into the sources, I found that it's possible to produce JAR archives
with constant timestamps when passing the parameter *-reproducible* in the *BND
instructions*:
{code:java}
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- https://stackoverflow.com/a/29853163/49505 -->
<_removeheaders>Bnd-LastModified</_removeheaders>
<_reproducible>true</_reproducible>
</instructions>
</configuration>
</plugin>
{code}
It would be great if this could either be documented properly or a
configuration setting for maven-bundle-plugin would exist to enable the
*-reproducible* flag.
> bundle:bundle generates non-reproducible JAR archives (timestamps)
> ------------------------------------------------------------------
>
> Key: FELIX-6304
> URL: https://issues.apache.org/jira/browse/FELIX-6304
> Project: Felix
> Issue Type: Bug
> Components: Maven Bundle Plugin
> Affects Versions: maven-bundle-plugin-5.1.1
> Reporter: Jochen Schalanda
> Priority: Major
> Labels: reproducible-builds
>
> The JAR archives built by maven-bundle-plugin are not reproducible (as in
> reproducible builds) because the timestamps of their entries are variable and
> are using the current system time.
> The maven-jar-plugin supports using a fixed timestamp via the
> [outputTimestamp|https://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html#outputTimestamp]
> setting (default: {{${project.build.outputTimestamp}}}) while the
> maven-bundle-plugin doesn't expose a similar setting.
> Support for reproducible builds in the maven-jar-plugin was added with this
> commit:
> [https://github.com/apache/maven-jar-plugin/commit/64c5e6530b4712cd95501fffb2de6bb1a202cd89]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)