How to get the property of from the Sonar java custom rules

How to get the property of from the Sonar java custom rules.

I have written a class using BatchExtension, but it return null. I am using SONARQUBE 7.0

public class PropertyFinder implements BatchExtension {

private static final Logger LOG = LoggerFactory.getLogger(PropertyFinder.class);

public static Settings settings = null;

 * Contructor
public PropertyFinder() {


 * Constructor
 * @param project
 * @param settings
public PropertyFinder(Project project, Settings settings) {
	this.settings = settings;"Java Custom Version : " + settings.getString(""));

public static Settings getSettings() {
	//System.out.println("the setting is in getter"+settings);
	return settings;


Edit: my reply here is totally out-of-context, as pointed out below. I’ve read, when in fact the question is around


What is the use-case here ? is entirely dedicated to system properties for operating the SonarQube server. Any other runtime/functional property should be managed via the SonarQube interface (the beauty of that being that the property value is then tracked/maintained in the backend).

@NicoB Don’t mix and :wink:

@asishs What is the version of the plugin API you are developing with? Looking at the classes you are using, it looks very outdated.
I suggest you read this thread, because it is exactly the same question:

1 Like

Wow, my bad for that @asishs :open_mouth: My reply is indeed more confusing than helpful . You’re safe with @Julien_HENRY’s guidance.