Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG VERSION=latest
FROM sonarqube:${VERSION}

COPY target/sonar-clover-plugin.jar /opt/sonarqube/extensions/plugins/
COPY target/sonar-clover-plugin.jar /opt/sonarqube/extensions/plugins/
ADD https://github.com/Inform-Software/sonar-groovy/releases/download/1.8/sonar-groovy-plugin-1.8.jar /opt/sonarqube/extensions/plugins/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that we can use an external lib. maybe should it be included in our own jar 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why I added the sonar-groovy-plugin, but I found something I believed was caused by the missing registration of the grvy language code.
I've tried to recreate the problem, but I can't, so it's not needed after all.
I'll remove it and amend the PR.

36 changes: 34 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>io.github.sfeir-open-source</groupId>
<artifactId>sonar-clover-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<version>4.2-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>

<name>Sonar Clover Plugin</name>
<description>Get code coverage with http://openclover.org/</description>
Expand Down Expand Up @@ -43,7 +43,7 @@
</distributionManagement>

<properties>
<sonar.version>6.7</sonar.version>
<sonar.version>9.1.0.47736</sonar.version>
<sonar.pluginName>Clover</sonar.pluginName>
<sonar.pluginClass>org.sonar.plugins.clover.CloverPlugin</sonar.pluginClass>
<sonar.pluginUrl>${project.scm.url}</sonar.pluginUrl>
Expand All @@ -61,6 +61,13 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-plugin-api-impl</artifactId>
<version>${sonar.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
Expand All @@ -85,7 +92,31 @@
<version>3.0.0</version>
</dependency>

<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-lgpl</artifactId>
<version>4.4.1</version>
</dependency>

<dependency>
<groupId>org.codehaus.staxmate</groupId>
<artifactId>staxmate</artifactId>
<version>2.0.1</version>
</dependency>

<!-- unit tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-testing-harness</artifactId>
Expand All @@ -102,6 +133,7 @@
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
5 changes: 3 additions & 2 deletions src/test/java/org/sonar/plugins/clover/CloverPluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public class CloverPluginTest {
@Test
public void test_define() {
final Plugin.Context context = new Plugin.Context(SonarRuntimeImpl.forSonarQube(
Version.parse("6.7.4"),
SonarQubeSide.SCANNER));
Version.parse("9.1.0"),
null,
null));
new CloverPlugin().define(context);
assertThat(context.getExtensions()).hasSize(1);
}
Expand Down