Skip to content

Commit 6e226df

Browse files
SONARJAVA-4740 Support on-demand analyzer downloading (#4617)
1 parent 0b9fdc4 commit 6e226df

6 files changed

Lines changed: 7 additions & 8 deletions

File tree

docs/CUSTOM_RULES_101.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Other tags such as `<groupId>`, `<artifactId>`, `<version>`, `<name>`, and `<des
8989

9090
In the code snippet below, it is important to note that the **entry point of the plugin** is provided as the `<pluginClass>` in the configuration of the sonar-packaging-maven plugin, using the fully qualified name of the java class `MyJavaRulesPlugin`.
9191
You must change this configuration if you refactor your code, rename, or move the class implementing `org.sonar.api.Plugin`.
92-
The property `<sonarQubeMinVersion>` also guarantees compatibility with the SonarQube instance you target.
92+
The property `<pluginApiMinVersion>` also guarantees compatibility with the SonarQube instance you target. To determine the appropriate plugin API version, see [the plugin API compatibility documentation](https://github.com/SonarSource/sonar-plugin-api/?tab=readme-ov-file#compatibility).
9393

9494
```xml
9595
<plugin>
@@ -102,7 +102,7 @@ The property `<sonarQubeMinVersion>` also guarantees compatibility with the Sona
102102
<pluginName>Java Custom Rules</pluginName>
103103
<pluginClass>org.sonar.samples.java.MyJavaRulesPlugin</pluginClass>
104104
<sonarLintSupported>true</sonarLintSupported>
105-
<sonarQubeMinVersion>8.9</sonarQubeMinVersion>
105+
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
106106
<requirePlugins>java:${sonarjava.version}</requirePlugins>
107107
</configuration>
108108
</plugin>

docs/java-custom-rules-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<pluginClass>org.sonar.samples.java.MyJavaRulesPlugin</pluginClass>
8585
<sonarLintSupported>true</sonarLintSupported>
8686
<skipDependenciesPackaging>true</skipDependenciesPackaging>
87-
<sonarQubeMinVersion>8.9</sonarQubeMinVersion>
87+
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
8888
<requirePlugins>java:${project.version}</requirePlugins>
8989
</configuration>
9090
</plugin>

docs/java-custom-rules-example/pom_SQ_9_9_LTS.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,14 @@
9797
<plugin>
9898
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
9999
<artifactId>sonar-packaging-maven-plugin</artifactId>
100-
<version>1.21.0.505</version>
101100
<extensions>true</extensions>
102101
<configuration>
103102
<pluginKey>java-custom</pluginKey>
104103
<pluginName>Java Custom Rules</pluginName>
105104
<pluginClass>org.sonar.samples.java.MyJavaRulesPlugin</pluginClass>
106105
<sonarLintSupported>true</sonarLintSupported>
107106
<skipDependenciesPackaging>true</skipDependenciesPackaging>
108-
<sonarQubeMinVersion>8.9</sonarQubeMinVersion>
107+
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
109108
<requirePlugins>java:${sonarjava.version}</requirePlugins>
110109
</configuration>
111110
</plugin>

its/plugin/plugins/java-extension-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<configuration>
5757
<pluginClass>${sonar.pluginClass}</pluginClass>
5858
<sonarLintSupported>false</sonarLintSupported>
59-
<sonarQubeMinVersion>9.9</sonarQubeMinVersion>
59+
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
6060
</configuration>
6161
</plugin>
6262
</plugins>

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
<argLine>-Xmx512m</argLine>
9393
<gitRepositoryName>sonar-java</gitRepositoryName>
9494
<!-- Use more recent version than the one in parent-oss to support jreMinVersion -->
95-
<version.sonar-packaging.plugin>1.20.0.405</version.sonar-packaging.plugin>
9695

9796
<!-- Release: enable publication to Bintray -->
9897
<artifactsToPublish>${project.groupId}:sonar-java-plugin:jar</artifactsToPublish>

sonar-java-plugin/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,9 @@
145145
<pluginName>Java Code Quality and Security</pluginName>
146146
<skipDependenciesPackaging>true</skipDependenciesPackaging>
147147
<pluginClass>org.sonar.plugins.java.JavaPlugin</pluginClass>
148+
<requiredForLanguages>java</requiredForLanguages>
148149
<sonarLintSupported>true</sonarLintSupported>
149-
<sonarQubeMinVersion>9.9</sonarQubeMinVersion>
150+
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
150151
<jreMinVersion>11</jreMinVersion>
151152
<archive>
152153
<manifestEntries>

0 commit comments

Comments
 (0)