本文介绍了Maven Javadoc插件javadoc-bundle-options的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在pom.xml中定义了插件,如下所示:

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>

运行javadoc:javadoc目标时,出现以下错误:

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

请参考以下内容中生成的Javadoc文件: 'C:\ work \ workspace \ B4AWrapper \ target \ site \ apidocs'目录.

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)

执行后,我看到了

目录是在目标目录下创建的

directory is created under target directory

,并且选项文件(site/apidocs/options)包含以下内容:

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

我需要以某种方式删除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.

有什么想法吗?

推荐答案

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

Found a solution:Add the following to plugin decleration:

<useStandardDocletOptions>false</useStandardDocletOptions>

这篇关于Maven Javadoc插件javadoc-bundle-options的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 19:32