Skip to content

Commit 7f190c2

Browse files
committed
Init Lot2
1 parent 23d52a9 commit 7f190c2

File tree

3 files changed

+73
-5
lines changed

3 files changed

+73
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ buildNumber.properties
1919
# Avoid ignoring Eclipse project specific configuration if someone use another IDE
2020
# /.project
2121
/bin/
22+
# Web
23+
/node/
24+
/node_modules/

pom.xml

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>fr.cnes.sonarqube.plugins</groupId>
66
<artifactId>sonar-icode-plugin</artifactId>
77
<packaging>sonar-plugin</packaging>
8-
<version>0.0.1-SNAPSHOT</version>
8+
<version>1.0.0-SNAPSHOT</version>
99
<name>ICode</name>
1010

1111
<description>ICode plugin for Sonarqube</description>
@@ -42,21 +42,33 @@
4242
<properties>
4343
<jdk.version>1.8</jdk.version>
4444
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
45-
<sonarqube.version>5.6</sonarqube.version>
45+
<sonar.apiVersion>6.6</sonar.apiVersion>
4646
<slf4j.version>1.7.25</slf4j.version>
4747
<junit.version>4.12</junit.version>
4848
<project.key>icode</project.key>
49+
<sonar.sources>src/main/java,src/main/js</sonar.sources>
4950
</properties>
5051

5152
<dependencies>
5253
<dependency>
5354
<groupId>org.sonarsource.sonarqube</groupId>
5455
<artifactId>sonar-plugin-api</artifactId>
55-
<version>${sonarqube.version}</version>
56+
<version>${sonar.apiVersion}</version>
5657
<scope>provided</scope>
5758
</dependency>
58-
59+
<dependency>
60+
<!-- packaged with the plugin -->
61+
<groupId>commons-lang</groupId>
62+
<artifactId>commons-lang</artifactId>
63+
<version>2.6</version>
64+
</dependency>
5965
<!-- unit tests -->
66+
<dependency>
67+
<groupId>org.sonarsource.sonarqube</groupId>
68+
<artifactId>sonar-testing-harness</artifactId>
69+
<version>${sonar.apiVersion}</version>
70+
<scope>test</scope>
71+
</dependency>
6072
<dependency>
6173
<groupId>junit</groupId>
6274
<artifactId>junit</artifactId>
@@ -94,6 +106,54 @@
94106
<target>${jdk.version}</target>
95107
<encoding>${project.build.sourceEncoding}</encoding>
96108
</configuration>
109+
</plugin>
110+
<plugin>
111+
<groupId>com.github.eirslett</groupId>
112+
<artifactId>frontend-maven-plugin</artifactId>
113+
<version>1.6</version>
114+
<executions>
115+
<execution>
116+
<phase>generate-resources</phase>
117+
<id>install node and yarn</id>
118+
<goals>
119+
<goal>install-node-and-yarn</goal>
120+
</goals>
121+
<configuration>
122+
<nodeVersion>v8.5.0</nodeVersion>
123+
<yarnVersion>v1.1.0</yarnVersion>
124+
</configuration>
125+
</execution>
126+
<execution>
127+
<id>yarn install</id>
128+
<goals>
129+
<goal>yarn</goal>
130+
</goals>
131+
</execution>
132+
<execution>
133+
<phase>generate-resources</phase>
134+
<id>yarn run script</id>
135+
<goals>
136+
<goal>yarn</goal>
137+
</goals>
138+
<configuration>
139+
<arguments>run build</arguments>
140+
</configuration>
141+
</execution>
142+
</executions>
143+
</plugin>
144+
<plugin>
145+
<!-- UTF-8 bundles are not supported by Java, so they must be converted
146+
during build -->
147+
<groupId>org.codehaus.mojo</groupId>
148+
<artifactId>native2ascii-maven-plugin</artifactId>
149+
<version>1.0-beta-1</version>
150+
<executions>
151+
<execution>
152+
<goals>
153+
<goal>native2ascii</goal>
154+
</goals>
155+
</execution>
156+
</executions>
97157
</plugin>
98158
</plugins>
99159
</build>

src/main/java/fr/cnes/sonarqube/plugins/icode/ICodePlugin.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import fr.cnes.sonarqube.plugins.icode.measures.ICodeSensor;
5151
import fr.cnes.sonarqube.plugins.icode.rules.ICodeRulesDefinition;
5252
import fr.cnes.sonarqube.plugins.icode.settings.ICodeLanguageProperties;
53+
import fr.cnes.sonarqube.plugins.icode.web.ICodeDashboard;
5354

5455
/**
5556
* This class is the entry point for all extensions
@@ -94,7 +95,11 @@ public void define(Context context) {
9495

9596
// Rules definition
9697
context.addExtension(ICodeRulesDefinition.class);
97-
98+
99+
// Dashboard
100+
context.addExtension(
101+
ICodeDashboard.class);
102+
98103
// Sonar scanner extension
99104
context.addExtension(ICodeSensor.class);
100105
}

0 commit comments

Comments
 (0)