简体   繁体   中英

Maven Javadoc Plugin javadoc-bundle-options

I have defined the plugin in my pom.xml as following:

<plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-javadoc-plugin</artifactId>
                       <version>2.10.3</version>
                       <configuration>
                             <doclet>BADoclet</doclet>
                             <docletPath>${basedir}</docletPath>
                             <additionalparam>-b4atarget B4AWrapper_${inAppVersion}.xml</additionalparam>
                             <failOnError>false</failOnError>
                             <outputDirectory>${basedir}</outputDirectory>
                             <detectOfflineLinks>false</detectOfflineLinks>
                       </configuration>
                       <executions>
                             <execution>
                                    <goals>
                                           <goal>javadoc</goal>
                                           <goal>test-javadoc</goal>
                                    </goals>
                                    <phase>site</phase>
                                    <configuration>
                                           <!-- Specific configuration for the given reports ... -->
                                    </configuration>
                             </execution>
                       </executions>
                </plugin>

When running javadoc:javadoc goal i get the following error:

Command line was: "C:\\Program Files\\Java\\jdk\\jre..\\bin\\javadoc.exe" @options @packages

Refer to the generated Javadoc files in 'C:\\work\\workspace\\B4AWrapper\\target\\site\\apidocs' dir.

  at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeJavadocCommandLine(AbstractJavadocMojo.java:5163) at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:2075) at org.apache.maven.plugin.javadoc.JavadocReport.generate(JavadocReport.java:130) at org.apache.maven.plugin.javadoc.JavadocReport.execute(JavadocReport.java:318) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 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:108) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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) 

After execution, i see that

javadoc-bundle-options

directory is created under target directory

and also that the options file (site/apidocs/options) contains the following:

-linkoffline ' http://docs.oracle.com/javase/6/docs/api ' 'C:/work/workspace/B4AWrapper/target/javadoc-bundle-options'

I need to somehow remove the C:/work/workspace/B4AWrapper/target/javadoc-bundle-options to make everything work.

Any ideas?

找到了解决方案:在插件清理中添加以下内容:

<useStandardDocletOptions>false</useStandardDocletOptions>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM