2013-10-07 53 views
0

的javadoc我配置的javadoc我Maven的,但我不得不執行MVN的javadoc:javadoc的 我喜歡Maven來此,而我執行MVN包獲取Maven來運行的Javadoc:從MVN包

我的POM樣子

<plugin> 
    <artifactId>maven-javadoc-plugin</artifactId> 
    <version>${maven-javadoc-plugin.version}</version> 
    <configuration> 
     <aggregate>true</aggregate> 
    </configuration> 
    <executions> 
     <execution> 
      <id>attach-javadocs</id> 
      <phase>prepare-package</phase> 
      <goals> 
       <goal>package</goal> 
      </goals> 
     </execution> 
    </executions> 
</plugin> 

回答

1

你的插件配置說明的Javadoc插件被稱爲相位準備包。因此,如果您致電mvn package,則會執行此插件。但javadoc插件沒有目標包:see plugin info here

我想你要撥打的javadoc的目標:

 <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-javadoc-plugin</artifactId> 
      <version>2.9.1</version> 
      <configuration> 
       ... 
      </configuration> 
      <executions> 
       <execution> 
        <id>generate-javadoc</id> 
        <phase>package</phase> 
        <goals> 
         <goal>javadoc</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
+1

沒有工作:(不運行/做任何的javadoc – AndersP

相關問題