Skip to content

Commit

Permalink
SONARJAVA-4740 Support on-demand analyzer downloading (#4617)
Browse files Browse the repository at this point in the history
  • Loading branch information
johann-beleites-sonarsource authored Dec 15, 2023
1 parent 0b9fdc4 commit 6e226df
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/CUSTOM_RULES_101.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Other tags such as `<groupId>`, `<artifactId>`, `<version>`, `<name>`, and `<des

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`.
You must change this configuration if you refactor your code, rename, or move the class implementing `org.sonar.api.Plugin`.
The property `<sonarQubeMinVersion>` also guarantees compatibility with the SonarQube instance you target.
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).

```xml
<plugin>
Expand All @@ -102,7 +102,7 @@ The property `<sonarQubeMinVersion>` also guarantees compatibility with the Sona
<pluginName>Java Custom Rules</pluginName>
<pluginClass>org.sonar.samples.java.MyJavaRulesPlugin</pluginClass>
<sonarLintSupported>true</sonarLintSupported>
<sonarQubeMinVersion>8.9</sonarQubeMinVersion>
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
<requirePlugins>java:${sonarjava.version}</requirePlugins>
</configuration>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion docs/java-custom-rules-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<pluginClass>org.sonar.samples.java.MyJavaRulesPlugin</pluginClass>
<sonarLintSupported>true</sonarLintSupported>
<skipDependenciesPackaging>true</skipDependenciesPackaging>
<sonarQubeMinVersion>8.9</sonarQubeMinVersion>
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
<requirePlugins>java:${project.version}</requirePlugins>
</configuration>
</plugin>
Expand Down
3 changes: 1 addition & 2 deletions docs/java-custom-rules-example/pom_SQ_9_9_LTS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,14 @@
<plugin>
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
<artifactId>sonar-packaging-maven-plugin</artifactId>
<version>1.21.0.505</version>
<extensions>true</extensions>
<configuration>
<pluginKey>java-custom</pluginKey>
<pluginName>Java Custom Rules</pluginName>
<pluginClass>org.sonar.samples.java.MyJavaRulesPlugin</pluginClass>
<sonarLintSupported>true</sonarLintSupported>
<skipDependenciesPackaging>true</skipDependenciesPackaging>
<sonarQubeMinVersion>8.9</sonarQubeMinVersion>
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
<requirePlugins>java:${sonarjava.version}</requirePlugins>
</configuration>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion its/plugin/plugins/java-extension-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<configuration>
<pluginClass>${sonar.pluginClass}</pluginClass>
<sonarLintSupported>false</sonarLintSupported>
<sonarQubeMinVersion>9.9</sonarQubeMinVersion>
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
</configuration>
</plugin>
</plugins>
Expand Down
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
<argLine>-Xmx512m</argLine>
<gitRepositoryName>sonar-java</gitRepositoryName>
<!-- Use more recent version than the one in parent-oss to support jreMinVersion -->
<version.sonar-packaging.plugin>1.20.0.405</version.sonar-packaging.plugin>

<!-- Release: enable publication to Bintray -->
<artifactsToPublish>${project.groupId}:sonar-java-plugin:jar</artifactsToPublish>
Expand Down
3 changes: 2 additions & 1 deletion sonar-java-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@
<pluginName>Java Code Quality and Security</pluginName>
<skipDependenciesPackaging>true</skipDependenciesPackaging>
<pluginClass>org.sonar.plugins.java.JavaPlugin</pluginClass>
<requiredForLanguages>java</requiredForLanguages>
<sonarLintSupported>true</sonarLintSupported>
<sonarQubeMinVersion>9.9</sonarQubeMinVersion>
<pluginApiMinVersion>9.14.0.375</pluginApiMinVersion>
<jreMinVersion>11</jreMinVersion>
<archive>
<manifestEntries>
Expand Down

0 comments on commit 6e226df

Please sign in to comment.