2014-10-22 82 views
0

我没有在我的Maven项目pom.xml文件中配置maven-javadoc-plugin,但是当我运行mvn install命令时,然后生成apidoc? pom.xml中的为什么我的Maven项目在目标文件夹中自动生成apidoc?

配置如下:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<parent> 
    <groupId>org.springframework.security.oauth</groupId> 
    <artifactId>spring-security-oauth-parent</artifactId> 
    <version>2.0.3.RELEASE</version> 
</parent> 
<build> 
    <finalName>webcnmobile</finalName> 
    <pluginManagement> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>2.3</version> 
       <configuration> 
        <!-- web.xml is not mandatory since JavaEE 5 --> 
        <failOnMissingWebXml>false</failOnMissingWebXml> 
       </configuration> 
      </plugin> 
     </plugins> 
    </pluginManagement> 
    <resources> 
     <resource> 
      <directory>src/main/resources</directory> 
      <filtering>true</filtering> 
     </resource> 
    </resources> 
    <testResources> 
     <testResource> 
      <directory>src/test/resources</directory> 
      <filtering>true</filtering> 
     </testResource> 
    </testResources> 
</build> 

弹簧安全OAuth的父的pom.xml看到here

+0

你使用从pome pom从womewhere吗?尝试mvn help:effective-pom,看看插件配置了什么 – wemu 2014-10-22 08:12:11

回答

1

的Javadoc插件在父POM构造,即你正在引用(spring-security-oauth-parent)。这意味着你配置这个配置并自动应用到你的项目中。

在父POM的配置如下:

<plugin> 
    <artifactId>maven-javadoc-plugin</artifactId> 
    <executions> 
     <execution> 
     <id>javadoc</id> 
     <phase>package</phase> 
     <goals> 
      <goal>jar</goal> 
     </goals> 
     </execution> 
    </executions> 
    </plugin> 

这是再应用到你的项目,因此你正在生成的Javadoc。

+0

是的,我明白了。这是我的错。 @ DB5,“谢谢”! – 2014-10-24 09:05:14

相关问题