Skip to content

Deploy Shared Module On Remote Repository

Sujata edited this page Mar 12, 2021 · 2 revisions

Deploy Shared Module on Remote Repository

Step 1

Import or Create shared module which you want to publish on remote repository.

Step 2

Right click on Shared Module and select "Generate POM for Shared module" option. It will generate the POM for shared module.

Step 3

Add the remote repository details in generated shared module POM in the following format:

<distributionManagement>
<snapshotRepository>
<id>test-repo</id>
<url>http://nexus.test.com/nexus/content/repositories/releases/</url>
</snapshotRepository>
</distributionManagement>

where <id> is the remote repository id and <url> is the remote repository url

Step 4

Mention the repository id and credential details in settigs.xml present in .m2 repository. Create settings.xml if it is not present. Make sure the repository id is same in settings.xml and pom.xml

<servers>
<server>
<id>test-repo</id>
<username>$usename</username>
<password>$password</password>
</server>
</servers>

Step 5

Right click on Shared module and Create new "Run\Debug Configuration" for Maven. Select shared module project and execute "clean deploy" goal. This will deploy the shared module on remote repository mentioned in Shared module's POM.xml

Clone this wiki locally