Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
targeting 6.0 api version and fix NoClassDefFound errors for google g…
Browse files Browse the repository at this point in the history
…uava when using sonarsource sonar-maven-plugin > 3.0
  • Loading branch information
Sascha Theves authored and Sascha Theves committed Oct 26, 2016
1 parent 981acfa commit 7909f2d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
34 changes: 25 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,29 @@
<groupId>com.pablissimo.sonar</groupId>
<artifactId>sonar-typescript-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<version>0.93-SNAPSHOT</version>
<version>0.94-SNAPSHOT</version>

<name>TypeScript</name>
<description>Analyse TypeScript projects</description>
<inceptionYear>2013</inceptionYear>
<url>https://github.com/pablissimo/SonarTsPlugin</url>

<organisation>
<name>Paul O'Neill (pablissimo) and contributors</name>
<url>https://github.com/pablissimo/SonarTsPlugin</url>
</organisation>

<developers>
<developer>
<id>pablissimo</id>
<name>Paul O'Neill</name>
<url>http://pablissimo.com</url>
</developer>
<developer>
<id>stheves</id>
<name>Sascha Theves</name>
<url>http://thev.es</url>
</developer>
</developers>

<scm>
Expand All @@ -39,13 +44,13 @@
<system>Travis</system>
<url>https://travis-ci.org/pablissimo/SonarTsPlugin</url>
</ciManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<sonar.buildVersion>5.6</sonar.buildVersion>
<sonar.buildVersion>6.0</sonar.buildVersion>
<jdk.min.version>1.8</jdk.min.version>
<sslr.version>1.21</sslr.version>
<slf4j.version>1.7.21</slf4j.version>
</properties>

<dependencies>
Expand All @@ -55,13 +60,23 @@
<version>${sonar.buildVersion}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.sonarsource.sslr</groupId>
<artifactId>sslr-core</artifactId>
<version>${sslr.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand All @@ -78,6 +93,7 @@
<dependency>
<groupId>org.sonarsource.sslr</groupId>
<artifactId>sslr-testing-harness</artifactId>
<scope>test</scope>
<version>${sslr.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -135,7 +151,7 @@
<configuration>
<source>${jdk.min.version}</source>
<target>${jdk.min.version}</target>

<showDeprecation>true</showDeprecation>
<compilerArgs>
<arg>-Xlint:all</arg>
Expand Down
13 changes: 5 additions & 8 deletions src/test/java/com/pablissimo/sonar/TypeScriptPluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.codehaus.plexus.context.DefaultContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.Plugin;
import org.sonar.api.Properties;
import org.sonar.api.Property;
import org.sonar.api.PropertyType;
import org.sonar.api.SonarQubeVersion;
import org.sonar.api.*;
import org.sonar.api.internal.SonarRuntimeImpl;
import org.sonar.api.utils.Version;

public class TypeScriptPluginTest {
TypeScriptPlugin plugin;
Expand All @@ -32,10 +29,10 @@ public void tearDown() throws Exception {

@Test
public void advertisesAppropriateExtensions() {
Plugin.Context context = new Plugin.Context(SonarQubeVersion.V5_6);
Plugin.Context context = new Plugin.Context(SonarRuntimeImpl.forSonarQube(Version.create(5, 6), SonarQubeSide.SERVER));

this.plugin.define(context);

List extensions = context.getExtensions();

assertEquals(5, extensions.size());
Expand Down

0 comments on commit 7909f2d

Please sign in to comment.