Set up the client environment for supporting Maven.

The Server Side Overview

Firstly I would like to inform you about my server side environment as following: –

# Component Version Remarks
1 The operating system Windows Vista
2 The Java JDK 1.6.0_21
3 Maven 2.2.1
4 The Apache Tomcat 6.0.29
5 The CollabNet Subversion 1.3.0
6 MySQL 5.1.50
7 XAMPP 1.7.3 Apache HTTP
8 Artifactory 2.3.0 Deployed at tomcat
9 Hudson 1.384 Deployed at tomcat
10 Bugzilla 3.6.2 Deployed at XAMPP
11 OpenDS 2.2.0 The User LDAP

Those 11 components are configured so that it can be worked together, The Apache HTTP is the contact point for any client who would like to use them. The HTTPS (SSL) is preferred for sure.

I use the “Artifactory” as a Maven Repository Manager. Why we need it? Please see further information here.

The Client Side Configuration

The client side need to be configured for supporting the Maven Repository Manager, too and here is the steps: –

Configure the Maven Configuration Home


The Maven Configuration Home is a folder contains the maven configuration file “settings.xml”. There are 2 location by defaults as

  1. The Maven Install: <MAVEN_HOME>/conf/settings.xml
  2. The User Install: <USER_HOME>/.m2/settings.xml

I prefer to use the user home instead. Please see further information here.


  1. Open the command line interface, for me the dos prompt from cmd.exe with the administrator permission.
  2. Change directory to your <USER_HOME> directory, for me is C:\Users\Charlee.Ch
  3. Create the directory/folder named “.m2” (dot m two) by using the following command: –
  1. Open the web browser and go to the Artifactory application.
  2. On the left hand side menu, choose “Client Settings” –> “Maven Settings
  3. On the right panel check the checkbox named “Mirror Any”, and select the “repo” from the drop down list.
  4. Click the “Generate Setting” button.
  5. The system will display the “Maven Settings” screen.
  6. Click the icon “Copy to Clipboard” and paste to your text editor.
  7. Add the following tag at the top (inside the <settings> tag) :-
Tag for mentioning the local repository folder
Example: <localRepository>D:/M2/Repository</localRepository>

Please note, all downloaded resources from the Artifactory will be stored here. It is organized as a maven standard. You will not manage your resources anymore, let it manages for us. The resources is the java jar files, source codes and java documents.

At the moment we will download them from the remote repository via internet, later we will deploy our own resources to the repository manager and let other use us.

  1. Save it as “settings.xml” under the <USER_HOME>/.m2


At the moment my client is ready to be a Maven Client and is connected to the Maven Repository Manager. You can find more information about the configuration from the Maven website and the Artifactory website.

Next I will use the IDE to work with this setting, please stay tuned as always.


About Charlee Chitsuk

I've been working as a software developer since 1998. At the moment I focus on system integration including with SOA and Enterprise Security Solution.

Posted on November 9, 2010, in Artifactory, Maven and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: