You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Desruisseaux (JIRA)" <ji...@apache.org> on 2018/09/01 13:19:00 UTC

[jira] [Commented] (MJAVADOC-449) javadoc:aggregate fails with JDK 9

    [ https://issues.apache.org/jira/browse/MJAVADOC-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16599627#comment-16599627 ] 

Martin Desruisseaux commented on MJAVADOC-449:
----------------------------------------------

I think that the issue is deeper than aggregated javadoc only. In order to generate aggregated javadoc with a front page listing modules, we need to use the {{\--module-path}} and {{\--module-source-path}} options of JDK tools (if there is another way, I did not found it yet). But those options require a directory having the exact module name. Current Maven standard directory layout is incompatible with this requirement. This problem impacts no only javadoc, but all JDK tools working with modules (at least {{javadoc}}, {{javac}} and {{jlink}}). For example when used with {{javac}}, "aggregated compilation" allows to run Annotation Processing Tools on all modules in one pass (useful if the processing tools want to combine information from all modules).

If we need to revisit directory layout in order to support aggregated javadoc, then we could expand the scope for fixing also other issues (in my opinion) in supporting multi-language projects, for example in projects using Java, Python and C/C++ together. A new directory layout [has been proposed on the Maven developer mailing list|https://mail-archives.apache.org/mod_mbox/maven-dev/201808.mbox/%3C91eb6c15-9fc6-6d2a-56c9-962c2be4c227%40geomatys.com%3E]. But [implementing and experimenting|https://github.com/Geomatys/maven-plugins/wiki] it would require volunteer time, maybe outside the current Maven maintainers team, until the value of such proposal is demonstrated (or not).

> javadoc:aggregate fails with JDK 9
> ----------------------------------
>
>                 Key: MJAVADOC-449
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-449
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 2.10.3
>            Reporter: Hervé Boutemy
>            Assignee: Robert Scholte
>            Priority: Major
>         Attachments: 20180618-MJAVADOC449.zip, maven-javadoc-plugin-aggregate-test.zip
>
>
> trying {{mvn -Preporting site}} with Maven core and maven-javadoc-plugin upgraded to 2.10.4-SNAPSHOT to benefit from already JDK 9 related fixed issues shows another one
> {noformat}[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on project maven: Error generating maven-javadoc-plugin:2.10.4-SNAPSHOT:aggregate: Unable to resolve artifact:groupId = 'org.apache.maven.plugin-tools'
> [ERROR] artifactId = 'maven-plugin-tools-javadoc'
> [ERROR] version = '3.4': Missing:
> [ERROR] ----------
> [ERROR] 1) com.sun:tools:jar:1.4.2
> [ERROR] 
> [ERROR] Try downloading the file manually from the project website.
> [ERROR] 
> [ERROR] Then, install it using the command:
> [ERROR] mvn install:install-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.2 -Dpackaging=jar -Dfile=/path/to/file
> [ERROR] 
> [ERROR] Alternatively, if you host your own repository you can deploy the file there:
> [ERROR] mvn deploy:deploy-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
> [ERROR] 
> [ERROR] Path to dependency:
> [ERROR] 1) org.apache.maven.plugin-tools:maven-plugin-tools-javadoc:jar:3.4
> [ERROR] 2) com.sun:tools:jar:1.4.2
> [ERROR] 
> [ERROR] ----------
> [ERROR] 1 required artifact is missing.
> [ERROR] 
> [ERROR] for artifact:
> [ERROR] org.apache.maven.plugin-tools:maven-plugin-tools-javadoc:jar:3.4
> [ERROR] 
> [ERROR] from the specified remote repositories:
> [ERROR] apache.snapshots (http://repository.apache.org/snapshots, releases=false, snapshots=true),
> [ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
> [ERROR] -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)