[JAVA] I tried setting up a Maven remote repository

Introduction

You need a remote repository that you need to manage Jar that is not published in the central repository or Jar created in the project. I tried to find out how to set up a remote repository. For this setup, I will try using Nexus.

Remote repository setup procedure

1. Download nexus from the download site.

URL:https://www.sonatype.com/download-oss-sonatype Download according to the OS to be set up. Since CentOS7 is used here, click "Nexus Repository Manager OSS 3.x --Unix".

2. Unzip the tar file

If you start it as the root user, WARNING will appear, so unzip the tar file as the starting user.

3. Start nexus

# nexus-3.3.1-01/bin/nexus start

By the way, if you run it as root user, the following WARNING will appear.

WARNING: ************************************************************
WARNING: Detected execution as "root" user.  This is NOT recommended!
WARNING: ************************************************************

4. Connect to http: // IP address: 8081 / nexus with a web browser

5. Click Login In at the top right of the screen to log in

The management user for logging in is as follows. user : admin password : admin123

Creating a remote repository

Here is a brief description of creating a dedicated remote repository.

1. Click Repositories in Views / Repositories on the left side of the nexus screen

2. Click Add at the top of the Repositories tab, then click Hosted Repository

When you click it, a screen for entering the id such as New Hosted Repository will appear.

3. Enter the required information in the New Hosted Repository and click the Save button.

Click the Save button to complete the registration. It is necessary to write the information of the remote repository in pom.xml, but if you select the summary tab with each repository selected, the distributionManagementg to be written in pom.xml is displayed, so you can just copy it.

Recommended Posts

I tried setting up a Maven remote repository
I tried using the GitHub repository as a library server
I tried a little digdag docker.run_options
I tried a calendar problem in Ruby
A new engineer tried to publish his own library to Maven Central Repository
How to create a Maven repository for 2020
Build a Maven repository on AWS S3
I tried playing with BottomNavigationView a little ①
I tried embedding a formula in Javadoc
I tried using Junit on Mac VScode Maven
java I tried to break a simple block
I tried to develop a man-hour management tool
I tried to develop a DUO3.0 study website.
I tried hitting a Java method from ABCL
I tried to create a LINE clone app
Setting up Docker Engine in a non-internet connection
I tried running Ansible on a Docker container
I tried to develop a website to record expenses.
I tried to implement a server using Netty
I tried to break a block with java (1)
I tried running Java on a Mac terminal
I tried tomcat
I tried youtubeDataApi.
I tried refactoring ①
I tried FizzBuzz.
I tried JHipster 5.1
I tried using a database connection in Android development
I tried to develop a ramen shop sharing website.
I tried to decorate the simple calendar a little
I tried to create a Clova skill in Java
I tried to make a login function in Java
I tried scraping a stock chart using Java (Jsoup)