Show Table of Contents
6.6. Configuring deployment to a remote Nexus repository
Nexus is a repository manager frequently used in organizations to centralize storage and management of software development artifacts. It is possible to configure your project so that artifacts produced by every build are automatically deployed to a repository on a remote Nexus server.
To configure your project to deploy artifacts to a remote Nexus repository, add a
distributionManagement element to your project's pom.xml file as demonstrated in the code example below.
<distributionManagement>
<repository>
<id>deployment</id>
<name>Internal Releases</name>
<url>http://your_nexus_host:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>deployment</id>
<name>Internal Releases</name>
<url>http://your_nexus_host:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
Replace the URLs in the example with real URLs of your Nexus repositories. The repository specified in the
snapshotRepository element is used when the -SNAPSHOT qualifier is appended to the project's current version number. In other cases the repository specified in the repository element is used.
If your Nexus server requires authentication, you will also need to modify your projects Maven settings to add your credentials in the
settings-security.xml file, using a master password. By default, this file is in ~/.m2 folder, unless you have changed its location by modifying the kie.maven.settings.custom system property.
<servers>
<server>
<id>deployment</id>
<username>admin</username>
<password>admin.123</password>
</server>
</servers>
With this configuration in place, clicking the button in Business Central executes a Maven build and deploys the built artifacts both to the local repository and to one of the Nexus repositories specified in the
pom.xml file.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.