diff options
author | ramverma <ram.krishna.verma@ericsson.com> | 2018-08-23 13:50:31 +0100 |
---|---|---|
committer | ramverma <ram.krishna.verma@ericsson.com> | 2018-08-24 10:04:31 +0100 |
commit | ef2ff6bae65870a4fccc25373c0cfae881e14a81 (patch) | |
tree | 2329de6759a3f74237b8a64dcbe63d7114f532ef /pom.xml | |
parent | 55e6bdc93d05f1c9673a4ecbe133207722216eb0 (diff) |
Fix sonar and checkstyle issues in distribution
* Fixing all check style issues.
* Fixing all sonar issues.
* Adding maven check style plugin to fail at warning level.
Change-Id: I791b8feef39a3a0c3e1e250efea7b6e78208bf07
Issue-ID: POLICY-1035
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 40 |
1 files changed, 39 insertions, 1 deletions
@@ -39,11 +39,13 @@ <properties> <!-- sonar/jacoco overrides --> - <!-- Overriding oparent default sonar/jacoco settings Combine all our reports + <!-- Overriding oparent default sonar/jacoco settings Combine all our reports into one file shared across sub-modules --> <sonar.jacoco.reportPath>${project.basedir}/../target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath> <sonar.jacoco.itReportPath>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath> <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> + + <policy.common.version>1.3.0-SNAPSHOT</policy.common.version> </properties> <modules> @@ -114,6 +116,42 @@ </execution> </executions> </plugin> + <plugin> + <artifactId>maven-checkstyle-plugin</artifactId> + <executions> + <execution> + <id>onap-java-style</id> + <goals> + <goal>check</goal> + </goals> + <phase>process-sources</phase> + <configuration> + <!-- Use Google Java Style Guide: + https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml + with minor changes --> + <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> + <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory --> + <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory> + <includeResources>true</includeResources> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <includeTestResources>true</includeTestResources> + <excludes> + </excludes> + <consoleOutput>true</consoleOutput> + <failOnViolation>true</failOnViolation> + <violationSeverity>warning</violationSeverity> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.onap.oparent</groupId> + <artifactId>checkstyle</artifactId> + <version>1.1.0</version> + <scope>compile</scope> + </dependency> + </dependencies> + </plugin> </plugins> <pluginManagement> <plugins> |