Added maven pmd plugin and configured it to fail build when violations are found #327
This commit is contained in:
parent
3d8c64d76d
commit
df911baf36
3
exclude-pmd.properties
Normal file
3
exclude-pmd.properties
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
com.iluwatar.servicelayer.common.BaseEntity=UnusedPrivateField
|
||||||
|
com.iluwatar.doublechecked.locking.App=EmptyStatementNotInLoop,EmptyWhileStmt
|
||||||
|
com.iluwatar.doublechecked.locking.InventoryTest=EmptyStatementNotInLoop,EmptyWhileStmt
|
30
pom.xml
30
pom.xml
@ -296,7 +296,37 @@
|
|||||||
<argLine>-Xmx1024M ${argLine}</argLine>
|
<argLine>-Xmx1024M ${argLine}</argLine>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.6</version>
|
||||||
|
<configuration>
|
||||||
|
<failOnViolation>true</failOnViolation>
|
||||||
|
<failurePriority>5</failurePriority>
|
||||||
|
<printFailingErrors>true</printFailingErrors>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<excludeFromFailureFile>exclude-pmd.properties</excludeFromFailureFile>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.6</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user