1. The significance of building nexus service As a unified proxy for the intranet, when developing collaboratively in a team, everyone does not need to download from the external network once; Solve the problem that some abnormal companies cannot access the external network due to internal network control. Choose a machine with external network permissions to build the server, and the rest of the people can directly access this service through the internal network; Solve Maven project dependency issues during teamwork development; 2. Install Nexus # Download the installation package: wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.4-03-bundle.tar.gz # Unzip mkdir /data/apps cd /data/apps tar -zxvf ~/nexus-2.14.4-03-bundle.tar.gz 3. Configure Nexus Edit the configuration file: vim conf/nexus.properties # Jetty section application-port=8081 # Access port application-host=0.0.0.0 # Bind IP nexus-webapp=${bundleBasedir}/nexus # Specify the nexus program directory nexus-webapp-context-path=/nexus # Specify two sets of directories to access # Nexus section nexus-work=${bundleBasedir}/../sonatype-work/nexus runtime=${bundleBasedir}/nexus/WEB-INF The above are all default configurations, and the corresponding access address is: http://xxxx:8081/nexus If you want to change to http://xxxx:8081, just modify nexus-webapp-context-path=/ 4. Start Nexus Startup script: bin/nexus # The startup script has the following optional parameters [root@ci-gitlab nexus-2.14.4-03]# bin/nexus Usage: ./nexus { console | start | stop | restart | status | dump } Note: Nexus uses wrapper as a WEB container. Nexus is just a shell script, which will eventually call the wrapper binary file in the corresponding platform under the jsw directory. 5. Manage Nexus 1. Default user: admin/admin123 deployment/deployment123 2. Modify user information After logging in as admin, click [Security-Users] on the left, select a user in the list, right-click to change the password and re-password, and modify the rest of the user information in the table at the bottom 6. Using Nexus in your project 1. As a plugin library Click [Views/Repositories-Repositories] on the left, select [Public Repositories], copy its Repository Path field, edit the pom.xml file, and add the following section: <!-- Set the main warehouse and search in the set order. --> <!-- Set the main warehouse and search in the set order. --> <repositories> <repository> <id>releases</id> <name>Team Nexus Repository</name> <url>${Repository Path}</url> </repository> <repository> <id>snapshots</id> <name>Team Nexus Repository</name> <url>${Repository Path}</url> </repository> </repositories> 2. As a deploy library Click [Views/Repositories-Repositories] on the left, select [Release or Snapshots], copy its Repository Path field, edit the pom.xml file, and add the following section: <!-- Set the publishing location, used when mvn deploy, an error will be reported if not set--> <distributionManagement> <repository> <id>ci-releases</id> <name>Gigold Nexus Repository</name> <url>http://ci-gitlab:8081/content/repositories/releases</url> </repository> <snapshotRepository> <id>ci-snapshots</id> <name>Gigold Nexus Repository</name> <url>http://ci-gitlab:8081/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement> Note: If the distributionManagement section is not set, executing mvn deploy will report the following error:
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to use bar charts in Vue and modify the configuration yourself
>>: Install Apache2.4+PHP7.0+MySQL5.7.16 on macOS Sierra
Recently the company has arranged to do some CCFA...
This article shares the specific code for JavaScr...
Vue encapsulates the breadcrumb component for you...
CSS3 achieves cool 3D rotation perspective 3D ani...
This article shares the installation steps of MyS...
In CentOS7, when we install MySQL, MariaDB will b...
This article example shares the specific code of ...
question: The commonly used command "ll"...
introduction As usual, let's start with a sce...
If you want to hide content from users of phones, ...
Table of contents What is maintainable code? Code...
Table of contents Jenkins installation Install Ch...
[Abstract] This article quickly builds a complete...
Congratulations on finally convincing your bosses...
In the migration of Oracle database to MySQL data...