[ https://issues.apache.org/jira/browse/MJAVADOC-703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17461642#comment-17461642 ]
Thorsten Glaser edited comment on MJAVADOC-703 at 12/17/21, 8:05 PM: --------------------------------------------------------------------- [~michael-o] [https://github.com/tarent/maven-parent] commit 01e7a681ad6f3b90f08eb436fe9dd4ad3a391f0a with [line 154 in {{parent/pom.xml}}|https://github.com/tarent/maven-parent/blob/01e7a681ad6f3b90f08eb436fe9dd4ad3a391f0a/parent/pom.xml#L154] commented out (which forces 3.0.1 for JDK < 9), then a simple {{mvn clean install}} shows this within under a minute. (Uhm. But you need to {{git commit -a -m tmp}} (or something) before building, or remove the {{mksrc-run}} from the top-level POM {{exec-maven-plugin}} or put an {{exit 0}} on top of {{src/main/ancillary/mksrc.sh}} because it (deliberately) breaks the build if there are uncommitted changes. Sorry about that.) I’m not sure what you mean with “verbose mode”. Setting {{-Dverbose}} or so on the command line does not change the output? [^verbose1.txt] PS: Might be related to https://issues.apache.org/jira/browse/MCOMPILER-477 which is pretty much the same but for the maven-compiler-plugin starting past a certain version. I tested them independently of each other, though. PPS: A bit more context: the parent POM adds two profiles, one for JDK 8 or older (testing with 8), one for JDK 9 or newer (testing with 11), which help in building with old/new JDK targetting old/new JRE (currently supporting/testing 8→8, 11→8, 11→11). Lines 165ff. of {{parent/pom.xml}} add the {{<source>}} (mjavadoc) or {{<release>}} (mcompiler) configuration item to the plugins only for 9+, but this does not currently work, which is why we have lines 149ff. lower the versions of these plugins for 8-. The “to be targetted” JRE version (by default 8) is set in [line 45|https://github.com/tarent/maven-parent/blob/01e7a681ad6f3b90f08eb436fe9dd4ad3a391f0a/parent/pom.xml#L45] as user-defined property {{{}$\{javaRelease{}}}}. We then insert this into various plugins’ configuration blocks further below. {{lib/pom.xml}} is a (very) tiny library shipped with the “our parent POM” project, and it quickly exhibits issues with these plugins. The build and runtime environments are Debian, so the JDK is used from {{/usr/bin/}} via the alternatives subsystem of Debian, and {{JAVA_HOME}} is not set (which is why [we set {{javadocExecutable}} sometimes|https://github.com/tarent/maven-parent/blob/01e7a681ad6f3b90f08eb436fe9dd4ad3a391f0a/parent/pom.xml#L183-L201]). was (Author: mirabilos): [~michael-o] [https://github.com/tarent/maven-parent] commit 01e7a681ad6f3b90f08eb436fe9dd4ad3a391f0a with [line 154 in {{parent/pom.xml}}|https://github.com/tarent/maven-parent/blob/01e7a681ad6f3b90f08eb436fe9dd4ad3a391f0a/parent/pom.xml#L154] commented out (which forces 3.0.1 for JDK < 9), then a simple {{mvn clean install}} shows this within under a minute. (Uhm. But you need to {{git commit -a -m tmp}} (or something) before building, or remove the {{mksrc-run}} from the top-level POM {{exec-maven-plugin}} or put an {{exit 0}} on top of {{src/main/ancillary/mksrc.sh}} because it (deliberately) breaks the build if there are uncommitted changes. Sorry about that.) I’m not sure what you mean with “verbose mode”. Setting {{-Dverbose}} or so on the command line does not change the output? [^verbose1.txt] PS: Might be related to https://issues.apache.org/jira/browse/MCOMPILER-477 which is pretty much the same but for the maven-compiler-plugin starting past a certain version. I tested them independently of each other, though. > maven-javadoc-plugin > 3.0.1 fail on JDK 8 > ------------------------------------------ > > Key: MJAVADOC-703 > URL: https://issues.apache.org/jira/browse/MJAVADOC-703 > Project: Maven Javadoc Plugin > Issue Type: Bug > Affects Versions: 3.1.0, 3.3.1 > Reporter: Thorsten Glaser > Priority: Major > Attachments: verbose1.txt > > > Trying to use 3.1.0 or 3.3.1 with JDK 8 results in {{--release}} being passed > to the {{javadoc}} command, which does not know it in JDK 8: > {{[ERROR] Failed to execute goal > org.apache.maven.plugins:maven-javadoc-plugin:3.3.1:jar (attach-javadocs) on > project maven-parent-lib: MavenReportException: Error while generating > Javadoc: }} > {{[ERROR] Exit code: 1 - javadoc: error - invalid flag: --release}} > {{[ERROR]}} > {{[ERROR] Command line was: > /usr/lib/jvm/java-8-openjdk-i386/jre/../bin/javadoc @options @packages}} -- This message was sent by Atlassian Jira (v8.20.1#820001)