The support for SCM in WSO2 Governance Registry is two fold.
- You can mount an existing SCM repository (e.g., SVN, Git) to WSO2 Governance Registry to browse and manage files through WSO2 Governance Registry.
- 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.
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:
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.
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.