Application of Nexus Repository Manager

Installing and running Nexus Repository Manager is easy.You can either unzip the archive file into a directory where you have full access or install it using the Docker image.

Installation package download:
Installation reference documentation:

1, Download the installation package


2, Unzip

tar xvzf nexus-3.19.1-01-unix.tar.gz

3, Modify the default configuration file (etc/ [optional]

This is mainly used to modify the port number

4, Modify the default configuration (bin/nexus.vmoptions) [optional]

Normally, no modification is required.

5, Modify jdk configuration [optional]
You can edit the bin/nexus script, find "INSTALL4J_JAVA_HOME_OVERRIDE", delete the hash, and specify the location of the JDK/JRE.

For example:


6, Start

./nexus run

Using run causes nexus to run in the current shell.You can also use the start, stop, restart, force-reload, and status directives.

7, Access

The login password is in the file/data/sonatype/sonatype-work/nexus3/admin.password.

By default, enabling anonymous access allows unauthenticated download, browse, and search of repository content.You can change the privileges of unauthenticated users by editing the roles assigned to anonymous users.

Type column description:
1) Proxy
By default, a central repository is created for access over HTTPS ( The proxy repository for reduce duplicate downloads and increase download speed for developers and CI servers, all other remote repositories accessed should also be proxied as proxy repositories.

2) hosted
The hosted Maven repository can be used to deploy your own components and third-party components.By default, two hosted Maven libraries are created, maven-releases and maven-snapshots.One for publishing and one for snapshot versions.

3) group
Repository groups allow you to expose aggregated content from multiple proxies and managed repositories and other repository groups using a single URL for tool configuration.It is recommended that all Maven repositories be exposed to users from the repository manager using repository groups without further client configuration.

8. Warehouse operation

9, used in Maven
1) Edit Maven's setting.xml file

            <!—Configure a mirror to replace the central warehouse -->

2) Edit the pom.xml file under the project

    <!-- Remote warehouse address -->
            <name>Team Nexus Repository</name>
   <!-- Configure remote publishing to private services, mvn deploy -->
        <!-- Definition releases Coordinates of the library -->
            <name>Nexus Release Repository</name>
        <!-- Definition snapshots library -->
            <name>Nexus Snapshot Repository</name>

Plug-in unit

<!-- deploy Upload only jar Configuration of packages to remote warehouses -->
                                    <!-- Update Metadata -->
                        <!-- skip default deploy Execution of plug-ins -->
                            <!-- Development phase upload to snapshot Warehouse, upload to online stage release Warehouse -->

This allows you to upload jar packages to a private service repository via MVM deployment.

Tags: Programming nexus Maven snapshot Unix

Posted on Tue, 03 Dec 2019 11:35:23 -0800 by hubardz