How to Upload an Artifact to Nexus
If you're doing software development, you're more than than probable deploying to a local Maven repository. The Nexus repository manager tends to exist one of the more than pop options, and with both and open source version (Nexus OSS) and ane that comes with paid support (Nexus Pro), there really aren't whatsoever articulable barriers to adoption.
In this Nexus repository manager tutorial, we'll demonstrate how to download Nexus, install Nexus, starting time the Nexus administrative console and fifty-fifty upload a Java JAR file into the Nexus releases repository. A video accompanies this Nexus repository tutorial to fill in any gaps this commodity leaves unfilled. This tutorial focuses on the OSS Nexus repository – version 2.14 to be verbal. Both Nexus OSS and Nexus Pro have version 3 releases bachelor, merely those will exist discussed in a subsequent Nexus repository manager tutorial.
Nexus repository manager tutorial
So what are the steps a Maven user needs to follow to get started with the Nexus repository's OSS version? The beginning thing y'all need to exercise is download Nexus. Sonatype'due south repo-director page allows you lot to download Nexus OSS v2 equally a zip file for windows machines, and as a tar file for *nix based Nexus installs. This Nexus repository tutorial will cover a Windows based installation.
When extracted, the Nexus download reveals a nexus-2.14.nine-01 folder which contains a bin directory. Information technology'southward from within that bin directory that the command exists that can be used to start the Nexus repository manager. Run the following control from a DOS prompt to outset Nexus.
C:\tutorial\nexus-ii\bin\ nexus console start
Once the Nexus repository director has started, the administrative console tin exist accesses by pointing a spider web browser to the following address:
http://localhost:8081/nexus
I actually like the fact that the Nexus OSS repository starts on port 8081 and non 8080. It'south like the tool understands that there'due south probably a Tomcat server or a Jenkins CI server running on port 8080, then it does a single digit increment to avoid any conflicts. That'south just common decency if y'all ask me. It should also be noted that you lot need the /nexus context root. Nexus doesn't install itself to the root of the embedded Derby application server.
Default Nexus OSS username and password
The default username and password for the Nexus Maven repository is: admin:admin123. When the Nexus repository manager'due south authoritative console loads, log in with these credentials.
The whole point of having a local Maven repository similar Nexus OSS is to able to upload your ain deployment artifacts to it. To practice so, select the Nexus releases repository on the Repositories listing page and click on the Antiquity Upload tab.
First load of the Nexus repository manager admin console.
The first thing yous need to do is provide the Maven group, artifact, version and packaging attributes for the deployment artifact you are well-nigh to upload. After doing so, use the Select Artifacts to Upload button to browse to the JAR file of interest. Click Add together Antiquity and then click the Upload Artifacts selection, and the resources is uploaded to the local Maven repo provided by Nexus OSS.
Calculation the Nexus repository tutorial'south JAR artifact to Maven
Completing the Nexus repository tutorial
When the upload completes, click on the Browse Alphabetize tab to view the fruits of all of the labor put into following this Nexus repository managing director tutorial.
Last result of the Maven Nexus repository tutorial.
And that's all there is to it. Of form, there are more advanced options to upload a JAR file to your local Maven repo. At that place'southward a REST API, there'due south a Jenkins Nexus integration plugin that can exist used to pull directly from Git, and of course it tin can all be kicked off by editing a POM and running a deploy goal in a Maven build job. All of those volition be covered in subsequent Nexus repository tutorials. But when you lot're just getting started with Nexus, installing the product and uploading an artifact is a slap-up identify to kickoff.
schweitzertaintimand.blogspot.com
Source: https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Nexus-repository-manager-tutorial-Get-started-with-the-OSS-Maven-tool#:~:text=First%20load%20of%20the%20Nexus,the%20JAR%20file%20of%20interest.
Post a Comment for "How to Upload an Artifact to Nexus"