forked from SonarSource/sonarqube-roslyn-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DevNotes.txt
38 lines (23 loc) · 1.03 KB
/
DevNotes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Creating a plug-in jar file:
----------------------------
* generate the MD file containing the plugin info
- License, OrganizationUrl, BuildDate, Version, Class, Sonar-Version, Organization, Name, Description, Key
Plugin-BuildDate: 2015-09-27T13:50:19+0100
Sonar-Version: 4.5.2
* create folder structure: folder per namespace
- RulesDefinition.java, Plugin.java, rules.xml
* Compile the classes
javac myorg\*.* -classpath sonar-plugin-api-4.5.2.jar
Note: the code references the sonar-plugin-api jar, which must be locatable
* Create the jar file
jar cvfm test.jar MANIFEST.MF myorg\*.class* resources\*.*
Expected file layout inside the jar file
----------------------------------------
[root folder]
MANIFEST.MF : manifest file containing plugin property values used by SonarQube
[myorg]
[plugin] etc i.e. folder structure corresponding to the namespaces of the class components
Plugin.class
RuleDefinitions.class
[resources]
rules.xml : XML file containing the new rules (loaded by RulesDefinition.class)