I want to deploy to a private Maven repository only if there is a defined profile.
Is this possible? And how can I do it?
I want to deploy to a private Maven repository only if there is a defined profile.
Is this possible? And how can I do it?
On
put the repository into profile
<profiles>
<profile>
<id>test</id>
<distributionManagement>
<repository>
<id>repsy</id>
<name>My Private Maven Repository on Repsy</name>
<url>https://repo.repsy.io/mvn/username/reponame</url>
</repository>
</distributionManagement>
</profile>
</profiles>
you can execute :mvn deploy -P test,it will use the repo in the test profile.
Maybe you can use the
skipproperty described here: https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#skip