Ubuntu build Maven Library 2.14.2-01 and configure the off-cue file

Source: Internet
Author: User
Tags sonatype

Prerequisites for installing JDK version 1.8 or later

1 Downloads

Http://www.sonatype.org/nexus/archived/Select the appropriate version

2 Copy to/usr/local under unzip

sudo cp nexus-2.14.2-01-bundle.tar.gz /usr/local

sudo tar-xzvf nexus-2.14.2-01-bundle.tar.gz

3 Set Run Permissions

sudo chown user name nexus-2.14.2-01

sudo chown user name Sonatype-work

sudo chmod 777 nexus-2.14.2-01

sudo chmod 777 Sonatype-work

4 Setting environment variables (optional)

sudo gedit/etc/profile

Join (can also add a soft link)

Export $NEXUS _home=/usr/local/nexus-2.14.2-01

If you want to be convenient, you can join path

Path= $NEXUS _home/bin

5 Run

Nexus start

If the Nexus console shuts down, it stops.

6 log in to the foreground view (default settings below)

127.0.0.1:8081/nexus

User name: admin

Password: admin123

7 Download and update the index

Index file wget http://repo.maven.apache.org/maven2/.index/nexus-maven-repository-index.gz

Indexed properties File wget http://repo.maven.apache.org/maven2/.index/nexus-maven-repository-index.properties

  Index Decompression Tool :wget https://repo1.maven.org/maven2/org/apache/maven/indexer/indexer-cli/5.1.1/ Indexer-cli-5.1.1.jar

  

copy three files to /usr/local/sonatype-work/nexus/indexer/central-ctx

Extract the properties file into the Central-ctx directory

  Unzip the index file (note to match the downloaded file name, see the Run command Java-jar indexer-cli-5.1.0on the web. Jar I didn't pay attention to it at first. Error:unable to access Jarfile)

Java-jar indexer-cli-5.1.1.jar-u nexus-maven-repository-index.gz-d/.

-D/. Indicates decompression to the current path ( /usr/local/sonatype-work/nexus/indexer/central-ctx )

8 Restart Nexus and check in front desk

Nexus restart

Login-repositories-pulic Repositories-browse Index Expand the following central if you see the index list, you are successful.

9 Use:

Eclipse configures the corresponding warehouse address in the setting.xml under M2, and the address is the corresponding repository Path

Like public repositories's http://127.0.0.1:8081/nexus/content/groups/public/.

<mirror>
<id>mynexus</id>
<mirrorOf>cntral</mirrorOf>
<name>my-maven</name>
<url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
</mirror>

ID and name, fill it out for yourself.

Android-studio

Maven {
URL "http://localhost:8081/nexus/content/groups/public/"
}

Above from the Internet, only for personal notes.

Ubuntu build Maven Library 2.14.2-01 and configure the off-cue file

Related Article

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.