amottier / sonarqube-plugin

A Sonarqube plugin for Jeka

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Maven Central

sonarqube-plugin

A Sonarqube plugin for Jeka

How to use

Common usage

Just declare the plugin in your build class.

@JkDefClasspath("dev.jeka.plugins:sonarqube:[version]")
public class Build extends JkClass {
    
    JkPluginJava javaPlugin = getPlugin(JkPluginJava.class);
    
    JkPluginSonarqube sonarqube = getPlugin(JkPluginSonarqube.class);

    ...
}

Execute run method from Sonaqube plugin after a build as jeka clean java#pack sonarqube#run.

Sonarqube client can be configured programmatically using sonarqube instance and/or using standard system properties from the command line as -Dsonar.host=... (see https://docs.sonarqube.org/latest/analysis/analysis-parameters/).

Programmatically

You can use directly JkSonarqube in build code without using JkPluginSonarqubeclass.

Bind dynamically

You can invoke Sonarqube plugin from command line on a Jeka project that does declare this plugin it.

jeka java#pack @dev.jeka.plugins:sonarqube:[version] sonarqube#run

It can be used in conjunction of Jacoco

jeka java#pack @dev.jeka.plugins:jacoco:[version] jacoco# @dev.jeka.plugins:sonarqube:[version] sonarqube#run

Get help

jeka sonarqube#help or jeka @dev.jeka.plugins:sonarqube:[version] sonarqube#help

Example

See example here

How to build this project

This project uses Jeka wrapper, you don't need to have Jeka installed on your machine. simply execute ./jekaw cleanPack from the root of this project.

About

A Sonarqube plugin for Jeka

License:Apache License 2.0


Languages

Language:Java 78.6%Language:Shell 19.2%Language:Batchfile 2.2%