mvn deploy:deploy-file -DgroupId=com.pom.group.id -DartifactId=POMArtifactid -Dversion=2.1.9 -Dpackaging="jar" -Durl=https://artifacts-url/maven/v1 -Dfile="JarfileToBeExported-2.1.9.jar" -DrepositoryId=reposerver-id
To use this jar file:
<dependency>
<groupId>com.pom.group.id</groupId>
<artifactId>POMArtifactid</artifactId>
<version>2.1.9</version>
</dependency>
Settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode />
<usePluginRegistry />
<offline />
<pluginGroups />
<servers>
<server>
<id>reposerver-id</id>
<username>username</username>
<password>password</password>
</server>
</servers>
<profiles>
<profile>
<id>distributionManagement</id>
<repositories>
<repository>
<id>reposerver-id</id>
<url>https://artifacts-url/maven/v1</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>distributionManagement</activeProfile>
</activeProfiles>
<mirrors />
<proxies />
</settings>
No comments:
Post a Comment