desruisseaux commented on code in PR #618:
URL: https://github.com/apache/maven-jar-plugin/pull/618#discussion_r4294873221
##########
src/main/java/org/apache/maven/plugins/jar/ToolExecutor.java:
##########
@@ -352,14 +351,13 @@ private boolean sanitizeAutomaticModuleName(Manifest
manifest) {
mainAttributes.remove(Attributes.Name.MULTI_RELEASE);
}
if (isReproducible()) {
- // If a "Created-By" attribute was generated by Maven
Archiver, it is assumed JDK-independent.
- // Otherwise, substitute by another value which does not
depend on the JDK.
+ // For reproducible builds, set "Created-By" to a
JDK-independent value if not already present.
if (mainAttributes.getValue(CREATED_BY) == null) {
mainAttributes.putValue(CREATED_BY, createdBy());
}
} else {
// If reproducible build was not requested, let the tool
declares itself.
- // This is a workaround until we port Maven archiver to this
JAR plugin.
+ // Remove any value set by ManifestBuilder so that the `jar`
tool can add its own JDK-stamped value.
Review Comment:
Keep the old comment saying that this is a workaround (possibly with
edition), or resolve the issue described in the comment. The issue is that the
work done by this method should be done by the new archiver code. It is okay to
do that in a future commit, but we need to remember that we should do that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]