我在pom.xml中定义了插件如下:
<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目标时出现以下错误:
命令行是:&#34; C:\ Program Files \ Java \ jdk \ jre .. \ bin \ javadoc.exe&#34; @options @packages
请参阅中生成的Javadoc文件 &#39; C:\工作\工作空间\ B4AWrapper \目标\站点\ apidocs&#39; 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)
执行后,我看到了
Javadoc的束选项
目录在目标目录
下创建并且选项文件(site / apidocs / options)包含以下内容:
-linkoffline&#39; http://docs.oracle.com/javase/6/docs/api&#39; &#39; C:/工作/工作区/ B4AWrapper /目标/ Javadoc的束选项&#39;
我需要以某种方式删除C:/ work / workspace / B4AWrapper / target / javadoc-bundle-options以使一切正常。
有什么想法吗?
答案 0 :(得分:0)
找到解决方案: 将以下内容添加到插件解除:
<useStandardDocletOptions>false</useStandardDocletOptions>