Three Simple Steps are all it takes to get started using Maven with CloudRepo.

Step 1 - Create a User and a Repository

Start by logging into the CloudRepo Administrator Portal and creating a user and a repository.

Note: For security purposes (mostly because passwords tend to be stored in plaintext), we do not allow your admin user to access artifacts via the repositories. Please create a user in the CloudRepo Administrator Portal.

Step 2 - Configure your Maven settings.xml file

Do not place your username and passwords within your pom files. 

Instead, add your connection information to your $MAVEN_HOME/settings.xml file in the <servers> section.

Note: $MAVEN_HOME usually resolves to $HOME/.m2 - if this is the case, the .m2 directory should be present in your home directory.

If this file does not exist, create it and add the following <server> entry to it:

If the settings.xml file does exist and contains the <settings> and <servers> tags, make sure you only add the <server> section from the example above.

Security Tip:
You should consider encrypting your password following these instructions from the official Maven Documentation.

Step 3 - Add the CloudRepo Repository Information to your Pom Files

You'll need to add the CloudRepo Repository to your pom.xml files in the <repositories> tag for read access and to the <distributionManagement> tag for write access.

Reading Artifacts from CloudRepo (pom.xml)

Writing Artifacts to CloudRepo (pom.xml)

Uploading Maven Artifacts to CloudRepo

To upload to cloudrepo, you'll need to have Apache Maven installed. Then you'll run the following command:

mvn deploy

You should see the files appear in the CloudRepo Administrator Portal page as well, but more importantly you'll be able to install them using mvn install.

Installing Maven Artifacts from CloudRepo

Now, to install the artifacts from CloudRepo, run the following command:

mvn install
Did this answer your question?