[ https://issues.apache.org/jira/browse/MJAVADOC-764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17782869#comment-17782869 ]
Elliotte Rusty Harold commented on MJAVADOC-764: ------------------------------------------------ should this be closed as WAI or is there something we should do about this? > javadoc:aggregate fails after Java 11 upgrade > ---------------------------------------------- > > Key: MJAVADOC-764 > URL: https://issues.apache.org/jira/browse/MJAVADOC-764 > Project: Maven Javadoc Plugin > Issue Type: Bug > Components: javadoc > Affects Versions: 3.5.0 > Reporter: Sirisha Pratha > Priority: Critical > Labels: jpms > > We have a multi-module project that is failing for javadoc:aggregate goal > after upgrading to Java 11 for maven-javadoc-plugin versions 3.4.1 and 3.5.0. > It worked fine without any issues for Java 1.8. > This is our maven-javadoc plugin configuration for Java 8 - > {color:#00875a}*SUCCESS*{color} > > {noformat} > <maven.compiler.source>8</maven.compiler.source> > <plugin> > <artifactId>maven-javadoc-plugin</artifactId> > <configuration> > <source>${maven.compiler.source}</source> > <doctitle>Eclipse Collections - > ${project.version}</doctitle> > <windowtitle>Eclipse Collections - > ${project.version}</windowtitle> > <show>public</show> > <detectJavaApiLink>true</detectJavaApiLink> > <links> > <link>https://junit.org/junit4/javadoc/latest</link> > > <link>https://docs.oracle.com/javase/8/docs/api/</link> > </links> > <destDir>${project.version}</destDir> > <doclint>html,syntax,accessibility</doclint> > <excludePackageNames> > > org.openjdk,org.eclipse.collections.impl.jmh,org.eclipse.collections.codegenerator,org.eclipse.collections.codegenerator.maven > </excludePackageNames> > </configuration> > <executions> > <execution> > <id>aggregate</id> > <inherited>false</inherited> > <goals> > <goal>aggregate</goal> > </goals> > </execution> > </executions> > </plugin> > {noformat} > This is our maven-javadoc plugin configuration for Java 11 - (the only > difference is values in source and links tags) - > *{color:#ff0000}FAILS{color}* {color:#ff0000}(See error below){color} > > {noformat} > <maven.compiler.source>11</maven.compiler.source> > <plugin> > <artifactId>maven-javadoc-plugin</artifactId> > <configuration> > <source>${maven.compiler.source}</source> > <doctitle>Eclipse Collections - > ${project.version}</doctitle> > <windowtitle>Eclipse Collections - > ${project.version}</windowtitle> > <show>public</show> > <detectJavaApiLink>true</detectJavaApiLink> > <links> > <link>https://junit.org/junit4/javadoc/latest</link> > > <link>https://docs.oracle.com/en/java/javase/11/docs/api</link> > </links> > <destDir>${project.version}</destDir> > <doclint>html,syntax,accessibility</doclint> > <excludePackageNames> > > org.openjdk,org.eclipse.collections.impl.jmh,org.eclipse.collections.codegenerator,org.eclipse.collections.codegenerator.maven > </excludePackageNames> > </configuration> > <executions> > <execution> > <id>aggregate</id> > <inherited>false</inherited> > <goals> > <goal>aggregate</goal> > </goals> > </execution> > </executions> > </plugin>{noformat} > > _javadoc:aggregate_ fails with the following error on our GitHub workflow > (nothing changed in the way we run this job - we have always used Java 17 to > run this) > > {noformat} > Error: 6:236 [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-javadoc-plugin:3.4.1:aggregate (default-cli) > on project eclipse-collections-parent: An error has occurred in Javadoc > report generation: > 515Error: 6:236 [ERROR] Exit code: 2 - Loading source files for package > org.eclipse.collections.codegenerator.model... > 516Error: 02:14:46:236 [ERROR] error: No source files for package > org.eclipse.collections.codegenerator.model > 517Error: 02:14:46:237 [ERROR] 1 error > 518Error: 6:237 [ERROR] > 519Error: 6:238 [ERROR] Command line was: > /opt/hostedtoolcache/Java_Zulu_jdk/17.0.7-7/x64/bin/javadoc @options @packages > 520Error: 6:238 [ERROR] > 521Error: 6:238 [ERROR] Refer to the generated Javadoc files in > '/home/runner/work/eclipse-collections/eclipse-collections/target/site/apidocs/12.0.0-SNAPSHOT' > dir. > 522Error: 6:239 [ERROR] > 523Error: 6:240 [ERROR] -> [Help 1]{noformat} > > > Solutions we tried - > # Configuring sourcePath (see below) - in this case, *no Javadoc was > created* in target/site/apidocs. > {noformat} > <sourcepath>${project.build.sourceDirectory}</sourcepath>{noformat} > # Tried both plugin versions 3.4.1 and 3.5.0 - *fails* with both versions. > # Tried to add source = 1.8 but maven.compiler.source = 11, which seems to > be the only combination that {*}works{*}. Like so - > {noformat} > <maven.compiler.source>11</maven.compiler.source> > <plugin> > <artifactId>maven-javadoc-plugin</artifactId> > <configuration> > <source>1.8</source> > <doctitle>Eclipse Collections - ${project.version}</doctitle> > <windowtitle>Eclipse Collections - ${project.version}</windowtitle> > <show>public</show> > <detectJavaApiLink>true</detectJavaApiLink> > <links> > <link>https://junit.org/junit4/javadoc/latest</link> > <link>https://docs.oracle.com/en/java/javase/11/docs/api</link> > </links> > <destDir>${project.version}</destDir> > <doclint>html,syntax,accessibility</doclint> > <excludePackageNames> > > org.openjdk,org.eclipse.collections.impl.jmh,org.eclipse.collections.codegenerator,org.eclipse.collections.codegenerator.maven > </excludePackageNames> > <additionalOptions>-html5</additionalOptions> > </configuration> > <reportSets> > <reportSet> > <id>aggregate</id> > <inherited>false</inherited> > <reports> > <report>aggregate</report> > </reports> > </reportSet> > </reportSets> > </plugin> > {noformat} > What are we missing as we ideally would like to have both source and maven. > compiler.source as the same value which is 11. -- This message was sent by Atlassian Jira (v8.20.10#820010)