Info | ||
---|---|---|
| ||
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. |
...
- You can mount an existing SCM repository (ex:- 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.
Info |
---|
It As the resources are maintained in the file system, it is not possible to add properties to any of the checked out resources since the resources are maintained in the file system, and therefore ; therefore, operations such as Mounting, Symbolic Links, and Governance would 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.
Code Block | ||
---|---|---|
| ||
<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.23.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 | ||
---|---|---|
| ||
<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:
- checkout
- checkin
- 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.
...