(15) Creating a maven with a nexus

Source: Internet
Author: User

By setting up your own network, you can reduce your central warehouse load, save on extranet bandwidth, accelerate MAVEN builds, deploy your own artifacts, and use maven efficiently. There are three dedicated MAVEN warehouse management software available to help you set up: The Apache Foundation's Archiva, Jfrog's Artifactory and Sonatype Nexus. Individuals have only used the Sonatype nexus and are currently the most popular MAVEN warehouse management software.

1.Nexus Brief Introduction

The Nexus is open source and Pro, where the open source version is based on the GPLv3 license and features enough to meet the needs of most MAVEN users. Here are some features of the Nexus Open source version:

    • Small memory footprint (at least 28MB)
    • A friendly interface based on ExtJS
    • Restlet-based full rest API
    • Support for agent warehouses, host warehouses, and warehouse groups
    • File system-based, no database required
    • Support for warehouse indexing and searching
    • Support for uploading Maven artifacts from the interface
    • Fine-grained safety control

Nexu Pro version is paid for, in addition to the features of the open source version, it mainly includes some enterprise security control, release process control and other required features. Interested can access this address for more information: Https://www.sonatype.com/nexus-repository-sonatype.

2. Install Nexus

Nexus is a typical Java Web application, it has two kinds of installation package, one is a bundle package containing jetty container, the other is not a war package containing the Web container, but little Alan now to the official website to download the time seems to find only bundle package, did not find the existence of the war package, You can pay attention to it, little Alan Download is the open source version of bundle package, the following will be based on this to explain to you.

① Download Nexus

: Https://www.sonatype.com/download-oss-sonatype, enter the URL,

The latest version is 3.x, small Alan selected is the following 2.x, the latest version of the change is relatively large, a lot of things little Alan also did not go to grope, so not good to take out the demo, the current software company with the most should be 2.x version, here to show you 2.x version, of course, interested in children's shoes can read the article After you go to download the latest version of groping groping.

② Installing Nexus

The Nexus bundle comes with a jetty container, so the user does not need an additional Web container to launch the Nexus directly.

Unzip it to a directory and get the following two subdirectories:

nexus-2.14.2-01: This directory contains the files needed to run the nexus, such as startup scripts, dependent jar packages, and so on.

sonatype-work: This directory contains the configuration files, log files, warehouse files, etc. generated by the nexus.

The first directory is required to run the Nexus, and the second directory is not required, here's how to install and start the Nexus under Windows systems (Linux is also the same with commands to run related scripts).

On Windows systems, users need to go to the D:\ide\nexus\nexus-2.14.2-01\bin\jsw\windows-x86-64 subdirectory and then run the Console-nexus.bat script directly to launch the Nexus. Run the output as follows:

At this point, open the browser to access Http://localhost:8081/nexus can see the Nexus interface,

To stop the nexus, you can press CTRL + C at the command line.

There are some other scripts under the D:\ide\nexus\nexus-2.14.2-01\bin\jsw\windows-x86-64 directory:

    • Install-nexus.bat: Installs the Nexus as a Windows service.
    • Uninstall-nexus.bat: Uninstall the Nexus Windows service.
    • Start-nexus.bat: Start the Nexus Windows service.
    • Stop-nexus.bat: Stop the Nexus Windows service.

A common problem with bundle installation is port conflicts. The Nexus bundle uses the default port of 8081, if the port is already occupied by another application, or if you want to use the 80 port open Nexus Service, edit the file D:\ide\nexus\nexus-2.14.2-01\conf\ Nexus.properties, locate the attribute Application-port, change the default value of 8081 to a different port number as needed, then save the file and restart the Nexus.

Extended:

To install the Nexus service using the command line method, in the PATH environment variable, add the Bin directory under the Nexus installation directory to operate directly under the command line, the specific installation process is very simple, see:

Once the installation is complete, the Nexus will be added to the service and the Nexus service will restart automatically the next time the system restarts.

③ Login Nexus

Nexus has full access control, the default Nexus access is anonymous, and anonymous users only have some basic permissions, to fully learn and manage the nexus, you must log on as an administrator. You can click Log in at the top-right corner to log in, and the Nexus Default Administrator username and password is admin/admin123:

Click to eject:

Click Log in to log in successfully,

Concluding remarks: Today December 27, 2016, only 4 days left in 2017, of course, little Alan want to sigh is really not this, little Alan want to Sigh is, buy a ticket why is so difficult to pinch? Again to the annual spring festival season, a ticket difficult to beg Ah! The work before the Spring Festival is very busy, and now there is a project to go online, so little Alan this period of time will not be our dear Blog park, follow-up to everyone to improve the blog knowledge system, and other after the spring Festival to share some other knowledge. Finally, I wish you all a happy New Year and good health, all of them have a big fortune.

Cute bo master: Alanlee

Blog Address: Http://www.cnblogs.com/AlanLee

This article is from the blog garden, welcome everyone to join the blog park.

(15) Creating a maven with a nexus

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.