jjzjj

java - JavaDocs 报告生成中发生错误 :Exit code: 1 - javadoc: error - invalid flag: -author

coder 2024-03-19 原文

您好,我面临一些 maven 插件问题,当我尝试部署 java-webservices 项目时,我的项目没有下载 "maven-javadoc-plugin : 2.4" 插件,我手动安装了 “maven-javadoc-plugin 2.5” 版本 jar 到我的 .m2/repository。我得到了

"An error has occurred in JavaDocs report generation:Exit code: 1 -
javadoc: error - invalid flag: -author".

谁能帮我解决这个错误,

子 pom

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-javadoc-plugin</artifactId>
   <executions>
       <execution>
           <goals>
               <goal>javadoc</goal>
           </goals>
           <phase>compile</phase>
       </execution>
   </executions>
   <configuration>
       <encoding>UTF-8</encoding>
       <verbose>false</verbose>
       <show>public</show>
       <subpackages>com.pubco.mp.emarket.services</subpackages>
       <doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>
       <docletArtifacts>
           <docletArtifact>
               <groupId>com.sun.jersey.contribs</groupId>
               <artifactId>wadl-resourcedoc-doclet</artifactId>
               <version>${jersey-client.version}</version>
           </docletArtifact>
           <docletArtifact>
               <groupId>com.sun.jersey</groupId>
               <artifactId>jersey-server</artifactId>
               <version>${jersey-client.version}</version>
           </docletArtifact>
           <docletArtifact>
               <groupId>xerces</groupId>
               <artifactId>xercesImpl</artifactId>
               <version>2.6.1</version>
           </docletArtifact>
       </docletArtifacts>
       <additionalparam>-output ${project.build.outputDirectory}/resourcedoc.xml</additionalparam>
   </configuration>
</plugin>

父 pom:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-javadoc-plugin</artifactId>
   <executions>
       <execution>
           <goals>
               <goal>javadoc</goal>
           </goals>
           <phase>compile</phase>
       </execution>
   </executions>
   <configuration>
       <encoding>UTF-8</encoding>
       <verbose>false</verbose>
       <show>public</show>
       <subpackages>com.pubco.mp.emarket.services</subpackages>
       <doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>
       <docletArtifacts>
           <docletArtifact>
               <groupId>com.sun.jersey.contribs</groupId>
               <artifactId>wadl-resourcedoc-doclet</artifactId>
               <version>${jersey-client.version}</version>
           </docletArtifact>
           <docletArtifact>
               <groupId>com.sun.jersey</groupId>
               <artifactId>jersey-server</artifactId>
               <version>${jersey-client.version}</version>
           </docletArtifact>
           <docletArtifact>
               <groupId>xerces</groupId>
               <artifactId>xercesImpl</artifactId>
               <version>2.6.1</version>
           </docletArtifact>
       </docletArtifacts>
       <additionalparam>-output ${project.build.outputDirectory}/resourcedoc.xml</additionalparam>
   </configuration>
</plugin>

Super POM:已获得版本号,但不确定如何下载此 super pom。

<maven-javadoc-plugin.version>2.5</maven-javadoc-plugin.version>

<pluginExecution>
    <pluginExecutionFilter>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <versionRange>[2.5,)</versionRange>
        <goals>
            <goal>javadoc</goal>
        </goals>
    </pluginExecutionFilter>
    <action>
        <execute/>
    </action>
</pluginExecution>

完整的错误输出:

1 error
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 23.959s
[INFO] Finished at: Fri Oct 04 18:31:07 IST 2013
[INFO] Final Memory: 16M/29M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-javadoc-plugin:2.5:javadoc (default) on
project mpemarketservices-war: An error has occurred in JavaDocs
report generation:Exit code: 1 - javadoc: error - invalid flag: -author
[ERROR]
[ERROR] Command line was:C:\jdk1.6.0_13\jre\..\bin\javadoc.exe @options
[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

最佳答案

我今天遇到了同样的问题,并通过向 Javadoc 插件添加一个配置选项来修复它:

<useStandardDocletOptions>false</useStandardDocletOptions>

因此生成的配置如下所示:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>javadoc</goal>
                    </goals>
                    <phase>compile</phase>
                </execution>
            </executions>
            <configuration>
                <encoding>UTF-8</encoding>
                <verbose>false</verbose>
                <show>public</show>
                <subpackages>com.pubco.mp.emarket.services</subpackages>
                <doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>
                <docletArtifacts>
                    <docletArtifact>
                        <groupId>com.sun.jersey.contribs</groupId>
                        <artifactId>wadl-resourcedoc-doclet</artifactId>
                        <version>${jersey-client.version}</version>
                    </docletArtifact>
                    <docletArtifact>
                        <groupId>com.sun.jersey</groupId>
                        <artifactId>jersey-server</artifactId>
                        <version>${jersey-client.version}</version>
                    </docletArtifact>
                    <docletArtifact>
                        <groupId>xerces</groupId>
                        <artifactId>xercesImpl</artifactId>
                        <version>2.6.1</version>
                    </docletArtifact>
                </docletArtifacts>
                <additionalparam>-output ${project.build.outputDirectory}/resourcedoc.xml</additionalparam>
                <useStandardDocletOptions>false</useStandardDocletOptions>
            </configuration>
        </plugin>

关于java - JavaDocs 报告生成中发生错误 :Exit code: 1 - javadoc: error - invalid flag: -author,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19181236/

有关java - JavaDocs 报告生成中发生错误 :Exit code: 1 - javadoc: error - invalid flag: -author的更多相关文章

  1. ruby-on-rails - Ruby on Rails : . 常量化 : wrong constant name error? - 2

    我正在使用这个:4.times{|i|assert_not_equal("content#{i+2}".constantize,object.first_content)}我之前声明过局部变量content1content2content3content4content5我得到的错误NameError:wrongconstantnamecontent2这个错误是什么意思?我很确定我想要content2=\ 最佳答案 你必须用一个大字母来调用ruby​​常量:Content2而不是content2。Aconstantnamestart

  2. java - 等价于 Java 中的 Ruby Hash - 2

    我真的很习惯使用Ruby编写以下代码:my_hash={}my_hash['test']=1Java中对应的数据结构是什么? 最佳答案 HashMapmap=newHashMap();map.put("test",1);我假设? 关于java-等价于Java中的RubyHash,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/22737685/

  3. ruby-on-rails - 错误 : Error installing pg: ERROR: Failed to build gem native extension - 2

    我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby​​'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe

  4. java - 从 JRuby 调用 Java 类的问题 - 2

    我正在尝试使用boilerpipe来自JRuby。我看过guide从JRuby调用Java,并成功地将它与另一个Java包一起使用,但无法弄清楚为什么同样的东西不能用于boilerpipe。我正在尝试基本上从JRuby中执行与此Java等效的操作:URLurl=newURL("http://www.example.com/some-location/index.html");Stringtext=ArticleExtractor.INSTANCE.getText(url);在JRuby中试过这个:require'java'url=java.net.URL.new("http://www

  5. ruby - RVM "ERROR: Unable to checkout branch ."单用户 - 2

    我在新的Debian6VirtualBoxVM上安装RVM时遇到问题。我已经安装了所有需要的包并使用下载了安装脚本(curl-shttps://rvm.beginrescueend.com/install/rvm)>rvm,但以单个用户身份运行时bashrvm我收到以下错误消息:ERROR:Unabletocheckoutbranch.安装在这里停止,并且(据我所知)没有安装RVM的任何文件。如果我以root身份运行脚本(对于多用户安装),我会收到另一条消息:Successfullycheckedoutbranch''安装程序继续并指示成功,但未添加.rvm目录,甚至在修改我的.bas

  6. java - 我的模型类或其他类中应该有逻辑吗 - 2

    我只想对我一直在思考的这个问题有其他意见,例如我有classuser_controller和classuserclassUserattr_accessor:name,:usernameendclassUserController//dosomethingaboutanythingaboutusersend问题是我的User类中是否应该有逻辑user=User.newuser.do_something(user1)oritshouldbeuser_controller=UserController.newuser_controller.do_something(user1,user2)我

  7. java - 什么相当于 ruby​​ 的 rack 或 python 的 Java wsgi? - 2

    什么是ruby​​的rack或python的Java的wsgi?还有一个路由库。 最佳答案 来自Python标准PEP333:Bycontrast,althoughJavahasjustasmanywebapplicationframeworksavailable,Java's"servlet"APImakesitpossibleforapplicationswrittenwithanyJavawebapplicationframeworktoruninanywebserverthatsupportstheservletAPI.ht

  8. 报告回顾丨模型进化狂飙,DetectGPT能否识别最新模型生成结果? - 2

    导读语言模型给我们的生产生活带来了极大便利,但同时不少人也利用他们从事作弊工作。如何规避这些难辨真伪的文字所产生的负面影响也成为一大难题。在3月9日智源Live第33期活动「DetectGPT:判断文本是否为机器生成的工具」中,主讲人Eric为我们讲解了DetectGPT工作背后的思路——一种基于概率曲率检测的用于检测模型生成文本的工具,它可以帮助我们更好地分辨文章的来源和可信度,对保护信息真实、防止欺诈等方面具有重要意义。本次报告主要围绕其功能,实现和效果等展开。(文末点击“阅读原文”,查看活动回放。)Ericmitchell斯坦福大学计算机系四年级博士生,由ChelseaFinn和Chri

  9. Observability:从零开始创建 Java 微服务并监控它 (二) - 2

    这篇文章是继上一篇文章“Observability:从零开始创建Java微服务并监控它(一)”的续篇。在上一篇文章中,我们讲述了如何创建一个Javaweb应用,并使用Filebeat来收集应用所生成的日志。在今天的文章中,我来详述如何收集应用的指标,使用APM来监控应用并监督web服务的在线情况。源码可以在地址 https://github.com/liu-xiao-guo/java_observability 进行下载。摄入指标指标被视为可以随时更改的时间点值。当前请求的数量可以改变任何毫秒。你可能有1000个请求的峰值,然后一切都回到一个请求。这也意味着这些指标可能不准确,你还想提取最小/

  10. 【Java 面试合集】HashMap中为什么引入红黑树,而不是AVL树呢 - 2

    HashMap中为什么引入红黑树,而不是AVL树呢1.概述开始学习这个知识点之前我们需要知道,在JDK1.8以及之前,针对HashMap有什么不同。JDK1.7的时候,HashMap的底层实现是数组+链表JDK1.8的时候,HashMap的底层实现是数组+链表+红黑树我们要思考一个问题,为什么要从链表转为红黑树呢。首先先让我们了解下链表有什么不好???2.链表上述的截图其实就是链表的结构,我们来看下链表的增删改查的时间复杂度增:因为链表不是线性结构,所以每次添加的时候,只需要移动一个节点,所以可以理解为复杂度是N(1)删:算法时间复杂度跟增保持一致查:既然是非线性结构,所以查询某一个节点的时候

随机推荐