Magazine
 

Building Projects: Learn to Set Up A Maven2 Repository

 

</handleSnapshots>
</localRepository>
</localRepositories>
<remoteRepositories>
<remoteRepository>
<key>ibiblio</key>
<handleReleases>true
</handleReleases>
<handleSnapshots>false</
handleSnapshots>
<excludesPattern>org/artifactory/
**,org/ jfrog/**
</excludesPattern>
<url>http://repo1.maven.org/maven2
</ url>
</remoteRepository>
</remoteRepositories>
</config>

IV. Navigate Artifactory:

Start Tomcat, open the browser and navigate http://localhost:8080/ artifactory

Here is the artifactory home page shown below:

Sign in username as 'admin' and password

 

as 'password'. You can view the content of the repository simply by clicking on the Repository Browser link.

V. Configuring maven to
use the new repository:

You can use either of the settings.xml or the pom.xml
files to configure maven to use the local repository.

Configure maven using settings.xml file:

Maven uses the settings.xml file contained in .m2 folder inside the C\Document and Setting \Administrator to get the location of the maven repository. In case of no
repository is specified then maven uses the default repository from ibiblio.org. We will have to make changes in the settings.xml file to use the new repository. Here is the settings.xml shown below:

<profiles>
<profile>
<id>dev</id>
<properties>
<tomcat6x.home>
C:/InstalledPrograms/
apache-tomcat-6.0
</tomcat6x.home>
</properties>
<repositories>
<repository>
<id>central</id>
<url>
http://localhost:8080/artifactory/
repo</url>

Sept 2007 | Java Jazz Up |30
 
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