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

Christoph Pfeiffer commented on MJAVADOC-536:
---------------------------------------------

Yes, of curse, but IntelliJ change the java execution by executing maven 
directly. Show the following maven output to understood it better:

 

 

{{Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
2015-11-10T17:41:47+01:00)}}
{{Maven home: 
F:\Toolbox\apps\IDEA-U\ch-0\182.3684.101\plugins\maven\lib\maven3}}
{{Java version: 9.0.4, vendor: Oracle Corporation}}
{{Java home: C:\Program Files\Java\jdk-9.0.4}}
{{Default locale: de_DE, platform encoding: UTF-8}}
{{OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"}}
{{}}{{...}}
{{[INFO] --- maven-javadoc-plugin:3.0.1:jar (generate-javadoc) @ jremote-api 
---}}
{{[DEBUG] Configuring mojo 
org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar from plugin realm 
ClassRealm[plugin>org.apache.maven.plugins:maven-javadoc-plugin:3.0.1, parent: 
jdk.internal.loader.ClassLoaders$AppClassLoader@3b764bce]}}
{{[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar' with basic 
configurator -->}}
{{[DEBUG]   (f) additionalOptions = [-Xdoclint:none]}}
{{[DEBUG]   (f) applyJavadocSecurityFix = true}}
{{[DEBUG]   (f) attach = true}}
{{[DEBUG]   (f) author = true}}
{{[DEBUG]   (f) bootclasspathArtifacts = []}}
{{[DEBUG]   (f) bottom = Copyright © 
\{inceptionYear}–\{currentYear} \{organizationName}. All rights 
reserved.}}
{{[DEBUG]   (f) breakiterator = false}}
{{[DEBUG]   (f) classifier = javadoc}}
{{[DEBUG]   (f) debug = true}}
{{[DEBUG]   (f) defaultManifestFile = 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\classes\META-INF\MANIFEST.MF}}
{{[DEBUG]   (f) detectJavaApiLink = true}}
{{[DEBUG]   (f) detectLinks = false}}
{{[DEBUG]   (f) detectOfflineLinks = true}}
{{[DEBUG]   (f) docfilessubdirs = false}}
{{[DEBUG]   (f) docletArtifact = groupId = 'null'}}
{{artifactId = 'null'}}
{{version = 'null'}}
{{[DEBUG]   (f) docletArtifacts = []}}
{{[DEBUG]   (f) doctitle = jremote-api 1.0.0-SNAPSHOT API}}
{{[DEBUG]   (f) failOnError = true}}
{{[DEBUG]   (f) failOnWarnings = false}}
{{[DEBUG]   (f) finalName = jremote-api-1.0.0-SNAPSHOT}}
{{[DEBUG]   (f) groups = []}}
{{[DEBUG]   (f) includeDependencySources = false}}
{{[DEBUG]   (f) includeTransitiveDependencySources = false}}
{{[DEBUG]   (f) isOffline = false}}
{{[DEBUG]   (f) jarOutputDirectory = 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target}}
{{[DEBUG]   (f) javaApiLinks = {}}}
{{[DEBUG]   (f) javadocDirectory = 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\src\main\javadoc}}
{{[DEBUG]   (f) javadocOptionsDir = 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\javadoc-bundle-options}}
{{[DEBUG]   (f) keywords = false}}
{{[DEBUG]   (f) links = []}}
{{[DEBUG]   (f) linksource = false}}
{{[DEBUG]   (f) localRepository =       id: local}}
{{      url: file:///C:/Users/Christoph/.m2/repository/}}
{{   layout: default}}
{{snapshots: [enabled => true, update => always]}}
{{ releases: [enabled => true, update => always]}}

{{[DEBUG]   (f) mojo = org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar 
\{execution: generate-javadoc}}}
{{[DEBUG]   (f) nocomment = false}}
{{[DEBUG]   (f) nodeprecated = false}}
{{[DEBUG]   (f) nodeprecatedlist = false}}
{{[DEBUG]   (f) nohelp = false}}
{{[DEBUG]   (f) noindex = false}}
{{[DEBUG]   (f) nonavbar = false}}
{{[DEBUG]   (f) nooverview = false}}
{{[DEBUG]   (f) nosince = false}}
{{[DEBUG]   (f) notimestamp = false}}
{{[DEBUG]   (f) notree = false}}
{{[DEBUG]   (f) offlineLinks = []}}
{{[DEBUG]   (f) old = false}}
{{[DEBUG]   (f) outputDirectory = 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\apidocs}}
{{[DEBUG]   (f) overview = 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\src\main\javadoc\overview.html}}
{{[DEBUG]   (f) project = MavenProject: 
org.pcsoft.framework:jremote-api:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\pom.xml}}
{{[DEBUG]   (f) quiet = false}}
{{[DEBUG]   (f) reactorProjects = [MavenProject: 
org.pcsoft.framework:jremote:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\pom.xml, MavenProject: 
org.pcsoft.framework:jremote-api:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-commons:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\commons\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-plugins:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\plugins\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-plugins.sc:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\plugins\sc\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-plugins.sc-api:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\plugins\sc\api\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-core:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\core\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-plugins.sc-impl:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\plugins\sc\impl\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-plugins.sc-impl.rmi:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\plugins\sc\impl\rmi\pom.xml,
 MavenProject: org.pcsoft.framework:jremote-core-test:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\core-test\pom.xml, 
MavenProject: org.pcsoft.framework:jremote-plugins.sc-impl.tcp:1.0.0-SNAPSHOT @ 
G:\Workspace\Application_Workspaces\Frameworks\jremote\plugins\sc\impl\tcp\pom.xml]}}
{{[DEBUG]   (f) resourcesArtifacts = []}}
{{[DEBUG]   (f) serialwarn = false}}
{{[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@5c73f672}}
{{[DEBUG]   (f) settings = org.apache.maven.execution.SettingsAdapter@41b13f3d}}
{{[DEBUG]   (f) show = protected}}
{{[DEBUG]   (f) skip = false}}
{{[DEBUG]   (f) sourceDependencyCacheDir = 
G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\distro-javadoc-sources}}
{{[DEBUG]   (f) splitindex = false}}
{{[DEBUG]   (f) stylesheet = java}}
{{[DEBUG]   (f) tagletArtifact = groupId = 'null'}}
{{artifactId = 'null'}}
{{version = 'null'}}
{{[DEBUG]   (f) tagletArtifacts = []}}
{{[DEBUG]   (f) taglets = []}}
{{[DEBUG]   (f) tags = []}}
{{[DEBUG]   (f) use = true}}
{{[DEBUG]   (f) useDefaultManifestFile = false}}
{{[DEBUG]   (f) useStandardDocletOptions = true}}
{{[DEBUG]   (f) validateLinks = false}}
{{[DEBUG]   (f) verbose = false}}
{{[DEBUG]   (f) version = true}}
{{[DEBUG]   (f) windowtitle = jremote-api 1.0.0-SNAPSHOT API}}
{{[DEBUG] -- end configuration --}}
{{[WARNING] Source files encoding has not been set, using platform encoding 
UTF-8, i.e. build is platform dependent!}}
{{[DEBUG] No Java API link found.}}
{{[DEBUG] Trying to add links for modules...}}
{{[DEBUG] "C:\Program Files\Java\jdk1.8.0_131\bin\javadoc.exe" @options 
@packages @argfile}}
{{[INFO] }}
{{Usage: javadoc [options] [packagenames] [sourcefiles] [@files]}}
{{  -overview <file>                 Read overview documentation from HTML 
file}}
{{  -public                          Show only public classes and members}}
{{  -protected                       Show protected/public classes and members 
(default)}}
{{  -package                         Show package/protected/public classes and 
members}}
{{  -private                         Show all classes and members}}
{{  -help                            Display command line options and exit}}
{{  -doclet <class>                  Generate output via alternate doclet}}
{{  -docletpath <path>               Specify where to find doclet class files}}
{{  -sourcepath <pathlist>           Specify where to find source files}}
{{  -classpath <pathlist>            Specify where to find user class files}}
{{  -cp <pathlist>                   Specify where to find user class files}}
{{  -exclude <pkglist>               Specify a list of packages to exclude}}
{{  -subpackages <subpkglist>        Specify subpackages to recursively load}}
{{  -breakiterator                   Compute first sentence with BreakIterator}}
{{  -bootclasspath <pathlist>        Override location of class files loaded}}
{{                                   by the bootstrap class loader}}
{{  -source <release>                Provide source compatibility with 
specified release}}
{{  -extdirs <dirlist>               Override location of installed extensions}}
{{  -verbose                         Output messages about what Javadoc is 
doing}}
{{  -locale <name>                   Locale to be used, e.g. en_US or 
en_US_WIN}}
{{  -encoding <name>                 Source file encoding name}}
{{  -quiet                           Do not display status messages}}
{{  -J<flag>                         Pass <flag> directly to the runtime 
system}}
{{  -X                               Print a synopsis of nonstandard options 
and exit}}

{{Provided by Standard doclet:}}
{{  -d <directory>                   Destination directory for output files}}
{{  -use                             Create class and package usage pages}}
{{  -version                         Include @version paragraphs}}
{{  -author                          Include @author paragraphs}}
{{  -docfilessubdirs                 Recursively copy doc-file subdirectories}}
{{  -splitindex                      Split index into one file per letter}}
{{  -windowtitle <text>              Browser window title for the 
documentation}}
{{  -doctitle <html-code>            Include title for the overview page}}
{{  -header <html-code>              Include header text for each page}}
{{  -footer <html-code>              Include footer text for each page}}
{{  -top    <html-code>              Include top text for each page}}
{{  -bottom <html-code>              Include bottom text for each page}}
{{  -link <url>                      Create links to javadoc output at <url>}}
{{  -linkoffline <url> <url2>        Link to docs at <url> using package list 
at <url2>}}
{{  -excludedocfilessubdir <name1>:.. Exclude any doc-files subdirectories with 
given name.}}
{{  -group <name> <p1>:<p2>..        Group specified packages together in 
overview page}}
{{  -nocomment                       Suppress description and tags, generate 
only declarations.}}
{{  -nodeprecated                    Do not include @deprecated information}}
{{  -noqualifier <name1>:<name2>:... Exclude the list of qualifiers from the 
output.}}
{{  -nosince                         Do not include @since information}}
{{  -notimestamp                     Do not include hidden time stamp}}
{{  -nodeprecatedlist                Do not generate deprecated list}}
{{  -notree                          Do not generate class hierarchy}}
{{  -noindex                         Do not generate index}}
{{  -nohelp                          Do not generate help link}}
{{  -nonavbar                        Do not generate navigation bar}}
{{  -serialwarn                      Generate warning about @serial tag}}
{{  -tag <name>:<locations>:<header> Specify single argument custom tags}}
{{  -taglet                          The fully qualified name of Taglet to 
register}}
{{  -tagletpath                      The path to Taglets}}
{{  -charset <charset>               Charset for cross-platform viewing of 
generated documentation.}}
{{  -helpfile <file>                 Include file that help link links to}}
{{  -linksource                      Generate source in HTML}}
{{  -sourcetab <tab length>          Specify the number of spaces each tab 
takes up in the source}}
{{  -keywords                        Include HTML meta tags with package, class 
and member info}}
{{  -stylesheetfile <path>           File to change style of the generated 
documentation}}
{{  -docencoding <name>              Specify the character encoding for the 
output}}
{{1 error}}
{{[INFO] 
------------------------------------------------------------------------}}
{{[INFO] Reactor Summary:}}
{{[INFO] }}
{{[INFO] org.pcsoft.framework - jremote ..................... SUCCESS [  5.326 
s]}}
{{[INFO] jremote-api ........................................ FAILURE [  4.057 
s]}}
{{[INFO] jremote-commons .................................... SKIPPED}}
{{[INFO] jremote-plugins .................................... SKIPPED}}
{{[INFO] jremote-plugins.sc ................................. SKIPPED}}
{{[INFO] jremote-plugins.sc-api ............................. SKIPPED}}
{{[INFO] jremote-core ....................................... SKIPPED}}
{{[INFO] jremote-plugins.sc-impl ............................ SKIPPED}}
{{[INFO] jremote-plugins.sc-impl.rmi ........................ SKIPPED}}
{{[INFO] jremote-core-test .................................. SKIPPED}}
{{[INFO] jremote-plugins.sc-impl.tcp ........................ SKIPPED}}
{{[INFO] 
------------------------------------------------------------------------}}
{{[INFO] BUILD FAILURE}}
{{[INFO] 
------------------------------------------------------------------------}}
{{[INFO] Total time: 10.210 s}}
{{[INFO] Finished at: 2018-08-26T19:28:06+02:00}}
{{[INFO] Final Memory: 23M/78M}}
{{[INFO] 
------------------------------------------------------------------------}}
{{[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_131\bin\javadoc.exe" @options @packages @argfile}}
{{[ERROR] }}
{{[ERROR] Refer to the generated Javadoc files in 
'G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\apidocs' 
dir.}}
{{[ERROR] -> [Help 1]}}
{{org.apache.maven.lifecycle.LifecycleExecutionException: 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: }}
{{Exit code: 1 - javadoc: error - invalid flag: --class-path}}

{{Command line was: "C:\Program Files\Java\jdk1.8.0_131\bin\javadoc.exe" 
@options @packages @argfile}}

{{Refer to the generated Javadoc files in 
'G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\apidocs' 
dir.}}

{{    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)}}
{{    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)}}
{{    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)}}
{{    at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)}}
{{    at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)}}
{{    at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)}}
{{    at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)}}
{{    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)}}
{{    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)}}
{{    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)}}
{{    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)}}
{{    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)}}
{{    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)}}
{{    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)}}
{{    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)}}
{{    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)}}
{{    at java.base/java.lang.reflect.Method.invoke(Method.java:564)}}
{{    at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)}}
{{    at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)}}
{{    at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)}}
{{    at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)}}
{{    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)}}
{{Caused by: org.apache.maven.plugin.MojoExecutionException: 
MavenReportException: Error while generating Javadoc: }}
{{Exit code: 1 - javadoc: error - invalid flag: --class-path}}

{{Command line was: "C:\Program Files\Java\jdk1.8.0_131\bin\javadoc.exe" 
@options @packages @argfile}}

{{Refer to the generated Javadoc files in 
'G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\apidocs' 
dir.}}

{{    at 
org.apache.maven.plugins.javadoc.AbstractJavadocMojo.failOnError(AbstractJavadocMojo.java:6202)}}
{{    at 
org.apache.maven.plugins.javadoc.JavadocJar.doExecute(JavadocJar.java:194)}}
{{    at 
org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute(AbstractJavadocMojo.java:1912)}}
{{    at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)}}
{{    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)}}
{{    ... 21 more}}
{{Caused by: org.apache.maven.reporting.MavenReportException: }}
{{Exit code: 1 - javadoc: error - invalid flag: --class-path}}

{{Command line was: "C:\Program Files\Java\jdk1.8.0_131\bin\javadoc.exe" 
@options @packages @argfile}}

{{Refer to the generated Javadoc files in 
'G:\Workspace\Application_Workspaces\Frameworks\jremote\api\target\apidocs' 
dir.}}

{{    at 
org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeJavadocCommandLine(AbstractJavadocMojo.java:5298)}}
{{    at 
org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:2134)}}
{{    at 
org.apache.maven.plugins.javadoc.JavadocJar.doExecute(JavadocJar.java:190)}}
{{    ... 24 more}}
{{[ERROR] }}
{{[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}}

{{Process finished with exit code 1}}

> Wrong option argument (--class-path) if using Java 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
>
> If I build a project with Java 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)

Reply via email to