one. Why build a Nexus private server? All development members of the company do not have external network. They connect to the nexus private server through the local area network, and the private server connects to the external network. Publish the project to a private server. Other people can download it from the private server. two. Architecture diagram after using private server three. Building Nexus 3.1 Unzip nexus-2.10-1bundle.zip to any non-Chinese directory 3.2 Enter nexus-2.10-1\bin\jsw\indows-x86-4 (corresponding to your own system) Take Windows 64 system as an example
3.3 Log in to the backend Enter http://localhost:8081/nexus in your browser.
If you need to adjust, you can configure nexus-2.10-1\conf\exus.proerties Four. Use Maven to connect to a private server 4.1 Modify Maven settings.xml <?xml version="1.0" encoding="UTF-8"?> <settings> <localRepository>G:\tool\m2\myrepository</localRepository> <mirrors> <mirror> <id>nexus-releases</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public</url> </mirror> <mirror> <id>nexus-snapshots</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/repositories/apache-snapshots/ </url> </mirror> </mirrors> <profiles> <profile> <id>jdk-1.7</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.7</jdk> </activation> <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion> </properties> </profile> <profile> <id>nexusTest</id> <repositories> <repository> <id>local-nexus</id> <url>http://127.0.0.1:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> </profiles> <activeProfiles> <!--Activate the profile with id nexusTest --> <activeProfile>nexusTest</activeProfile> </activeProfiles> <servers> <server> <id>releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>snapshots</id> <username>admin</username> <password>admin123</password> </server> </servers> </settings> G:\tool\m2\myrepository stores the local warehouse location http://127.0.0.1:8081 Nexus server ip and port admin/admin123 Nexus server login username and password five. Steps to publish the project to a private server 5.1 Configure private server path in pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.bjsxt</groupId> <artifactId>test</artifactId> <version>0.0.1-SNAPSHOT</version> <distributionManagement> <repository> <id>releases</id> <url>http://localhost:8081/nexus/content/repositories/releases</url> </repository> <snapshotRepository> <id>snapshots</id> <url>http://localhost:8081/nexus/content/repositories/snapshots</url> </snapshotRepository> </distributionManagement> </project> 5.2 Configure the username and password for connecting to the private server warehouse in settings.xml <servers> <server> <id>releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>snapshots</id> <username>admin</username> <password>admin123</password> </server> </servers> 5.3 Right click the project -> run as and enter deploy After adding to the project, the corresponding package can be queried in the background 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 much do you know about JavaScript inheritance?
>>: Detailed explanation of the basic usage of MySQL triggers [create, view, delete, etc.]
Method 1: Use the SET PASSWORD command MySQL -u r...
I don't know if you have used the frameset at...
The front-end development department is growing, ...
During the development process, we often use the ...
Table of contents 1. Component Introduction 2. So...
Dig Introduction: Dig is a tool that queries DNS ...
Detailed explanation of MySQL instance with SSD s...
1. Install mysql5.6 docker run mysql:5.6 Wait unt...
When the img src value is empty, two requests are ...
MySql always pops up a MySQLInstallerConsole.exe ...
Table of contents Introduction What does an itera...
Table of contents Preface: 1.Brief introduction t...
When talking about this issue, some people may ask...
If the server data is not encrypted and authentic...
Table of contents Document Object Model (DOM) DOM...