

The password is located on the file, /opt/nexus/sonatype-work/nexus3/admin.password. Once successfully installed, open your web browser and access the Nexus web UI using the URL You will be redirected to the following page:Ĭlick the sign-in button at the top right corner.

Accessing Nexus Repository Web Interface.

Save and close the file then start the Nexus service and enable it to start at system reboot: sudo systemctl daemon-reload Now we create a systemd service file to manage the Nexus service: sudo nano /etc/systemd/system/rvice Djava.io.tmpdir=./sonatype-work/nexus3/tmp XX:LogFile=./sonatype-work/nexus3/log/jvm.log To run nexus as a service at boot time, open /opt/nexus/bin/nexus.rcfile, uncomment it, and add nexus user: sudo nano /opt/nexus/bin/nexus.rcĪdd the following line: run_as_user="nexus"Īfter that, edit the nexus.vmoptions configuration file and define max memory size: nano /opt/nexus/bin/nexus.vmoptions Sudo chown -R nexus:nexus /opt/sonatype-work Next, give permission to nexus files and nexus directory to Nexus user: sudo chown -R nexus:nexus /opt/nexus The deploy goal of the plugin is mapped to the deploy phase of the Maven build.Īlso notice that, as discussed, we do not need staging functionality in a simple deployment of -SNAPSHOT artifacts to Nexus, so that is fully disabled via the element.īy default, the deploy goal includes the staging workflow, which is recommended for release builds.Then, rename the extracted Nexus setup folder to Nexus: sudo mv /opt/nexus-3.30.1-01 /opt/nexus So, the first step in using another deployment plugin in the deploy phase is to disable the existing, default mapping: However, unlike other components that may actually change throughout the lifecycle of a project, the Maven Repository Manager is highly unlikely to change, so that flexibility is not required. The only reason to use the maven-deploy-plugin is to keep open the option of using an alternative to Nexus in the future – for example, an Artifactory repository. Because of that fact, Sonatype built a Nexus specific plugin – the nexus-staging-maven-plugin – that is actually designed to take full advantage of the more advanced functionality that Nexus has to offer – functionality such as staging.Īlthough for a simple deployment process we do not require staging functionality, we will go forward with this custom Nexus plugin since it was built with the clear purpose to talk to Nexus well. The maven-deploy-plugin is a viable option to handle the task of deploying to artifacts of a project to Nexus, but it was not built to take full advantage of what Nexus has to offer. By default, Maven handles the deployment mechanism via the maven-deploy-plugin – this mapped to the deployment phase of the default Maven lifecycle:
