In the development process, some of the development packages within the company are sometimes used, and it is obvious that it is inappropriate to put these packages externally. In addition, these internal dependencies may be constantly being updated as projects are being developed. By setting up a MAVEN server within the company, the third party and internal dependencies can be managed uniformly, while the network bandwidth can be saved as long as the artifacts required for the project already exist.
- Nexus Download and installation configuration
We can find a description of it on the Nexus's website:/http Www.sonatype.org/nexus/go
Download
# wget https:// sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz
Unzip
# cd/usr/ Local
# mkdir Nexus
# tar-xzvf nexus-2.11.2-03-bundle.tar.gz-c Nexus
# CD Nexus
& nbsp;# ls
nexus-2.11.2-03 sonatype-work
Modify configuration file
# cd nexus-2.11.2-03/ conf
# VI nexus.properties
#Jetty section
application-port=8081 # #修改Jetty端口号
# Nexus section
nexus-work=${bundlebasedir}/. /sonatype-work/nexus
Save above changes
Configure user
# vi/usr/local/nexus/nexus-2.11.2-03 /bin/nexus
#RUN_AS_USER =
Run_as_user=root
Save the above modifications
If you have a firewall, go to modify firewall configuration and restart the firewall, skip here ...
Start Nexus
#/usr/local/nexus/nexus-2.11.2-03/bin/nexus Start
****************************************
Warning-not RECOMMENDED to RUN as ROOT
****************************************
Starting Nexus OSS ...
Started Nexus OSS.
Open in Browser: Http://ip:8081/nexus, Login: Username admin default password: admin123
- Modify the Maven warehouse address in the project
This completes the configuration. When a MAVEN project is built, the required artifacts are downloaded directly from the network, and if the required artifacts are not available, they are downloaded to the Web before being downloaded locally. Speaking of which, the small partners should all understand the benefits of building a maven! It's necessary ...!!!
Maven Authoritative Guide _ Chinese Full version clear PDF http://www.linuxidc.com/Linux/2014-06/103690.htm
Maven 3.1.0 release, project building tools http://www.linuxidc.com/Linux/2013-07/87403.htm
Linux Install Maven http://www.linuxidc.com/Linux/2013-05/84489.htm
Maven3.0 configuration and simple use http://www.linuxidc.com/Linux/2013-04/82939.htm
Build Sun-jdk and Maven2 http://www.linuxidc.com/Linux/2012-12/76531.htm under Ubuntu
Getting Started with Maven http://www.linuxidc.com/Linux/2012-11/74354.htm
Setting up Nexus Maven Central warehouse http://www.linuxidc.com/Linux/2016-08/133936.htm under Ubuntu
Use Nexus to build maven under Linux