Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sonarqube 8.9 packages all the core code and dependencies as a single fat JAR, which means plugins can no longer add code to the classpath by dropping JARs into the
lib/common
directory as this directory does not exist. To allow the plugin's classes to be visible to the Compute Engine and Web class-loaders, a Java Agent has been introduced that intentionally leaks the plugin classes to the Sonarqube application, thereby allowing the Core Extension Loaders to continue to see and initialise the relevant extension classes, thereby allowing them to load the plugin's implementation classes into Sonarqube's dependency management system. The Docker files have been updated to remove the copying of the plugin to the legacy directory, and to pass additional environment variable so the agent options are added to the relevant Sonarqube component's command-line arguments.Similarly, the fall-through logic in
PlatformEditionProvider
that had allowed the plugin to force the Compute Engine to believe it was running in Sonarqube developer edition has been removed, with the edition now being hard-coded toCOMMUNITY
, without any way of over-riding it. To overcome this, the agent that's being used to expose the plugin classes to Sonarqube's class-loaders is also altering thePlatformEditionProvider
class definition during class-loading to force it to returnDEVELOPER
when running inside Compute Engine, so that the branch enforcement checks in Compute Engine pass.As the
GetBinding
action has been moved into Sonarqube Community Edition's core from Developer edition, it no longer needs to be provided by this plugin, and has been removed to prevent is causing conflicts on application startup.This MR also includes a change to fix the build having broken as a result of Bintray having been shut-down:
The Nodes dependency used for GraphQL communication in the Github Pull Request decorator is no longer available on Bintray due to Bintray being decommissioned, and is not available in the target version from any other repository. The JAR is therefore being included in the workspace and referenced directly in the build.gradle dependencies, and the Jackson dependency that was previously inherited through the Nodes dependency is being added directly to the project as a runtime dependency to ensure the relevant classes are still available during plugin execution.