Magazine
 
Building Projects: Learn to Set Up A Maven2 Repository

 

3 Once uploading is complete successfully, the artifact along with the ‘pom.xml’ file created by artifactory appears in the repository.

Installing artifacts from maven command line:Using the command 'maven clean install' maven only packages and installs the artifact to the local repository. We need to add the additional configuration section in the settings.xml file to install it to the local internal repository. Steps involved in whole of the process are shown below:

settings.xml

<settings>
<servers>
<server>
<id>organisation-internal</id>
<username>admin</username>
<password>password</password>
</server>
</servers>
</settings>

 

The command given below is used to install an artifact to internal maven repository.

mvn deploy:deploy-file -
DrepositoryId=organisation-internal -
Durl=http://localhost:8080/artifactory/
private-internal-repository-DgroupId=
test -DartifactId=test -Dversion=
1.1 -Dpackaging=jar -Dfile=target/test-
1.1.jar

Both the repository id and the server id
defined in the settings.xml should be same. The url should include the repository name to which the artifact is to be installed. The artifactory and the new artifacts appeared in the repository creates the 'pom' (pom.xml) file for us automatically.

 

VIII. Other Artifactory features:

* Backup the repository: Backup policy is specified in the <ARTIFACTORY_INSTALLATION _FOLDER>/ etc/artifactory .config.xml and 'cron' expression specifies the backup configuration. Backup configuration is shown below:

Sept 2007 | Java Jazz Up | 33
 
previous
index
next
 
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69 , 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,   Download PDF