2013-10-04 29 views
7

java-webservices projesini dağıtmaya çalışırken bazı maven eklentisi sorunlarıyla karşılaşıyorum, Projem indirilmiyor "maven-javadoc-plugin : 2.4" Eklentiler, ben "maven-javadoc-plugin 2.5" sürüm jar'ı .m2/depomuza el ile yükledim.JavaDocs rapor oluşturma işleminde bir hata oluştu: Çıkış kodu: 1 - javadoc: error - geçersiz flag: -

<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> 

Süper POM:

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

herkes

çocuk pom, bu hata ile bana yardımcı olabilir

<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> 

Veli pom

alıyorum : versiyon numarası var ve bu süper pompanın nasıl indirildiğinden emin değilim.

<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> 

tam hata çıkışı:

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 
+0

Sadece, aslında bir göz –

+0

sahip düşünmek gelebilir misin, pom bilgiler eklemek, neden 2.5 kullanıyorsunuz? Bu taş devri malzemesi. Mevcut sürüm 2.9.1 - Kullanmaya ve hatanın devam edip etmediğine bakmaya çalışabilir misiniz? – Mureinik

+0

Evet, doğru. Ama onun yapım müdürü kararım. Yerel olarak 2.9.1 ile denedim bile, o yardımcı olmaz. –

cevap

5

Bugün aynı sorunu vardı ve Javadoc eklentisi için bir yapılandırma seçeneği ekleyerek sabit:

<useStandardDocletOptions>false</useStandardDocletOptions> 

Yani çıkan yapılandırma şunun gibi görünüyor:

 <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> 
0

Bir belge yazıyorsanız ve standart seçeneklerle çalışmasını istiyorsanız, bunları iletmek için optionLength kullanabilirsiniz.

UmlGraphDoc doclet, standart seçeneklerin standart dokümana nasıl yönlendirileceğini gösterirken, doclet'iniz için kullanmak istediğinizi gösterir.

import com.sun.tools.doclets.standard.Standard; 

... 

/** 
* Option check, forwards options to the standard doclet, if that one 
* refuses them, they are sent to UmlGraph 
*/ 
public static int optionLength(String option) { 
    int result = Standard.optionLength(option); 
    if (result != 0) 
     return result; 
    else 
     return UmlGraph.optionLength(option); 
} 
İlgili konular