我总共有7个项目,其中1个是父项目,6个是子项目。
我有以下3种情况:
Checkstyle report for all project.n parent pom i declared checkstyle plugin in tag:
I run
mvn clean site
commandIt working both ways in eclipse with maven. and in Jenkins also.
Giving checkstyle reports for all 7 projects.
Checkstyle report for all project except 2 project.
I deleted part in parent pom and i added
I added in remaining 4 projects, i declared checkstyle plugin in tag.
It working in eclipse but not working in Jenkins.
Please give solution
My code:
<reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.10</version> <configuration> <configLocation>../parent-project/checkstyle.xml</configLocation> </configuration> </plugin> </plugins>
3.
- I deleted checkstyle plugin in parent
- I added checkstyle plugin in 4 needed projects same above code.
In remaining 2 child projects I added like this.
<reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.10</version> <configuration> <skip>true</skip> </configuration> </plugin> </plugins>
I run 'mvn clean site'
- It working in Maven as expected but not working in Jenkins.
我所说的“在Jenkins中无法工作”是指我在Jenkins中安装了Checkstyle插件,在Jenkins任务中选择了“发布Checkstyle分析结果”的复选框。在方案1中,我能够在Jenkins任务页面上看到Checkstyle链接。如果我点击它,所有代码违规报告都会显示出来。但在其他方案(2、3)中,Checkstyle链接也没有出现。