-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7e040d
commit ad8fd12
Showing
1 changed file
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# Java Maven-based project analyzed on SonarQube.com using Travis | ||
# Standard SQ-Scanner-based project analyzed on SonarQube.com using Travis | ||
|
||
[![Build status](https://travis-ci.org/SonarSource/sq-com_example_java-maven-travis.svg?branch=master)](https://travis-ci.org/SonarSource/sq-com_example_java-maven-travis) [![Quality Gate](https://sonarqube.com/api/badges/gate?key=com.sonarqube.examples:java-maven-travis-project)](https://sonarqube.com/dashboard/index/com.sonarqube.examples:java-maven-travis-project) | ||
[![Build status](https://travis-ci.org/SonarSource/sq-com_example_standard-sqscanner-travis.svg?branch=master)](https://travis-ci.org/SonarSource/sq-com_example_standard-sqscanner-travis) [![Quality Gate](https://sonarqube.com/api/badges/gate?key=com.sonarqube.examples.standard-sqscanner-travis-project)](https://sonarqube.com/dashboard/index/com.sonarqube.examples.standard-sqscanner-travis-project) | ||
|
||
#### This project is analysed on [SonarQube.com](https://sonarqube.com)! | ||
|
||
It is very easy to run an analysis on a Maven-based project and push it to SonarQube.com. | ||
You simply have to do 2 things in your `.travis.yml` file: | ||
* Activate the [SonarQube.com Travis Add-on](https://docs.travis-ci.com/user/sonarqube/) | ||
* Run `mvn sonar:sonar` at some point of time in the `script` section | ||
It is very easy to run an analysis on a project and push it to SonarQube.com: | ||
|
||
You can take a look at the [.travis.yml file](https://github.com/SonarSource/sq-com_example_java-maven-travis/blob/master/.travis.yml) | ||
of this project to see it in practice. | ||
1. Create a `sonar-project.properties` files to store your configuration - like `sonar.projectKey` or `sonar.sources` | ||
2. In your `.travis.yml` file: | ||
1. Activate the [SonarQube.com Travis Add-on](https://docs.travis-ci.com/user/sonarqube/) | ||
2. Run `sonar-scanner` at some point of time in the `script` section | ||
|
||
You can take a look at the | ||
[sonar-project.properties](https://github.com/SonarSource/sq-com_example_standard-sqscanner-travis/blob/master/sonar-project.properties) | ||
and | ||
[.travis.yml](https://github.com/SonarSource/sq-com_example_standard-sqscanner-travis/blob/master/.travis.yml) | ||
files of this project to see it in practice. |