Jenkins配置自定义checkstyle

在pom中加入,checkstyle.xml文件必须和pom文件同级目录

<plugin>    
    <groupId>org.apache.maven.plugins</groupId>    
    <artifactId>maven-checkstyle-plugin</artifactId>    
    <version>2.17</version>  
    <configuration>  
        <consoleOutput>true</consoleOutput>  
        <outputFileFormat>xml</outputFileFormat>  
        <configLocation>checkstyle.xml</configLocation>  
        <linkXRef>false</linkXRef>  
    </configuration>  
    <dependencies>    
        <dependency>    
            <groupId>com.puppycrawl.tools</groupId>    
            <artifactId>checkstyle</artifactId>    
            <version>6.9</version>    
        </dependency>    
    </dependencies>    
</plugin>   

(本邮件是程序自动下发的,请勿回复,<span style=”color:red”>请相关人员fix it,重新提交到git 构建</span>)

a

项目名称:$PROJECT_NAME

构建编号:$BUILD_NUMBER

GIT版本号:${GIT_REVISION}

构建状态:$BUILD_STATUS

触发原因:${CAUSE}

构建日志地址:<a href=”${BUILD_URL}console”>${BUILD_URL}console</a>

构建地址:<a href=”$BUILD_URL”>$BUILD_URL</a>

变更集:${JELLY_SCRIPT,template=”html”}

    原文作者:perfect_jimmy
    原文地址: https://www.jianshu.com/p/0a05b0818668
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞