zoukankan      html  css  js  c++  java
  • maven~生成spotbug文档

    对于maven的一些插件来说,它们也都有着自己的依赖关系,建议把依赖的包和插件也写到pom里,如果你不写,在mvn时,它会自己去下载,如图:
    1
    如果你希望生成spotbug文档,你可以添加下面的几个插件,注意它们的版本号,需要对应清楚

     <plugins>
                <!-- 代码检查 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.1</version>
                    <executions>
                        <execution>
                            <id>checkstyle</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.29</version>
                        </dependency>
    
                    </dependencies>
                    <configuration>
                        <configLocation>/google_checkstyle.xml</configLocation>
                        <encoding>UTF-8</encoding>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                    </configuration>
                </plugin>
                <!-- bug检查 -->
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>4.0.4</version>
    
                    <executions>
                        <execution>
                            <id>check</id>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.spotbugs</groupId>
                            <artifactId>spotbugs</artifactId>
                            <version>4.1.2</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <!-- mvn site时使用 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.8.2</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-site-renderer</artifactId>
                            <version>1.9.2</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                    </configuration>
                </plugin>
    
            </plugins>
        </build>
    

    然后使用下面命令去生成文档

    mvn site
    

    生成需要一些时间,之后的结果如图
    d

  • 相关阅读:
    table中tr间距的设定table合并单元格 colspan(跨列)和rowspan(跨行)
    使用jquery触发a标签跳转
    真正的让iframe自适应高度 兼容多种浏览器随着窗口大小改变
    html5 data属性的使用
    jQuery取得select选择的文本与值
    jqueryui教程
    密码复杂度
    zabbix配置微信报警
    tomcat配置域名访问
    阿里云ecs禁止ping,禁止telnet
  • 原文地址:https://www.cnblogs.com/lori/p/13602605.html
Copyright © 2011-2022 走看看