Configuration for Source Configuration Management (SCM)
Governance Registry contains the capability of interacting directly with external file systems and a variety of version control systems which supports Maven. Enabling support on Maven SCM plugin has fulfilled the mentioned aspect in GREG. Now a user can integrate Governance Registry with over 10 version control systems which are listed out at http://maven.apache.org/scm/scms-overview.html.
With the SCM support on Governance Registry users are able to fulfill following scenarios.
- Capability of directly managing a resource resides at a version control system from the Registry. The user can browse Resources/Collections and do operations such as add,update or delete resources from Registry end so it will get effect on the version control system as well.
- A user can add WSDL,Schemas like artifacts from the Registry end and store all its dependency structures in the mounted version control system. This would allow the user to use those dependencies with some other third party product as well e.g. - Build Systems.
- If a user works with different types of multiple corporate repositories such as SVN, GIT, Perforce, VSS, and if the user wants to create a single view which allows to browse and manage the resources it is possible to use the registry for this aspect by enabling SCM support.
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.
The Governance Registry can be easily mount with an external version control system by following the steps given below.
Configuration to enable SCM support
In order to create a SCM mounting in Governance Registry user has to uncomment the following configuration from the $GREG_HOME/repository/conf/registry.xml
and properly configure by providing correct values for the parameters. This has to be done while the server is in shutdown mode, and has to restart after enabling the following configuration.
If you want to view the content from another mounted node, you must configure SCM support in that node, too.
<scm> <connection checkOutURL="scm:svn:http://svn.wso2.org/repos/wso2" workingDir="/valid/filesystem/path" mountPoint="/_system/foo" checkInURL="" readOnly="" updateFrequency=""> <username>admin</username> <password>admin</password> </connection> </scm>
The attributes of the given above configuration can be defined as below.
- checkOutURL - The user has to define the URL of the version repository control system which need to integrate the Registry with. From this location the resources will get checked out to the registry. The URL should be preceded with
scm:
. - workingDir - The file system location where initially the resources from the version repository control system check out in to. This should be an existing location in the file system.
- mountPoint - The Registry location where the resources from the version repository control system check out to.
- username - The user name of the version repository control system.
- password- The password of the version repository control system.
- checkInURL- The user has to define the URL of the version repository control system where the check in should happen if any resource addition, update or deletion occurred.
- readOnly - This is set to
true
by default. This is to define whether to check out only or chek in and check out only. if readOnly istrue
resources will only be checked out to the specified location by checkOutURL, if set tofalse
then the check in would also happen to the svn location specified in checkInURL. Therefore, when readOnlyfalse
it is a must that you specify the checkInURL. The point to be noted is that when readOnlyfalse
any modification, addition or deletion that you do on resources would get commited to the defined svn location. - updateFrequency - This is to define how frequently should the Registry and version repository control system should get synchronized with each other, the values are defined in minutes.
Tip
Additional configuration for SCM providers can be done using separate configuration files. To learn more, click on the respective SCM in the Apache Maven SCM Overview document and navigate to the Provider Configuration section. For example, the provider configuration for Subversion (SVN) can be found in here.
After the server is started, the resources from the version repository control system would be there in the specified location of the registry in the same hierarchical order.