File: 02-reproducible-jpms-args.patch

package info (click to toggle)
maven-compiler-plugin 3.10.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,348 kB
  • sloc: xml: 4,203; java: 4,111; makefile: 3; sh: 1
file content (14 lines) | stat: -rw-r--r-- 696 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Description: Use relative paths in the generated jpms.args files to make the builds reproducible
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://issues.apache.org/jira/browse/MCOMPILER-397
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -1078,7 +1078,7 @@
                 if ( value == null )
                 {
                     entry = entryIter.next();
-                    value = entry.getKey();
+                    value = entry.getKey().replaceAll( new File("").getAbsolutePath(), "." );
                 }
                 jpmsLines.add( value );
             }