Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
 
 
Search All Tutorials

 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 
Maven
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Learn to Set Up An Internal Private Repository For An Organization

                         

We have set up an internal Maven Repository  for our organisation so that the developers are not wasting time in searching and downloading the required project libraries. This also allows us to have a single company wide repository for project artifacts. The setup steps are not too much complicated but we didn't run into several issues while setup the local repository server (artifactory), for the first time. 

When you're using maven at your company, you almost always want to setup local maven repository as relying on ibiblio for nightly / production builds is not a great idea and it takes time to download the library files if your development team is big. When setting up a local repository you don't want to setup the entire ibiblio repository locally as it is huge and has more libraries than you'll ever be using for your project. Maven-repository (in our case maven artifactory) is a repository server, which acts as your internal maven repository and downloads jars from ibiblio or other public maven repositories on demand and store it for further use in the project builds. And all this is transparent to the developer running a maven build.

The other neat thing about local maven-repository is that it allows you to neatly separate and organize jars that might not be available on ibiblio i.e. the 3rd-party artifacts (some company specific shared library or a commercial library).

Software requirements to set up the maven repository: 

A Quick glance to the steps how we set up our local maven repository :

  1. Download the appropriate Artifactory.zip file. You can get it from http://www.jfrog.org/sites/artifactory/latest/. Download and unzip the file in your directory of choice. We have downloaded artifactory-1.2.1.zip at our end. 
  2. Lets take the Installation directory as D:\artifactory-1.2.2\artifactory-1.2.2, Extract the artifactory-1.2.1.zip into the <artifactory-install-directory> directory.
  3. Create repository configuration file artifactory.config.xml into <artifactory-install-directory>/etc/ directory and paste the following content in the artifactory.config.xml file:

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://artifactory.jfrog.org/xsd/1.0.0"
    xsi:schemaLocation="http://artifactory.jfrog.org/xsd/1.0.0
    http://www.jfrog.org/xsd/artifactory-v1_0_0.xsd">
    <!-- Backup every 12 hours -->
    <!--<backupCronExp>0 0 /12 * * ?</backupCronExp>-->
    <localRepositories>

    <localRepository>
    <key>private-internal-repository</key>
    <description>Private internal repository</description>
    <handleReleases>true</handleReleases>
    <handleSnapshots>true</handleSnapshots>
    </localRepository>

    <localRepository>
    <key>3rd-party</key>
    <description>3rd party jars added manually</description>
    <handleReleases>true</handleReleases>
    <handleSnapshots>false</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>
    <proxyRef>proxy1</proxyRef>
    </remoteRepository>

    <remoteRepository>
    <key>ibiblio.org</key>
    <description>ibiblio.org</description>
    <handleReleases>true</handleReleases>
    <handleSnapshots>false</handleSnapshots>
    <excludesPattern>org/artifactory/**</excludesPattern>
    <url>http://www.ibiblio.org/maven2</url>
    <proxyRef>proxy1</proxyRef>
    </remoteRepository>

    <remoteRepository>
    <key>java.net</key>
    <description>java.net</description>
    <handleReleases>true</handleReleases>
    <handleSnapshots>false</handleSnapshots>
    <excludesPattern>org/artifactory/**,org/jfrog/**</excludesPattern>
    <url>http://download.java.net/maven/2</url>
    <proxyRef>proxy1</proxyRef>
    </remoteRepository>

    </remoteRepositories>

    <proxies>
    <proxy>
    <key>proxy1</key>
    <host>192.168.10.80</host>
    <port>9090</port>
    <username></username>
    <password></password>
    <domain>192.168.10.80</domain>
    </proxy>
    </proxies>
    </config>

    At our end we are using squid proxy server to connect with the internet. Our artifactory repository server will connect to internet through squid proxy server running on the machine 192.168.10.80 at port 9090. You can also use artifactory server without proxy. We have made two local and three remote repositories.
     

  4. Download and install tomcat 6.0 on your machine.
  5. Copy artifactor.war from artifactory-1.2.1\webapps to the webapps folder of your installed tomcat directory.
  6. Specify the local artifactory installation folder to the tomcat environment. 
    Go to Start-->Programs --> Apache Tomcat 6.0--> Configure Tomcat and specify  the installation folder to the Java Options.
    -Dartifactory.home=<artifactory-install-directory>
  7. Now start the tomcat and configure your clients to use maven artifactory repository.
  8. To access the admin control panel type http://<server>:<port>/artifactory and login as User: admin and Password: password.

                         

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

0 comments so far (post your own) View All Comments Latest 10 Comments:

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Hot Web Programming Job

Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.