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.]
This article shares the specific code of NodeJS t...
The MySQL slow query log is very useful for track...
Table of contents 1. MySQL join buffer 2. JoinBuf...
Table of contents 1 Create mount directories and ...
In MySQL, we often use order by for sorting and l...
It mainly shows how to configure X-Frame-Options,...
Today I will talk to you about clearing floats. B...
Table of contents Million-level data processing s...
This is an enhanced version. The questions and SQ...
I summarized the previous notes on installing MyS...
Table of contents Preface 1. Background 2. Simula...
This article shares the specific code of js to re...
Source code (some classes deleted): Copy code The ...
Creating a Cursor First, create a data table in M...
Without further ado, I will post the code for you...