Subscribe Find out first about new and important news
  • Share via email
  • Subscribe to blog alert

Setting up Maven and Artifactory

Here are step-by-step installations instructions for Team Platform with Maven and Artifactory to get the Team Server Build feature up and running. This guide assumes that you have a Windows XP operating system (but it will also work with others) and a JDK 6 already installed.

Maven Installation

First of all we need fully working installation of Maven:

  • Download Maven from here for your platform. Maven 2 and 3 are supported but in this guide we will use maven 2.2.1.
  • Extract the archive to D:apache-maven-2.2.1. Set the environment variable M2_HOME to our Maven installation directory e.g. to


  • Add the Maven executable to the PATH environment variable e.g. add


  • Now open a command prompt and type:

mvn -v

You should see some output about the Java and Maven version. If you see that you are good to go.

Artifactory Installation

Now we need an Artifactory installation. First of all download Artifactory from here. We will use Artifactory 2.3.1 in our example.

  • Extract the downloaded archive to


  • Then start Artifactory by double-click on the startup script:


When Artifactory is successfully started you can browse to the console at http://localhost:8081/artifactory.
For a real production environment you need to start Artifactory as a service. Detailed instructions on how to do that can be found in the Artifactory user guide.

And of course you are running behind an HTTP proxy so you need to tell Artifactory about your proxy settings so it can download the necessary Maven artifacts directly through the internet.

  • Login in as admin user first at http://localhost:8081/artifactory/webapp/login.html. Username admin and password password.
  • Then press the “Admin” tab -> Proxies -> New.

See screenshot:

screenshot artifactory proxy Source: Bosch.IO

Now we need a Maven settings.xml file that works with our Artifactory installation. We are lucky and can generate one directly from Artifactory:

screenshot artifactory maven settings Source: Bosch.IO

  • Download that file and put it in your Maven installation directory under D:apache-maven-2.1.0conf. Overwrite existing files as needed.

Depending on your Artifactory version you need to insert some additional lines, so our Maven Plugins can be deployed to that Artifactory. Make sure you have the following lines included in your settings.xml file:

<servers> <server> <id>central</id> <username>admin</username> <password>password</password> </server> </servers>

A complete settings.xml file looks like:

<?xml version="1.0" encoding="UTF-8"?> <settings xsi:schemaLocation="" xmlns="" xmlns:xsi=""> <mirrors> <mirror> <mirrorOf>*</mirrorOf> <name>repo</name> <url>http://localhost:8081/artifactory/repo</url> <id>repo</id> </mirror> </mirrors> <servers> <server> <id>central</id> <username>admin</username> <password>password</password> </server> </servers> <profiles> <profile> <repositories> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>libs-release</name> <url>http://localhost:8081/artifactory/libs-release</url> </repository> <repository> <snapshots /> <id>snapshots</id> <name>libs-snapshot</name> <url>http://localhost:8081/artifactory/libs-snapshot</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>plugins-release</name> <url>http://localhost:8081/artifactory/plugins-release</url> </pluginRepository> <pluginRepository> <snapshots /> <id>snapshots</id> <name>plugins-snapshot</name> <url>http://localhost:8081/artifactory/plugins-snapshot</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> </settings>

After saving that file we are ready to deploy our Visual Rules Maven plugins.

Deploy the Visual Rules Maven plugins to Artifactory

Extract the archive of the Visual Rules Maven plug-ins to a temp folder and open the file deploy.cmd with your favorite text editor. Change the Maven repository settings so it fits to our Artifactory installation:

set REPOSITORY_ID=central set REPOSITORY_LAYOUT=default set URL=<strong>http://localhost:8081/artifactory/libs-release-local</strong> set UNIQUE_VERSION=false set GOAL=deploy:deploy-file

The URL is very important. Make sure you added the “local” repository there and _not_ the virtual one!

After that we can invoke the <code>deploy.cmd</code> in a command prompt:


Congrats – you have successfully deployed our Maven plugins to Artifactory!

Configuration of Team Platform

We assume that you already installed Team Platform. If you do not know how to do that, refer to the user manual.
In order to get the Build feature working we must tell Team Server where it can find a JDK and previously installed Maven. And yes you will need a JDK, a JRE will not work!
Some screenshots telling more than thousand words:

screenshot jdk installation Source: Bosch.IO

Now configure our Maven installation:

screenshot mvn installation Source: Bosch.IO

And last but not least we have to tell Team Server where it can find our Artifactory:

screenshot where to find artifactory Source: Bosch.IO

We used our Artifactory admin user here with username “admin” and password “password”.

Now you are ready to build rule projects on Team Server! Got more questions? Feel free to post your comments below!


  • 9. August 2017 at 12:04

    How could i use two different maven versions in the same Build Server with same artifactory tool integration, i want to use two of them separately for different projects.

  • 14. January 2016 at 5:38

    We are a Java Development Company. What I like about Maven is its transparency when it comes to migration and it’s as easy as 1, 2, 3…
    Note by Bosch ConnectedWorld Blog team: Link has been removed as it was broken.

  • 22. May 2013 at 20:24

    Seems like a very good tutorial but i wish it would have went a step further and showed what a .pom using these settings would contain. that is where i am having my issue (405 error) when trying to do mvn deploy

  • 19. April 2013 at 11:59

    This is a good step by step process that is easy to follow. Our company have this similar article on Setting Up Maven. If it will help other readers, here’s a link to the post Setting Up Maven

  • 31. January 2013 at 21:17

    Thanks Sascha.
    this was extrememly useful for a newbee like me to put all different components – maven, Artifactory, Team Server etc togeather. Its very descriptive.

    I just had to do one additional step which is not decribed above and I’m not sure if this will be needed for everyone else.
    After my proxy settings in the Admin Tab of the Artifactory, I had to go to each Remote Repository (eg. repo1,…) and in the Advanced Settings specify the proxy to be used.
    This is done by selecting Admin-> Repositories->Remote Repositories.

    thought of sharing this info as I spent lot of time figuring out the issue with artifacts not getting downloaded to me artifactory url.

    Thanks for this post