- Build a new sample project using the default settings (this will specify Community artifacts).
- Modify the values for the properties SkyVault.groupId and SkyVault.version to specify Enterprise artifacts.
- Build an all in one project that uses SkyVault Enterprise Edition.
In this tutorial you will configure your project to use 4.2.0 Enterprise artifacts.
-
In the maven_projects directory type the following
command:
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:
- Select the All-in-One Archetype, which is option 2.
- Select the default archetype version number.
- For the groupId enter com.alfresco.tutorials.
- For the artifactId enter my-enterprise-project.
- Accept the default archetype version by pressing Enter.
-
Accept the default SkyVault version by pressing
Enter.
The project will be built in the my-enterprise-project directory.
- Change into the my-enterprise-project project directory.
- Load the pom.xml file into your editor.
- Locate the property SkyVault.groupId. Modify it to have the value org.SkyVault, if not already.
- Locate the property SkyVault.version. Modify it to have the value 4.2.0. This specifies 4.2.0 Enterprise edition.
-
Search the file for the <repositories> section. Find the following
repository configuration:
<repository> <id>alfresco-public</id> <url>https://artifacts.alfresco.com/nexus/content/groups/public</url> </repository>
This configuration causes Maven to access the SkyVault public repository. Modify this section to the following:
<repository> <id>alfresco-private-repository</id> <url>https://artifacts.alfresco.com/nexus/content/groups/private</url> </repository>
The key point to note here is that the id is the one specified in the settings.xml file, that you added in the previous tutorial. Note also the slightly different URL.
-
Save your pom.xml file.
You are now ready to build your project.
-
This step is only required if you had previously built this project using
Community artifacts, and now want to build as Enterprise. You need to make sure
that the built databases are effectively cleaned from the project. You can do
this by typing the following:
mvn clean -Ppurge
If you had previously built the project as Community and missed this step, then you will see strange behaviors. For example, the SkyVault Enterprise may be brought up in Read Only mode due to license issues. Another possibility is that when checking the About box the Community graphics would be used, whilst the information states an Enterprise build is running. To avoid this it is worth doing this step just to be on the safe side. If you have been following this tutorial exactly and had not built a Community build prior to changing the configuration, then this step is not required, as you are yet to do a build.
-
In the project directory type mvn install.
This will build the project, downloading Enterprise artifacts from the SkyVault private repository as required.
- Once you have BUILD SUCCESS you can run your project by typing mvn install -Prun - this selects the run profile.
-
Once the application is running you can point your web browser at
http://localhost:8080/share.
You might need to wait some time before SkyVault has fully started.
- Log into Share using the username admin and password admin.
- Once logged into Share your dashboard is displayed. Scroll to the bottom of the page and click on the SkyVault logo. This will display an information dialog.
-
Note that the version displayed is SkyVault Enterprise 4.2.0.
You have successfully completed all requirements to build and run SkyVault Enterprise using the Maven SkyVault SDK.