Skip to content

Commit

Permalink
Merge pull request #373 from geneontology/sonarqube
Browse files Browse the repository at this point in the history
added support for sonarqube
  • Loading branch information
balhoff committed Mar 29, 2021
2 parents 8094173 + 44342c9 commit 0a91235
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 2 deletions.
27 changes: 27 additions & 0 deletions INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [Running Tests](#running-tests)
- [Failing Tests](#failing-tests)
- [Quick Test via `curl`](#quick-test-via-curl)
- [Sonarqube](#Sonarqube)
- [Obtaining `owl-models` and `go-lego.owl`](#obtaining-owl-models-and-go-legoowl)
- [Useful source files for learning](#useful-source-files-for-learning)
- [Using the Blazegraph model store](#using-the-blazegraph-model-store)
Expand Down Expand Up @@ -110,6 +111,32 @@ This assumes you are in the `minerva/` directory, which is the parent of `minerv
curl localhost:6800/`cat minerva-server/src/test/resources/server-test/long-get.txt`
```

### Sonarqube

Run sonarqube server locally using docker and ensure it is up and running by visiting [http://localhost:9000](http://localhost:9000)

```
docker run -d --rm --name sonarqube -p 9000:9000 sonarqube:7.9.6-community
```

For static analysis:

```
mvn clean package sonar:sonar -DskipTests
```

For static analysis and code coverage:

```
mvn clean package sonar:sonar
```

Stopping sonarqube docker container. This would automatically remove the container since the <i>--rm</i> option was used above.

```
docker stop sonarqube
```

## Obtaining `owl-models` and `go-lego.owl`

See [Monarch Ontology](https://github.com/monarch-initiative/monarch-ontology) and use the instructions there to generate a `catalog-v001.xml`.
Expand Down
18 changes: 18 additions & 0 deletions minerva-converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@
<artifactId>minerva-converter</artifactId>
<name>Minerva-Converter</name>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/FooTest.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.geneontology</groupId>
Expand Down
4 changes: 4 additions & 0 deletions minerva-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 4 additions & 0 deletions minerva-lookup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 4 additions & 0 deletions minerva-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
25 changes: 23 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<source>8</source>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
Expand Down Expand Up @@ -82,10 +83,30 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<argLine>-Xmx5G</argLine>
<configuration>
<argLine>@{argLine} -Xmx5G</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</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>
<pluginManagement>
<plugins>
Expand Down

0 comments on commit 0a91235

Please sign in to comment.