javadoc generated by maven

Posted by void_function on Tue, 26 Nov 2019 21:35:05 +0100

1. Disorderly code

2 custom label

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>${maven_javadoc_version}</version>
    <configuration>
        <aggregate>true</aggregate>
        <tags>
            <tag>
                <name>checkstyle</name>
                <placement>a</placement>
                <head>Skip over checkstyle rule</head>
            </tag>
        </tags>
    </configuration>
    <executions>
        <execution>
            <id>attach-javadoc</id>
            <goals>
                <goal>jar</goal>
            </goals>
            <phase>compile</phase>
        </execution>
    </executions>
</plugin>
 

attribute Explain
name Tag name
placement Where labels apply
head Prefix prompt

The three parameters are basically the same as adding custom tags in step 3 when generating with generate javadoc

It is added as follows:

-tag Date:a: "build date"

-tag Desc:a: "function description"

3 ignore alarms and errors

Common ones like @ return and @param There's no description. Wait

Common configurations on the Internet are as follows:

<plugin>

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

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

 <version>2.10.3</version>

 <executions>

 <execution>

 <id>attach-javadocs</id>

 <goals>

 <goal>jar</goal>

 </goals>

 <configuration>

 <additionalparam>-Xdoclint:none</additionalparam>

 </configuration>

 </execution>

 </executions>

</plugin>

The disadvantage of this method is that only the old version of plug-ins can be used, and the new version of maven does not support it. The new configuration is as follows

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>3.0.1</version>
    <configuration>
        <doclint>none</doclint>
    </configuration>
</plugin>

 

Topics: Maven Apache Attribute