Skip to content

Commit

Permalink
[OHFJIRA-79] : integration with sonar
Browse files Browse the repository at this point in the history
* added sonar maven plugin
* travis pipeline updated to report to sonarcloud.io
  • Loading branch information
kkovarik committed Nov 26, 2018
1 parent af24b85 commit 0d1abe8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .travis.yml
@@ -1,4 +1,9 @@
language: java
addons:
  sonarcloud:
    organization: "openwisesolutions" # registered at sonarcloud.io
    token:
      secure: $SONAR_TOKEN
jdk:
- oraclejdk8
env:
Expand All @@ -19,7 +24,8 @@ after_success:
- .utility/push-javadoc-to-gh-pages.sh
- .utility/publish-artifacts.sh
# 'coveralls:report' goal is responsible for updating coverall.io stats once travisCI build completes
- mvn coveralls:report
- mvn coveralls:report
- mvn spotbugs:spotbugs sonar:sonar -Dsonar.projectKey=OpenWiseSolutions_openhub-framework -Dsonar.organization=openwisesolutions
cache:
directories:
- $HOME/.m2
Expand Down
13 changes: 13 additions & 0 deletions pom.xml
Expand Up @@ -208,6 +208,8 @@
<jolokia-version>1.3.5</jolokia-version>
<!-- plugins -->
<spotbugs-maven-plugin.version>3.1.8</spotbugs-maven-plugin.version>
<sonar-maven-plugin.version>3.5.0.1254</sonar-maven-plugin.version>
<sonar.java.spotbugs.reportPaths>target/spotbugsXml.xml</sonar.java.spotbugs.reportPaths>
<!-- java ee -->
<jaxb.version>2.2.11</jaxb.version>
<jaxws.version>2.2.12</jaxws.version>
Expand Down Expand Up @@ -770,6 +772,12 @@
<goals>deploy</goals>
</configuration>
</plugin>

<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>

Expand Down Expand Up @@ -853,6 +861,11 @@
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 0d1abe8

Please sign in to comment.