此内容没有您所选择的语言版本。
7.7. 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.
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.
Important
Note that keeping your server authentication credentials (for example the passwords) as a plain text in the
settings.xml file is not recommended. All the information should be hashed with a master password in the settings-security.xml file.
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.