CD part XV: Configuring Maven to use Nexus

Johan Tuitel

  • 17/02/2017
  • 2 minuten leestijd
Johan Tuitel

CD part XV: Configuring Maven to use Nexus

After installation of Maven and Nexus, we need to configure maven to connect to the Nexus Repository Manager

maven configuration to use the nexus repository


  1. configure settings.xml
  2. navigate to C:\tools\apache-maven-3.3.9\conf and open settings.xml
  3. add a server in the server section of this file
    <!-- Nexus Repository Manager -->
  1. configure the pom.xml of the AccountStatusWebservice
  2. navigate to AccountStatusWebservice and open pom.xml
  3. add distribution management and repositories to the pom file
        <!-- Publish the versioned releases here -->  
            <name>Continuous Delivery Blog Nexus Releases</name>  

        <!-- Publish the versioned snapshots here -->  
            <name>Continuous Delivery Blog Nexus Snapshots</name>  

            <name>Continuous Delivery Blog Nexus</name>
  1. next we need to add the maven-deploy-plugin to the develop profile

test configuration

  1. test the configuration by entering the next commands
  2. build project and deploy it to the local repo: mvn clean install
  3. build project and deploy it to the nexus repo: mvn clean deploy -Pdevelop
  4. navigate to http://localhost:8081/nexus/content/repositories/snapshots/nl/com/devnl/AccountStatusWebservice/1.0-SNAPSHOT/
  5. and check if there is a war file [IMG]