diff options
author | Bin Sun <bins@vmware.com> | 2018-03-07 16:20:06 +0800 |
---|---|---|
committer | Bin Sun <bins@vmware.com> | 2018-03-08 11:12:26 +0800 |
commit | 2d234a07e13171c56672630e8a86ec8ff84707dc (patch) | |
tree | 4c952a22164b402d9442adb796906bf6733398f0 /pom.xml | |
parent | ee2c026175ece751a22e72fc0888745b329d15c2 (diff) |
Fix sonar code coverage
Change-Id: I3e899e3be5f200cbf494e8275d05523a7e49e073
Issue-ID: MULTICLOUD-173
Signed-off-by: Bin Sun <bins@vmware.com>
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 55 |
1 files changed, 55 insertions, 0 deletions
@@ -33,6 +33,8 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <nexusproxy>https://nexus.onap.org</nexusproxy> + + <sonar.sourceEncoding>UTF-8</sonar.sourceEncoding> <sonar.sources>.</sonar.sources> <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath> <sonar.python.coverage.reportPath>vio/coverage.xml</sonar.python.coverage.reportPath> @@ -42,5 +44,58 @@ <sonar.exclusions>tests/*,setup.py</sonar.exclusions> </properties> <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <configuration> + <executable>${session.executionRootDirectory}/sonar.sh</executable> + <environmentVariables> + <!-- make mvn properties as env for our script --> + <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> + <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> + <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> + </environmentVariables> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <id>clean phase script</id> + <phase>clean</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>__</argument> + <argument>clean</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>test script</id> + <phase>test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>__</argument> + <argument>test</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> </build> </project> |