Updated POM to include additional properties. Removed references to cobertura since it isn't supported by SonarQube 6.x. Added new properties to support the checking of branches.

This commit is contained in:
Chris Jones 2017-03-29 13:25:32 -05:00
parent edf49b5638
commit 1d066df8a3
2 changed files with 52 additions and 61 deletions

106
pom.xml
View file

@ -6,13 +6,13 @@
<groupId>org.springframework.samples</groupId> <groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic</artifactId> <artifactId>spring-petclinic</artifactId>
<version>1.4.2</version> <version>1.4.2</version>
<name>Spring Pet Clinic</name>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version> <version>1.4.2.RELEASE</version>
</parent> </parent>
<name>petclinic</name>
<properties> <properties>
<!-- Generic properties --> <!-- Generic properties -->
@ -29,15 +29,11 @@
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version> <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version> <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>
<!--
<cobertura.version>2.7</cobertura.version>
-->
<!-- Sonar properties -->
<sonar.host.url>http://sonarqube.kcura.corp/</sonar.host.url> <sonar.host.url>http://sonarqube.kcura.corp/</sonar.host.url>
<sonar.exclusions>pom.xml</sonar.exclusions> <sonar.junit.reportsPath>target/surefire-reports</sonar.junit.reportsPath>
<sonar.sources>src/main</sonar.sources> <sonar.branch>master</sonar.branch>
<sonar.jacoco.reportPaths>target/coverage-reports/jacoco-unit.exec</sonar.jacoco.reportPaths> <sonar.sources>src/main/java,src/main/less,src/main/resources,src/main/wro</sonar.sources>
<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
</properties> </properties>
<!-- <!--
@ -60,39 +56,40 @@
</distributionManagement> </distributionManagement>
--> -->
<scm>
<connection>scm:git:https://github.com/Blackhound/spring-petclinic</connection>
<developerConnection>scm:git:https://github.com/Blackhound/spring-petclinic</developerConnection>
<url>https://localhost:8080</url>
</scm>
<dependencies> <dependencies>
<!-- Spring and Spring Boot dependencies --> <!-- Spring and Spring Boot dependencies -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId> <artifactId>spring-boot-starter-cache</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId> <artifactId>spring-boot-starter-thymeleaf</artifactId>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId> <artifactId>groovy</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
@ -105,7 +102,6 @@
<artifactId>hsqldb</artifactId> <artifactId>hsqldb</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
@ -117,7 +113,6 @@
<groupId>javax.cache</groupId> <groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId> <artifactId>cache-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.ehcache</groupId> <groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId> <artifactId>ehcache</artifactId>
@ -128,19 +123,16 @@
<groupId>org.webjars</groupId> <groupId>org.webjars</groupId>
<artifactId>webjars-locator</artifactId> <artifactId>webjars-locator</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.webjars</groupId> <groupId>org.webjars</groupId>
<artifactId>jquery</artifactId> <artifactId>jquery</artifactId>
<version>${webjars-jquery.version}</version> <version>${webjars-jquery.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.webjars</groupId> <groupId>org.webjars</groupId>
<artifactId>jquery-ui</artifactId> <artifactId>jquery-ui</artifactId>
<version>${webjars-jquery-ui.version}</version> <version>${webjars-jquery-ui.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.webjars</groupId> <groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId> <artifactId>bootstrap</artifactId>
@ -162,22 +154,21 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
<version>2.4.7</version> <version>2.4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.java</groupId>
<artifactId>sonar-jacoco-listeners</artifactId>
<version>3.8</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.5</version>
</plugin>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
@ -201,28 +192,15 @@
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>0.7.9</version>
<configuration> <configuration>
<destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile> <runOrder>random</runOrder>
<dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
</configuration> </configuration>
<executions> </plugin>
<execution>
<id>jacoco-initialize</id> <!-- Spring Boot Actuator displays build-related information if a git.properties
<goals> file is present at the classpath -->
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Spring Boot Actuator displays build-related information if a git.properties
file is present at the classpath
-->
<!--
<plugin> <plugin>
<groupId>pl.project13.maven</groupId> <groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId> <artifactId>git-commit-id-plugin</artifactId>
@ -241,7 +219,6 @@
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory> <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
</configuration> </configuration>
</plugin> </plugin>
-->
<plugin> <plugin>
<groupId>ro.isdc.wro4j</groupId> <groupId>ro.isdc.wro4j</groupId>
@ -306,6 +283,27 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build> </build>
</project> </project>

View file

@ -1,7 +0,0 @@
# Required metadata
sonar.projectKey=spring-petclinic
sonar.projectName=Spring Pet Clinic
sonar.projectVersion=1.4.2
# Encoding of the source files
sonar.sourceEncoding=UTF-8