This documentation is for WSO2 Governance Registry 5.0.0. View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

The Registry SCM Plugin for Apache Maven is one of many APIs supported by the WSO2 Governance Registry. Read more on Supported APIs and Standards for a complete list of APIs supported by WSO2 Governance Registry.

The support for SCM in WSO2 Governance Registry is two fold.

  1. You can mount an existing SCM repository (e.g., SVN, Git) to WSO2 Governance Registry to browse and manage files through WSO2 Governance Registry.
  2. You can connect to WSO2 Governance Registry through a build system or CI system through the Overview of SCMs

As the resources are maintained in the file system, it is not possible to add properties to any of the checked out resources; therefore, operations such as Mounting, Symbolic Links, and Governance will not work on resources within an SCM mount.

For more information on how to mount an existing SCM repository, please read about Configuration for Source Configuration Management (SCM). Below, we have outlined the steps on how to connect to WSO2 Governance Registry through a build system or CI system.

Configuration to create a SCM connection

1. In order to connect to WSO2 Governance Registry, you will have to add the following plugin to your POM file(s), inside the pluginManagement section. Please replace USERNAME and PASSWORD with appropriate values. More information on setting up the plugins required for establishing an SCM connection can be found in the Maven SCM plugin Usage documentation.


2. Since WSO2 plugins might not be available in the Central Maven Repository, you might have to add WSO2 repositories to your POM file(s). More information on setting up repositories can be found in the Introduction to Repositories documentation from Apache Maven.

        <name>WSO2 Repository</name>

3. Finally, you need to define the SCM connection details inside the SCM configuration element in your POM file(s). The configuration to mount the /_system/local collection of a WSO2 Governance Registry instance running at https://localhost:9443/carbon, would be as follows. More information on various SCM configuration options can be found in the Maven Usage.


Using the SCM connection in a Build System

Once configured, you can use the SCM connection by providing the necessary SCM commands. More information on a complete list of commands and how to use them can be found in Maven SCM plugin documentation. The WSO2 Governance Registry supports the following commands:

  1. checkout
  2. checkin
  3. update

As an example, to take a checkout of the contents in your registry location (the one you configured above) to your filesystem, you can run the following command.

mvn scm:checkout


Before you run the command above, you will have to add the GREG_HOME/bin to your PATH variable. Read more on how to set or change the PATH variable if you have not done this before.

  • No labels