Downloading the Installation package

Click on the official website to select the installation package suitable for your own operating system, and put it in an appropriate location after downloading. There is no need to install it.

Start the

Enter CMD in the nexus-3.30.0-01\bin directory

Type nexus /run on the command line and wait a moment

A message is displayed indicating that port 8081 has been occupied. The default port used by nexus is 8081. After shutting down port 8081 in use, run this command and wait for a while to start successfully.

Log in the system

Successful startup in the browser to open http://localhost:8081/,

After initialization, click Sign in to log in. The default account is admin. The initial password is copied to the admin.password file in the nexus-3.30.0-01-win64\sonatype-work\nexus3 directory to complete the login. After the success, you will be prompted to reset the password, set a common password can be their own.

Added Ali agent warehouse

Enter two required options

aliyun

http://maven.aliyun.com/nexus/content/groups/public/

Save your

Choose Configuration > Repository and double-click Maven-public

Move Aliyun to the right to save.

Configure Maven

Find Setting. XML in Maven, in the Servers TAB

Write the following configuration

<server>
        <id>releases</id>
        <username>admin</username>
        <password>123456</password>
    </server>
    
    <server>
        <id>snapshots</id>
        <username>admin</username>
        <password>123456</password>
    </server>
 
Copy the code

Password is the login password that you set

Add the following configuration to the POM file

<distributionManagement>
        <repository>
            <id>releases</id>
            <name>User Project Release</name>
            <url>http://127.0.0.1:8081/repository/maven-releases</url>
        </repository>
    </distributionManagement>
Copy the code

Publish code to a private repository

Double-click to

View published projects

Use items in the repository

Add the following configuration to the POM file

<repositories>
        <repository>
            <id>nexus</id>
            <name>Nexus Snapshot Repository</name>
            <url>http://127.0.0.1:8081/repository/maven-public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
  </repositories>
Copy the code

If you encounter permissions issues when publishing and downloading