Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Release: How to skip deploy step?

To release my app I am using maven-release-plugin.

One step in this process is deploying the release into the repository. I would like to avoid this step, but when I remove distributionManagement from my pom file I am getting the error:

Deployment failed: repository element was not specified in the POM inside distributionManagement element 

How to configure maven-release-plugin to skip deploying?

Thanks for any advice!

like image 919
Tomas Marik Avatar asked Sep 11 '25 19:09

Tomas Marik


1 Answers

This is nothing unusual or funny to release several times a day..space issue might be questionable but this is a separate discussion.

You can configure the maven release plugin what kind of goals will be done during the release. This can be achieved by configuring the plugin in a pluginManagement at best. And also you should define all the versions of all plugins you are using (most of the time it is most convenient to create a parent pom for your environment).

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <configuration>
    <arguments>${arguments}</arguments>
    <goals>The Goal You would like to execute</goals>
    <autoVersionSubmodules>true</autoVersionSubmodules>
  </configuration>
</plugin>

So you could define to only make install instead of deploy like this:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <configuration>
    <arguments>${arguments}</arguments>
    <goals>install</goals>
    <autoVersionSubmodules>true</autoVersionSubmodules>
  </configuration>
</plugin>
like image 86
khmarbaise Avatar answered Sep 14 '25 14:09

khmarbaise