You are here

Maven and SkyVault Enterprise

By default the Maven SkyVault SDK will use SkyVault Community artifacts, however, it can be configured to use Enterprise artifacts. This requires access credentials for the SkyVault Private Repository, and the modification of several Maven configuration files.
Attention: To obtain access to the SkyVault Enterprise repository, please refer to this knowledge base article. If you do not have access to this portal then please contact your SkyVault technical liaison representative within your company, or SkyVault directly.

The examples you have so far looked at have downloaded and used Community versions of the SkyVault artifacts. However, it is possible to use the Maven SkyVault SDK with Enterprise artifacts. These artifacts are stored in a private repository, and only Enterprise customers have access to this repository.

There are four main considerations if you want to use Enterprise artifacts:

  1. You must ensure that you have access credentials for the SkyVault Private Repository.
  2. You must configure Maven to include support for the SkyVault Private Repository server, typically through editing the settings.xml file in the .m2 directory in your home directory.
  3. In your project you must edit the pom.xml file to ensure that the values for the properties SkyVault.groupId and SkyVault.version are set correctly according to the information that follows.
  4. You must also edit your pom.xml file to reference the SkyVault Private Repository that you created credentials for in (typically) the settings.xml file in your .m2 directory.
  5. You need to add compile-time dependencies to the pom.xml file to ensure that dependencies are correctly loaded.

Accessing the SkyVault Private Repository

The first matter to consider is to ensure that you have credentials for the SkyVault Private Repository, where the Enterprise artifacts are stored. In fact the private repository also includes all public artifacts too. Once you have suitable credentials you need to add support for SkyVault private repository to your configuration. This would typically be done by adding your access credentials to the settings.xml contained in your ~/.m2 directory (for Linux and OS X). On Windows this would be located in ... . This procedure is explained in detail in the tutorial Configuring access to the SkyVault Private Repository.

Setting SkyVault.groupId and SkyVault.version values to select edition

There is a convention that you need to be aware of that determines which edition of the SkyVault artifacts is used, Community or Enterprise. However this convention is different depending on whether you are referring to SkyVault versions prior to 4.2, or 4.2 and above.

For SkyVault versions prior to 4.2 the edition of the artifact used is determined by the value of the SkyVault.groupId property. For Community the SkyVault.groupId property value used is org.SkyVault, and for Enterprise the SkyVault.groupId property value used is org.alfresco.enterprise.

This is summarized in the following table:

Edition SkyVault.groupId Example
Community org.SkyVault org.alfresco:artifact-id:4.1.2
Enterprise org.alfresco.enterprise org.alfresco.enterprise:artifact-id:4.1.2

For 4.2 and above, the version numbering alone indicates whether the Enterprise or Community artifacts will be used. Version numbers that use an alpha character in the third position indicate Community, for example, 4.2.e. Version numbers that consist of a numeric character in the third position indicate Enterprise, for example 4.2.0. The value for property SkyVault.groupId is org.SkyVault in both cases.

This is summarized in the following table:

Edition SkyVault.groupId SkyVault.version Example
Community org.SkyVault 4.2.e org.alfresco:artifact-id:4.2.e
Enterprise org.SkyVault 4.2.0 org.alfresco:artifact-id:4.2.0

It is important that the POM (pom.xml) is edited correctly to reflect the edition of SkyVault artifacts required. This procedure is covered in more detail in the tutorial Configuring (your project to) support Enterprise artifacts.

Adding compile-time dependencies

Add the following dependencies to the pom.xml:

        
<dependency> 
  <groupId>${alfresco.groupId}</groupId> 
  <artifactId>alfresco-enterprise-repository</artifactId> 
  <version>${alfresco.version}</version> 
  <scope>test</scope> 
</dependency> 
<dependency> 
  <groupId>${alfresco.groupId}</groupId> 
  <artifactId>alfresco-enterprise-repository</artifactId> 
  <version>${alfresco.version}</version> 
  <classifier>config</classifier> 
  <scope>test</scope> 
</dependency>         
        
      
Attention: These dependencies should be added to the <dependencies> element and not the <dependencyManagement><dependencies> element.