maven project generates javadoc api

  1. Checkout all code to local directory

  2. Modify the pom.xml of the project and add two sections of configuration, as follows



      

    <plugin>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-javadoc-plugin</artifactId>

    <version>2.9.1</version>

    <configuration>

    <reportOutputDirectory>../javadocs</reportOutputDirectory>

    <destDir>easy-delivery</destDir>

    </configuration>

    </plugin>

     

    <profile>

     <properties>

    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

     </properties>

    </profile>

     

  3. Cmd enter the trunk directory under the project (that is, the directory in pom.xml ) (shortcut operation: enter the directory, shift+ right mouse button, there will be a 'open command window here ( w )', select it), execute mvn javadoc: javadoc command



      

     

  4. The build success appears , that is , the javadoc generation is completed




     
      

  5. After the execution, enter the project root directory, you can view the javadoc

     

     

     

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326012357&siteId=291194637