Giter Club home page Giter Club logo

nexus's Introduction

Nexus Installation

Prequisties To install nexus minimum server requirements are with 4CPU and 8GB RAM. Use t3.xlarge for AWS instance for better performance

Use the userdata-amazaonlinux2 script to install docker and docker compose in the amazonlinux2 instance

execute the docker compose yml file to deploy Nexus on the server

Configure repositories in Nexus

  1. Configure a blob storage for each of the below a. maven-snapshots b. maven-releases c. maven-central d. maven-group
  2. configure a maven snapshot repository A repository for Maven artifacts that you deploy with -SNAPSHOT in the end of the version tag of your pom.xml:

<version>1.0.0-SNAPSHOT</version> Create a new maven (hosted) repository and configure it like:

image

  1. configure a maven release repository A repository for Maven artifact that you deploy without -SNAPSHOT in the end of the version tag of your pom.xml:

<version>1.0.0</version> Create a new maven (hosted) repository and configure it like:

image

  1. Create a proxy for Maven Central A repository that proxies everything you download from Maven Central. Next time you download the same dependency, it will be cached in your Nexus.

Create a new maven (proxy) repository and configure it like: image

  1. create a group repo

image

  1. configure your maven client to use nexus repo

Put this in your settings.xml file. This will configure the credentials to publish to your hosted repos, and will tell your mvn to use your repo as a mirror of central:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">

  <servers>
    <server>
      <id>nexus-snapshots</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
    <server>
      <id>nexus-releases</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
  </servers>

  <mirrors>
    <mirror>
      <id>central</id>
      <name>central</name>
      <url>http://your-host:8081/repository/maven-group/</url>
      <mirrorOf>*</mirrorOf>
    </mirror>
  </mirrors>

</settings>
  1. Put the below in your pom.xml
<project>
  <repositories>
    <repository>
      <id>maven-group</id>
      <url>http://your-host:8081/repository/maven-group/</url>
    </repository>
  </repositories>

    <distributionManagement>
    <snapshotRepository>
      <id>maven-snapshots</id>
      <url>http://your-host:8081/repository/maven-snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>maven-releases</id>
      <url>http://your-host:8081/repository/maven-releases/</url>
    </repository>
  </distributionManagement>
 </project>
  1. deploy the package to nexus using maven command : mvn clean deploy

nexus's People

Contributors

vcroshan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.