[
https://issues.apache.org/jira/browse/BEAM-3422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317824#comment-16317824
]
ASF GitHub Bot commented on BEAM-3422:
--------------------------------------
jbonofre closed pull request #4365: [BEAM-3422] Update
reproducible-build-maven-plugin to version 0.4
URL: https://github.com/apache/beam/pull/4365
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/pom.xml b/pom.xml
index 987a995fd71..776810877c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -172,7 +172,7 @@
<maven-license-plugin.version>1.13</maven-license-plugin.version>
<maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
<maven-shade-plugin.version>3.0.0</maven-shade-plugin.version>
-
<reproducible-build-maven-plugin.version>0.3</reproducible-build-maven-plugin.version>
+
<reproducible-build-maven-plugin.version>0.4</reproducible-build-maven-plugin.version>
<compiler.error.flag>-Werror</compiler.error.flag>
<compiler.default.pkginfo.flag>-Xpkginfo:always</compiler.default.pkginfo.flag>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> The jar files uploaded to maven do not work with Java 9
> -------------------------------------------------------
>
> Key: BEAM-3422
> URL: https://issues.apache.org/jira/browse/BEAM-3422
> Project: Beam
> Issue Type: Sub-task
> Components: build-system
> Affects Versions: 2.2.0
> Environment: OSX Darwin 17.3.0
> Reporter: Chris Heisterkamp
> Assignee: Ismaël Mejía
> Fix For: 2.3.0
>
>
> The apache beam jars uploaded to maven have invalid date modified times in
> the jar files and cannot be loaded by JDK 9 because of
> https://bugs.openjdk.java.net/browse/JDK-8184940. I've submitted a new bug
> to http://bugreport.java.com asking that the fix be back ported to the next
> Java 9 release.
> In the meantime, can you repackage the jars with valid modified times? And
> uploaded fixed jars to Maven?
> To reproduce you just need to put one of the jars on the classpath for javac.
> So far I've found the following jars on maven central are affected.
> beam-runners-google-cloud-dataflow-java-2.2.0.jar
> beam-sdks-common-runner-api-2.2.0.jar
> beam-sdks-java-core-2.2.0.jar
> beam-sdks-java-extensions-google-cloud-platform-core-2.2.0.jar
> beam-sdks-java-extensions-protobuf-2.2.0.jar
> beam-sdks-java-io-google-cloud-platform-2.2.0.jar
> e.g.
> ```
> > curl -O
> > http://central.maven.org/maven2/org/apache/beam/beam-sdks-java-core/2.2.0/beam-sdks-java-core-2.2.0.jar
> > javac -cp beam-sdks-java-core-2.2.0.jar HelloWorld.java
> An exception has occurred in the compiler (9.0.1). Please file a bug against
> the Java compiler via the Java bug reporting page (http://bugreport.java.com)
> after checking the Bug Database (http://bugs.java.com) for duplicates.
> Include your program and the following diagnostic in your report. Thank you.
> java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 -
> 12): 0
> at
> java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)
> at
> java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:714)
> at java.base/java.time.LocalDate.of(LocalDate.java:269)
> at java.base/java.time.LocalDateTime.of(LocalDateTime.java:336)
> at jdk.zipfs/jdk.nio.zipfs.ZipUtils.dosToJavaTime(ZipUtils.java:109)
> at
> jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$Entry.cen(ZipFileSystem.java:1950)
> at
> jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$Entry.readCEN(ZipFileSystem.java:1937)
> at
> jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.getEntry(ZipFileSystem.java:1324)
> at
> jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.newInputStream(ZipFileSystem.java:550)
> at
> jdk.zipfs/jdk.nio.zipfs.JarFileSystem.isMultiReleaseJar(JarFileSystem.java:91)
> at jdk.zipfs/jdk.nio.zipfs.JarFileSystem.<init>(JarFileSystem.java:67)
> at
> jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:134)
> at
> jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:517)
> at
> jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:319)
> at
> jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:715)
> at
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:722)
> at
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:648)
> at
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:529)
> at
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:293)
> at
> jdk.compiler/com.sun.tools.javac.code.Symtab.lambda$addRootPackageFor$7(Symtab.java:758)
> at
> jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
> at
> jdk.compiler/com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:354)
> at
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:529)
> at
> jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:285)
> at
> jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:300)
> at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:570)
> at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:554)
> at
> jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1052)
> at
> jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:923)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:302)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:162)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
> > java -version
> java version "9.0.1"
> Java(TM) SE Runtime Environment (build 9.0.1+11)
> Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
> ```
> Unpacking and re-creating the jar with JDK 8 fixes the problem on OSX
> jar -xf beam-sdks-java-core-2.2.0.jar
> jar -cf beam-sdks-java-core-2.2.0.jar .
> You call also use the JarTime.java test from
> https://bugs.openjdk.java.net/browse/JDK-8184940 to look at the modified
> dates for the jar entries.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)