Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse

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.

...

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.

Code Block
languagehtml/xml
<pluginManagement>
    ...
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-plugin</artifactId>
            <version>1.7</version>
            <configuration>
                <username>USERNAME</username>
                <password>PASSWORD</password>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.wso2.governance</groupId>
                    <version>5.34.0</version>
                    <artifactId>checkin-client</artifactId>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
    ...
</pluginManagement>

...

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.

Code Block
languagehtml/xml
<scm>
    <connection>scm:wso2:https://localhost:9443/registry/_system/local</connection>
    <developerConnection>scm:wso2:https://localhost:9443/registry/_system/local</developerConnection>
    <url>https://localhost:9443/registry/_system/local</url>
</scm>

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.

...