Skip to content

Commit 9e4743d

Browse files
rnveachromani
authored andcommitted
Issue #40: removed sonar-java-plugin
1 parent 9c10308 commit 9e4743d

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

pom.xml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,11 @@
111111
</properties>
112112

113113
<dependencies>
114-
<!-- till https://github.com/checkstyle/sonar-checkstyle/issues/40 -->
115114
<dependency>
116-
<groupId>org.sonarsource.java</groupId>
117-
<artifactId>sonar-java-plugin</artifactId>
118-
<version>${sonar-java.version}</version>
115+
<groupId>com.fasterxml.staxmate</groupId>
116+
<artifactId>staxmate</artifactId>
117+
<version>2.4.0</version>
119118
<scope>provided</scope>
120-
<!-- to avoid 4.5.1 api pickup -->
121-
<exclusions>
122-
<exclusion>
123-
<groupId>org.codehaus.sonar</groupId>
124-
<artifactId>sonar-plugin-api</artifactId>
125-
</exclusion>
126-
</exclusions>
127119
</dependency>
128120
<!-- required to load external descriptiona, see CheckstyleRulesDefinition -->
129121
<dependency>

src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.sonar.api.batch.sensor.Sensor;
2323
import org.sonar.api.batch.sensor.SensorContext;
2424
import org.sonar.api.batch.sensor.SensorDescriptor;
25-
import org.sonar.plugins.java.Java;
2625

2726
public class CheckstyleSensor implements Sensor {
2827

@@ -34,7 +33,7 @@ public CheckstyleSensor(CheckstyleExecutor executor) {
3433

3534
@Override
3635
public void describe(SensorDescriptor descriptor) {
37-
descriptor.onlyOnLanguage(Java.KEY).name("CheckstyleSensor");
36+
descriptor.onlyOnLanguage("java").name("CheckstyleSensor");
3837
}
3938

4039
@Override

src/test/java/org/sonar/plugins/checkstyle/CheckstyleSensorTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.junit.Test;
2828
import org.sonar.api.batch.sensor.SensorContext;
2929
import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor;
30-
import org.sonar.plugins.java.Java;
3130

3231
public class CheckstyleSensorTest {
3332

@@ -37,7 +36,7 @@ public void shouldDescribePluginCorrectly() {
3736
final CheckstyleSensor sensor = new CheckstyleSensor(null);
3837

3938
sensor.describe(descriptor);
40-
assertThat(descriptor.languages()).containsOnly(Java.KEY);
39+
assertThat(descriptor.languages()).containsOnly("java");
4140
assertThat(descriptor.name()).isNotEmpty();
4241
}
4342

0 commit comments

Comments
 (0)