[
https://issues.apache.org/jira/browse/MJAVADOC-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16590417#comment-16590417
]
Robert Scholte commented on MJAVADOC-536:
-----------------------------------------
{{JAVA_HOME}} is used for the runtime of Maven. If you want compile and
generate javadoc with a different version, consider using
[toolchains|https://maven.apache.org/guides/mini/guide-using-toolchains.html]
> Wrong option argument (--class-path) if using Java 1.9 or higher
> ----------------------------------------------------------------
>
> Key: MJAVADOC-536
> URL: https://issues.apache.org/jira/browse/MJAVADOC-536
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Components: javadoc
> Affects Versions: 3.0.1
> Environment: JDK 10.0.1
> Maven 3.5.4
> Windows 10
> Reporter: Christoph Pfeiffer
> Priority: Blocker
> Labels: up-for-grabs
>
> If I build a project with Java 1.9 or higher (setup in compiler plugin) the
> javadoc plugin creates a wrong option argument named _--class-path_ instead
> of _-classpath_. I found no work arounds for this.
>
> I get this error message:
> {noformat}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (generate-javadoc) on
> project jremote-api: MavenReportException: Error while generating Javadoc:
> [ERROR] Exit code: 1 - javadoc: error - invalid flag: --class-path
> [ERROR]
> [ERROR] Command line was: "C:\Program Files\Java\jdk1.8.0_72\bin\javadoc.exe"
> @options @packages @argfile
> [ERROR]
> [ERROR] Refer to the generated Javadoc files in
> 'C:\Workspace\Java\Frameworks\jremote\api\target\apidocs' dir.
> [ERROR]
> [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
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
> [ERROR] mvn <goals> -rf :jremote-api
> {noformat}
>
> Please see this github project and remove the _skip_ tag in root pom in
> _javadoc_ plugin section to see this error:
> [https://github.com/KleinerHacker/jremote/|http://example.com]
>
> With this error I cannot deploy to maven central repo cause I need a javadoc
> JAR.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)