Skip to content

Commit a3cc6ee

Browse files
author
Gilles Grousset
committed
Layout refactoring and API upgrade
1 parent fa96108 commit a3cc6ee

File tree

58 files changed

+1429
-839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1429
-839
lines changed

build-and-deploy.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
#!/bin/sh
2+
#
3+
# Swift SonarQube Plugin - Enables analysis of Swift projects into SonarQube.
4+
# Copyright © 2015 Backelite (${email})
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU Lesser General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU Lesser General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Lesser General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
220
# Build and install snapshot plugin in Sonar
321

422
# Build first and check status
@@ -16,9 +34,9 @@ fi
1634
#fi
1735

1836
# Deploy new version of plugin in Sonar dir
19-
rm target/*sources.jar
37+
rm sonar-swift-plugin/target/*sources.jar
2038
rm $SONARQUBE_HOME/extensions/plugins/backelite-sonar-swift*
21-
cp target/*.jar $SONARQUBE_HOME/extensions/plugins
39+
cp sonar-swift-plugin/target/*.jar $SONARQUBE_HOME/extensions/plugins
2240
rm $SONARQUBE_HOME/extensions/plugins/*sources.jar
2341

2442
# Stop/start Sonar

pom.xml

Lines changed: 187 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Swift SonarQube Plugin - Enables analysis of Swift projects into SonarQube.
5+
Copyright © 2015 Backelite (${email})
6+
7+
This program is free software: you can redistribute it and/or modify
8+
it under the terms of the GNU Lesser General Public License as published by
9+
the Free Software Foundation, either version 3 of the License, or
10+
(at your option) any later version.
11+
12+
This program is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU Lesser General Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General Public License
18+
along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+
-->
221
<project xmlns="http://maven.apache.org/POM/4.0.0"
322
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
423
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -18,22 +37,20 @@
1837
</pluginRepository>
1938
</pluginRepositories>
2039

21-
<parent>
22-
<groupId>org.codehaus.sonar-plugins</groupId>
23-
<artifactId>parent</artifactId>
24-
<version>18</version>
25-
</parent>
26-
2740
<groupId>com.backelite.sonarqube</groupId>
28-
<artifactId>backelite-sonar-swift-plugin</artifactId>
41+
<artifactId>backelite-swift</artifactId>
2942
<version>0.3.5</version>
3043

31-
<packaging>sonar-plugin</packaging>
44+
<packaging>pom</packaging>
3245

3346
<name>Swift SonarQube Plugin</name>
3447
<description>Enables analysis of Swift projects into SonarQube.</description>
3548
<url>https://github.com/Backelite/sonar-swift</url>
3649

50+
<modules>
51+
<module>sonar-swift-plugin</module>
52+
</modules>
53+
3754

3855
<inceptionYear>2015</inceptionYear>
3956
<organization>
@@ -63,62 +80,99 @@
6380

6481
<properties>
6582
<license.owner>Backelite</license.owner>
83+
<license.email>[email protected]</license.email>
6684
<license.title>SonarQube Swift Plugin</license.title>
6785

6886
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
6987

70-
<sonar.version>5.0</sonar.version>
71-
<sslr.version>1.20</sslr.version>
88+
<sonarQubeMinVersion>5.6</sonarQubeMinVersion>
7289

73-
<!-- Configuration for sonar-packaging-maven-plugin -->
74-
<sonar.pluginClass>org.sonar.plugins.swift.SwiftPlugin</sonar.pluginClass>
75-
<sonar.pluginName>Swift (Backelite)</sonar.pluginName>
90+
<assertj.version>3.5.2</assertj.version>
91+
<commons-io.version>2.5</commons-io.version>
92+
<commons-lang.version>2.6</commons-lang.version>
93+
<guava.version>17.0</guava.version>
94+
<junit.version>4.10</junit.version>
95+
<logback.version>1.0.13</logback.version>
96+
<mockito.version>1.9.0</mockito.version>
97+
<slf4j.version>1.7.21</slf4j.version>
98+
<sonar.version>5.6</sonar.version>
99+
<sonar-orchestrator.version>3.13</sonar-orchestrator.version>
100+
<sonarlint.version>2.5.0.36</sonarlint.version>
101+
<sslr.version>1.22</sslr.version>
102+
<sslr-squid-bridge.version>2.6.1</sslr-squid-bridge.version>
103+
<gson.version>2.6.2</gson.version>
104+
<ant.version>1.6</ant.version>
76105

77106
</properties>
78107

79108
<dependencies>
109+
110+
<!-- Default dependencies (compile) -->
80111
<dependency>
81-
<groupId>org.codehaus.sonar</groupId>
82-
<artifactId>sonar-plugin-api</artifactId>
83-
<version>${sonar.version}</version>
84-
<scope>provided</scope>
112+
<groupId>org.sonarsource.sslr</groupId>
113+
<artifactId>sslr-core</artifactId>
114+
<version>${sslr.version}</version>
85115
</dependency>
86116
<dependency>
87-
<groupId>org.codehaus.sonar</groupId>
88-
<artifactId>sonar-testing-harness</artifactId>
89-
<version>${sonar.version}</version>
90-
<scope>test</scope>
117+
<groupId>org.sonarsource.sslr-squid-bridge</groupId>
118+
<artifactId>sslr-squid-bridge</artifactId>
119+
<version>${sslr-squid-bridge.version}</version>
120+
<exclusions>
121+
<exclusion>
122+
<groupId>org.codehaus.sonar.sslr</groupId>
123+
<artifactId>sslr-core</artifactId>
124+
</exclusion>
125+
<exclusion>
126+
<groupId>org.codehaus.sonar.sslr</groupId>
127+
<artifactId>sslr-xpath</artifactId>
128+
</exclusion>
129+
<exclusion>
130+
<groupId>org.codehaus.sonar</groupId>
131+
<artifactId>sonar-plugin-api</artifactId>
132+
</exclusion>
133+
<exclusion>
134+
<groupId>org.picocontainer</groupId>
135+
<artifactId>picocontainer</artifactId>
136+
</exclusion>
137+
<exclusion>
138+
<groupId>org.slf4j</groupId>
139+
<artifactId>slf4j-api</artifactId>
140+
</exclusion>
141+
<exclusion>
142+
<groupId>org.slf4j</groupId>
143+
<artifactId>jcl-over-slf4j</artifactId>
144+
</exclusion>
145+
</exclusions>
91146
</dependency>
92-
93147
<dependency>
94-
<groupId>org.codehaus.sonar.sslr</groupId>
95-
<artifactId>sslr-core</artifactId>
96-
<version>${sslr.version}</version>
148+
<groupId>commons-lang</groupId>
149+
<artifactId>commons-lang</artifactId>
150+
<version>${commons-lang.version}</version>
97151
</dependency>
98152
<dependency>
99-
<groupId>org.codehaus.sonar.sslr</groupId>
100-
<artifactId>sslr-xpath</artifactId>
101-
<version>${sslr.version}</version>
153+
<groupId>commons-io</groupId>
154+
<artifactId>commons-io</artifactId>
155+
<version>${commons-io.version}</version>
102156
</dependency>
103157
<dependency>
104-
<groupId>org.codehaus.sonar.sslr</groupId>
105-
<artifactId>sslr-toolkit</artifactId>
106-
<version>${sslr.version}</version>
158+
<groupId>ch.qos.logback</groupId>
159+
<artifactId>logback-classic</artifactId>
160+
<version>${logback.version}</version>
107161
</dependency>
108162
<dependency>
109-
<groupId>org.codehaus.sonar.sslr</groupId>
110-
<artifactId>sslr-testing-harness</artifactId>
111-
<version>${sslr.version}</version>
163+
<groupId>com.google.guava</groupId>
164+
<artifactId>guava</artifactId>
165+
<version>${guava.version}</version>
112166
</dependency>
113167
<dependency>
114-
<groupId>org.codehaus.sonar.sslr-squid-bridge</groupId>
115-
<artifactId>sslr-squid-bridge</artifactId>
116-
<version>2.5.3</version>
168+
<groupId>com.google.code.gson</groupId>
169+
<artifactId>gson</artifactId>
170+
<version>${gson.version}</version>
117171
</dependency>
118172
<dependency>
119173
<groupId>ant</groupId>
120174
<artifactId>ant</artifactId>
121-
<version>1.6</version>
175+
<version>${ant.version}</version>
122176
</dependency>
123177

124178
<dependency>
@@ -127,41 +181,121 @@
127181
<version>1.1.1</version>
128182
</dependency>
129183

184+
<!-- Test dependencies -->
130185
<dependency>
131186
<groupId>junit</groupId>
132187
<artifactId>junit</artifactId>
133-
<version>4.10</version>
188+
<version>${junit.version}</version>
134189
<scope>test</scope>
135190
</dependency>
136191
<dependency>
137192
<groupId>org.mockito</groupId>
138193
<artifactId>mockito-all</artifactId>
139-
<version>1.9.0</version>
194+
<version>${mockito.version}</version>
140195
<scope>test</scope>
141196
</dependency>
142197
<dependency>
143-
<groupId>org.hamcrest</groupId>
144-
<artifactId>hamcrest-all</artifactId>
145-
<version>1.1</version>
198+
<groupId>org.assertj</groupId>
199+
<artifactId>assertj-core</artifactId>
200+
<version>${assertj.version}</version>
201+
<scope>test</scope>
146202
</dependency>
147203
<dependency>
148-
<groupId>org.easytesting</groupId>
149-
<artifactId>fest-assert</artifactId>
150-
<version>1.4</version>
204+
<groupId>org.sonarsource.sonarqube</groupId>
205+
<artifactId>sonar-testing-harness</artifactId>
206+
<version>${sonar.version}</version>
151207
<scope>test</scope>
152208
</dependency>
153209
<dependency>
154-
<groupId>ch.qos.logback</groupId>
155-
<artifactId>logback-classic</artifactId>
156-
<version>0.9.30</version>
210+
<groupId>org.sonarsource.sslr</groupId>
211+
<artifactId>sslr-testing-harness</artifactId>
212+
<version>${sslr.version}</version>
213+
<scope>test</scope>
214+
</dependency>
215+
<dependency>
216+
<groupId>org.sonarsource.sonarlint.core</groupId>
217+
<artifactId>sonarlint-core</artifactId>
218+
<version>${sonarlint.version}</version>
219+
<scope>test</scope>
220+
</dependency>
221+
<dependency>
222+
<groupId>org.sonarsource.orchestrator</groupId>
223+
<artifactId>sonar-orchestrator</artifactId>
224+
<version>${sonar-orchestrator.version}</version>
225+
<scope>test</scope>
226+
<exclusions>
227+
<exclusion>
228+
<groupId>com.oracle</groupId>
229+
<artifactId>ojdbc6</artifactId>
230+
</exclusion>
231+
</exclusions>
232+
</dependency>
233+
234+
<!-- Provided dependencies -->
235+
<dependency>
236+
<groupId>org.sonarsource.sonarqube</groupId>
237+
<artifactId>sonar-plugin-api</artifactId>
238+
<version>${sonar.version}</version>
239+
<scope>provided</scope>
157240
</dependency>
158241
<dependency>
159-
<groupId>org.codehaus.sonar.plugins</groupId>
160-
<artifactId>sonar-surefire-plugin</artifactId>
161-
<version>2.7</version>
242+
<groupId>org.slf4j</groupId>
243+
<artifactId>slf4j-api</artifactId>
244+
<version>${slf4j.version}</version>
245+
<scope>provided</scope>
162246
</dependency>
163247

164248
</dependencies>
165249

250+
<build>
251+
<plugins>
252+
<plugin>
253+
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
254+
<artifactId>sonar-packaging-maven-plugin</artifactId>
255+
<version>1.16</version>
256+
<extensions>true</extensions>
257+
<configuration>
258+
<pluginClass>org.sonar.plugins.swift.SwiftPlugin</pluginClass>
259+
<pluginName>Swift (Backelite)</pluginName>
260+
</configuration>
261+
</plugin>
262+
<plugin>
263+
<groupId>com.mycila</groupId>
264+
<artifactId>license-maven-plugin</artifactId>
265+
<version>3.0</version>
266+
<configuration>
267+
<header>com/mycila/maven/plugin/license/templates/LGPL-3.txt</header>
268+
<properties>
269+
<owner>${license.owner}</owner>
270+
<title>${license.email}</title>
271+
<title>${license.title}</title>
272+
</properties>
273+
<excludes>
274+
<exclude>**/README</exclude>
275+
<exclude>**/*/sh</exclude>
276+
<exclude>src/test/resources/**</exclude>
277+
<exclude>src/main/resources/**</exclude>
278+
</excludes>
279+
</configuration>
280+
<executions>
281+
<execution>
282+
<goals>
283+
<goal>check</goal>
284+
</goals>
285+
</execution>
286+
</executions>
287+
</plugin>
288+
<plugin>
289+
<groupId>org.apache.maven.plugins</groupId>
290+
<artifactId>maven-compiler-plugin</artifactId>
291+
<version>3.6.2</version>
292+
<configuration>
293+
<source>1.8</source>
294+
<target>1.8</target>
295+
</configuration>
296+
</plugin>
297+
</plugins>
298+
</build>
299+
166300

167-
</project>
301+
</project>

sonar-project.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
#
2+
# Swift SonarQube Plugin - Enables analysis of Swift projects into SonarQube.
3+
# Copyright © 2015 Backelite (${email})
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Lesser General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Lesser General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Lesser General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
#
18+
119
##########################
220
# Required configuration #
321
##########################

0 commit comments

Comments
 (0)