Maven Nexus Private Library Setup with idea Development Configuration

1. Set up Nexus private server

Environment preparation:



  [root@localhost ~]# cat /etc/redhat-release 
       CentOS Linux release 7.2.1511 (Core)

JDK Installation

Download address:


      tar -xzf jdk1.8.0_121.tar.gz
       mkdir /usr/java
       mv jdk1.8.0_121 /usr/java
       echo 'JAVA_HOME=/usr/java/jdk1.8.0_121' >>/etc/profile
       echo 'export PATH=$PATH:$JAVA_HOME:$JAVA_HOME/bin' >>/etc/profile
       source /etc/profile

Nexus Installation

Download address:

        mv nexus-2.14.5-02-bundle /usr/local/nexus

Nexus Start

       /usr/local/nexus/bin/nexus start

Access address when up: http://host IP:8081 Default password: admin admin123

Note: If port 8081 is occupied, it will not start.If the port is up and inaccessible, close the firewall or open the port

Close firewall: systemctl stop firewalld

Development Port: * firewall-cmd --add-port=8081/tcp --permanent; firewall-cmd --reload

Nexus private warehouse has

Group group combines other private warehouses, such as public unified external warehouse addresses

hosted local private repository stores third-party jar packages (if oracle drives jar)

proxy Forward Private Warehouse Download jar package to Central Warehouse

virtual Warehouse

Create User

* Select Nexus user to create user

2. Maven ConfigurationSetting.xml

Note: Download Maven to download it yourselfHttp:// store conf/maven home directories locallySetting.xmlOr m2. /Setting.xmlThese two locations


<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns=""



		<!-- <mirror>
		</mirror> -->



3. IDE Call Private Warehouse Pom.xml To configure

Add <distribution management>to <project></project>



Note: The ID of the repository should matchSetting.xmlConfiguration is consistent.

Configured above, check IDE for use if there is a maven deploy "return code 401" error in the IDESetting.xmlIs the file configuredSetting.xml

For example: IDEA

File --> setting Choose ConfiguredSetting.xmlThen click OK.Redeploy




At this time, the installation and configuration of the nexus, maven,ide development environment has been completed. If you have any questions, please leave a message.

Keywords: nexus Maven Apache Java

Added by alonso on Wed, 15 Jul 2020 19:21:43 +0300