Use Nexus to build a maven

Source: Internet
Author: User
Tags sonatype

  1. Why do you want to set up?

    In the development process, some of the development packages within the company are sometimes used, and it is obvious that it is inappropriate to put these packages externally. In addition, these internal dependencies may be constantly being updated as projects are being developed. By setting up a MAVEN server within the company, the third party and internal dependencies can be managed uniformly, while the network bandwidth can be saved as long as the artifacts required for the project already exist.


  2. Nexus Download and installation configuration

    We can find out about it on the Nexus's official website: http://www.sonatype.org/nexus/go
    Download
    # wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz
    Unzip
    # cd/usr/local
    # mkdir Nexus
    # TAR-XZVF Nexus-2.11.2-03-bundle.tar.gz-c Nexus
    # CD Nexus
    # ls
    nexus-2.11.2-03 Sonatype-work
    Modifying a configuration file
    # CD Nexus-2.11.2-03/conf
    # VI Nexus.properties
    #Jetty section
    application-port=8081 # #修改Jetty端口号
    # Nexus section
    nexus-work=${bundlebasedir}/ .. /sonatype-work/nexus  


    Save the above changes

    Configure users

    # Vi/usr/local/nexus/nexus-2.11.2-03/bin/nexus

    #RUN_AS_USER =

    Run_as_user=root

    Save the above changes

    If you have a firewall set up, go to modify firewall configuration and restart the firewall, skip here ...

  3. start Nexus

    #/usr/local/nexus/nexus-2.11.2-03/bin/nexus start

    ****************************************

    warning-not RECOMMENDED to RUN as ROOT

    ****************************************

    Span style= "color: #00ccff;" >starting Nexus OSS ...

    started Nexus OSS.

    Open in browser: Http://ip:8081/nexus, Login: Username admin   Default password: admin123

     

     

  4. Modify the Maven warehouse address in the project


    This completes the configuration. When a MAVEN project is built, the required artifacts are downloaded directly from the network, and if the required artifacts are not available, they are downloaded to the Web before being downloaded locally. Speaking of which, the small partners should all understand the benefits of building a maven! It's necessary ...!!!



Use Nexus to build a maven

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.