Linux installation MVN and Nexus remote repositories

Source: Internet
Author: User

    • Download MVN Package
Http://mirrors.cnnic.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
    • Download the apache-maven-3.0.5-bin.tar.gz package and use the FTP tool to transfer it to the server.
    • Unpacking the installation package
    • Configuring Environment variables
Vi/etc/profile at the end of the add export maven_home=/usr/local/src/apache-maven-3.0.5export path= $PATH: $MAVEN _home/bin
    • Refresh Configuration
Source/etc/profile
    • Verify that the installation is successful
MVN--version
    • Download Nexus: (2.* version)
wget https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/oss/nexus-2.14.8-01-bundle.tar.gz
    • Extract
    • Login
Admin/admin123
    • Set up
Repositories/releases/configuration/deployment Policy
Allow Redeploy

  

    • Click Repositories to set the Download Remote Indexes in the Configuration of all the items in the list type proxy to True

    • Configure local Project References
    • Automatically publish artifacts to remote repositories, add in Project Pom.xml
<distributionManagement>    <repository>        <id>releases</id><!-- This ID needs to match the repository ID of your release repository--        <url>http://192.168.1.11:8081/nexus/content/repositories/ releases</url>    </repository>    <snapshotRepository>        <id>snapshots</id> <!--this ID needs to match the repository ID of your snapshots warehouse--        <url>http://192.168.1.11:8081/nexus/content/ Repositories/snapshots</url>    </snapshotRepository></distributionManagement>
    • Modify the Settings.xml configuration file in the local $maven_home\conf directory and add the following configuration
<servers>    <server>        <id>releases</id>        <username>admin</username >        <password>admin123</password>    </server>    <server>        <id> snapshots</id>        <username>admin</username>        <password>admin123</password>    </server></servers>

  

Linux installation MVN and Nexus remote repositories

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.