Orchestrator :: Maven Plugin

Parent pom of SonarSource public projects

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.sonarsource.orchestrator
ArtifactId

ArtifactId

orchestrator-maven-plugin
Last Version

Last Version

3.15.2.1322
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Orchestrator :: Maven Plugin
Parent pom of SonarSource public projects
Project Organization

Project Organization

SonarSource

Download orchestrator-maven-plugin

How to add to project

<plugin>
    <groupId>org.sonarsource.orchestrator</groupId>
    <artifactId>orchestrator-maven-plugin</artifactId>
    <version>3.15.2.1322</version>
</plugin>

Dependencies

compile (7)

Group / Artifact Type Version
org.sonarsource.orchestrator : sonar-orchestrator jar 3.15.2.1322
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven : maven-core jar 3.0
mysql : mysql-connector-java jar 5.1.26
postgresql : postgresql jar 9.1-901.jdbc4
net.sourceforge.jtds : jtds jar 1.2.7
com.oracle » ojdbc6 jar 11.2.0.3.0

provided (2)

Group / Artifact Type Version
com.google.code.findbugs : jsr305 jar 3.0.1
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4

test (1)

Group / Artifact Type Version
org.mockito : mockito-all jar 1.8.5

Project Modules

There are no modules declared in this project.

Build Status Quality Gate

Orchestrator is a Java library to install SonarQube from tests.

API

An instance of class com.sonar.orchestrator.Orchestrator represents a SonarQube server:

Orchestrator orchestrator = Orchestrator.newBuilder()
  .setSonarVersion("7.0")
  .addPlugin(FileLocation.of("/path/to/plugin.jar"))
  .addPlugin(MavenLocation.of("org.sonarsource.java", "sonar-java-plugin", "5.2.0.13398")
  .setServerProperty("sonar.web.javaOpts", "-Xmx1G")
  .build();
 
// start server
orchestrator.start();

// run SonarQube Scanner
orchestrator.executeBuild(SonarScanner.create(new File("/path/to/project")));

// requests web services
String baseUrl = orchestrator.getServer().getUrl();
// ...

orchestrator.stop();

Version Aliases

Aliases can be used to define the versions of SonarQube and plugins to be installed. Supported values are:

  • DEV for the latest official build (in terms of version number, not date)
  • DEV[x.y] for the latest official build of a series. For example DEV[5.2] may install version 5.2.0.1234.
  • DOGFOOD for the latest build of dogfood branch
  • DOGFOOD[x.y] for the latest build of a series in dogfood branch
  • LATEST_RELEASE for the latest release (in terms of version number, not date)
  • LATEST_RELEASE[x.y] for the latest release of a series, for example LATEST_RELEASE[5.2]

The alias LTS is no more supported for SonarQube since Orchestrator 3.17. It should be replaced by LATEST_RELEASE[6.7].

Local Cache

The artifacts downloaded from Artifactory (SonarQube, plugins) are copied to the local directory ~/.sonar/orchestrator/cache. This directory is not automatically purged and may grow significantly when using the version alias DEV.

Configuration

The test environment is configured in the file ~/.sonar/orchestrator/orchestrator.properties:

# Token used to download SonarSource private artifacts from https://repox.jfrog.io/repox
# Generate your API key at https://repox.jfrog.io/repox/webapp/#/profile
# This property can be replaced by the environment variable ARTIFACTORY_API_KEY.
#orchestrator.artifactory.apiKey=xxx

# Personal access token used to request SonarSource development licenses at https://github.com/sonarsource/licenses. 
# Generate a token from https://github.com/settings/tokens
# This property can be replaced by the environment variable GITHUB_TOKEN.
#github.token=xxx
  
# Port of SonarQube server. Default value is 0 (random).
#orchestrator.container.port=10000

# Maven installation, used when running Scanner for Maven.
# By default Maven binary is searched in $PATH
#maven.home=/usr/local/Cellar/maven/3.5.0/libexec

# Maven local repository (optional), used to search artifacts of plugins before
# downloading from Artifactory. 
# Default is ~/.m2/repository
#maven.localRepository=/path/to/maven/repository

# Instance of Artifactory. Default is SonarSource's instance.
# This property can be replaced by the environment variable ARTIFACTORY_URL.
#orchestrator.artifactory.url=https://repox.jfrog.io/repox

The path to configuration file can be overridden with the system property orchestrator.configUrl or the environment variable ORCHESTRATOR_CONFIG_URL. Example: -Dorchestrator.configUrl=file:///path/to/orchestrator.properties

HTTP Proxy

For running Orchestrator behind a corporate proxy, add Java properties :

-Dhttp.proxyHost=proxy.company.com
-Dhttp.proxyPort=80
-Dhttps.proxyHost=proxy.company.com
-Dhttps.proxyPort=80
-Dhttp.nonProxyHosts="localhost|127.0.0.1|*.company.com"
-Dhttp.proxyUser=foo
-Dhttp.proxyPassword=bar

License

Copyright 2011-2020 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0

org.sonarsource.orchestrator

SonarSource

Continuous Code Quality

Versions

Version
3.15.2.1322
3.15.1.1274
3.15.0.1256
3.14.0.887
3.13
3.12
3.11
3.10.1
3.10
3.9
3.8
3.7
3.6
3.5
3.4.1