aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhekeguang <hekeguang@chinamobile.com>2020-03-05 14:09:13 +0800
committerhekeguang <hekeguang@chinamobile.com>2020-03-05 14:09:24 +0800
commit7dea5b9b736d3ac6e58472ab653608fb000f3468 (patch)
tree4b4aaff93834fc992f5a1239d329f3fd689985b5
parent670cf51c2bae271e82c63150ab5d9e0accbd1350 (diff)
Add sonar related configuration in POM file.
Issue-ID: USECASEUI-384 Change-Id: I330950fcdf4f75d48777d1a1e13da39441feee8a Signed-off-by: hekeguang <hekeguang@chinamobile.com>
-rw-r--r--server/pom.xml28
1 files changed, 28 insertions, 0 deletions
diff --git a/server/pom.xml b/server/pom.xml
index 047ce57d..d355154c 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -36,6 +36,12 @@
<common.csv.version>1.4</common.csv.version>
<jackson.version>2.9.8</jackson.version>
<tomcat.version>9.0.16</tomcat.version>
+ <sonar.language>java</sonar.language>
+ <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+ <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+ <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+ <sonar.projectVersion>${project.version}</sonar.projectVersion>
+ <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
</properties>
<dependencyManagement>
@@ -411,6 +417,28 @@
</includes>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>