Questions tagged [maven-release-plugin]

The Apache Maven Release Plugin is used to create releases with Maven. The release plugin will automatically create tags in the VCS etc.

Main objective

From Maven Doc : This plugin is used to release a project with Maven, saving a lot of repetitive, manual work. Releasing a project is made in two steps: prepare and perform

The maven-release-plugin will be used to create releases of artifacts. The release plugin will check if you have local modification in your working area, updates your pom according to the next version of your artifact (this can be done interactive or non-interactive) and finally create a tag in your SCM.

Goals Overview

  • release:clean Clean up after a release preparation.
  • release:prepare Prepare for a release in SCM.
  • release:prepare-with-pom Prepare for a release in SCM, and generate release POMs that record the fully resolved projects used.
  • release:rollback Rollback a previous release.
  • release:perform Perform a release from SCM.
  • release:stage Perform a release from SCM into a staging folder/repository.
  • release:branch Create a branch of the current project with all versions updated.
  • release:update-versions Update the versions in the POM(s).
870 questions
183
votes
6 answers

How can I get maven-release-plugin to skip my tests?

How can I get the maven-release-plugin to run without triggering the tests? I have tried -Dmaven.test.skip=true and -DskipTests and -DpreparationGoals=clean ...yet none work. Yes, I know I shouldn't release if the tests don't pass, but I…
Steven
  • 2,189
  • 3
  • 15
  • 12
127
votes
12 answers

"Git fatal: ref HEAD is not a symbolic ref" while using maven release plugin

I get the following error output while running the Maven release plugin prepare step i.e. mvn release:prepare --batch-mode -DreleaseVersion=1.1.2 -DdevelopmentVersion=1.2.0-SNAPSHOT -Dtag=v1.1.2 -X from an Atlassian Bamboo plan. However doing the…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
126
votes
4 answers

"You don't have a SNAPSHOT project in the reactor projects list." when using Jenkins Maven release plugin

I'm using SVN, Maven 3.0.3 on the latest version of Jenkins and the Maven Release plugin. I'm trying to use the Maven release plugin (through Jenkins) do a dry run and so am executing the options … Executing Maven: -B -f…
Dave
  • 15,639
  • 133
  • 442
  • 830
104
votes
3 answers

How to deploy SNAPSHOT with sources and JavaDoc?

I want to deploy sources and javadocs with my snapshots. This means that I want to automize the following command: mvn clean source:jar javadoc:jar deploy Just to execute: mvn clean deploy I don't want to have javadoc/sources generation executed…
Henryk Konsek
  • 9,016
  • 5
  • 32
  • 41
77
votes
13 answers

Maven release plugin fails : source artifacts getting deployed twice

We are using the maven release plugin on hudson and trying to automate the release process. The release:prepare works fine. When we try to do the release:perform , it fails because it tries to upload a source artifact twice to the repository. Things…
61
votes
5 answers

how to release a project which depends on a 3rd party SNAPSHOT project in maven

i would like to release a snapshot project 'foo-1.0-SNAPSHOT' using the maven release plugin. The project depends on a 3rd party module 'bar-1.0-SNAPSHOT' which is not released yet. I use the option 'allowTimestampedSnapshots' in my project's…
Christian
  • 683
  • 1
  • 5
  • 6
47
votes
5 answers

how to make maven release plugin skip tests?

I'm running mvn release:prepare -Darguments="-Dmaven.test.skip=true -DskipTests" on the master checkout of Spotify's docker-client. But I can't get maven's release plugin to skip the tests. Why doesn't maven in this case respect the CLI flags? I'm…
David Xia
  • 5,075
  • 7
  • 35
  • 52
42
votes
4 answers

Maven release:prepare fails with "scm connection or developerConnection must be specified"

I'm trying to prepare a release of my maven project with mvn release:prepare but it fails with the following error: Caused by: org.apache.maven.plugin.MojoFailureException: Missing required setting: scm connection or developerConnection must be…
Henrique Ordine
  • 3,337
  • 4
  • 44
  • 70
40
votes
7 answers

Avoid gpg signing prompt when using Maven release plugin

I've got a Maven project that I'm trying to configure to use the maven release plugin. Part of the release process is to use the Maven GPG Plugin to sign artifacts which requires among other things, the GPG signing key passphrase to succeed. …
Nick
  • 8,181
  • 4
  • 38
  • 63
39
votes
4 answers

In a Maven project, how can I automatically update the version all child modules, plus the parent?

I have a multi-module project. parent POM (1.0-SNAPSHOT) |-- module1 (1.0-SNAPSHOT) |-- module2 (1.0-SNAPSHOT) `-- module3 (1.0-SNAPSHOT) When I execute mvn release:prepare it verify that parent POM has a SNAPSHOT version and all dependent…
eugenn
  • 1,638
  • 6
  • 23
  • 38
38
votes
24 answers

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

I have install maven in my machine. I have properly set the class-path and maven home folder. Every time I execute mvn clean install, it gives me exception. I have also tried to delete the .m2 folder but the same result. mvn -version output Apache…
Kartik Jajal
  • 732
  • 4
  • 10
  • 16
34
votes
4 answers

Remove -SNAPSHOT from project version in pom

I have a pom with the following GAV com.company.services test-branch-2 1.0.21-SNAPSHOT I want to remove -SNAPSHOT from this using maven in batch mode, so I can do it with Jenkins and…
Jepper
  • 1,092
  • 3
  • 11
  • 24
31
votes
1 answer

Maven release plugin git credentials

We are using Jenkins and just switched from a file based git repo without authentication to using GitBlit with proper authentication over http. The problem is - how is maven supposed to authenticate itself in batch mode? Updating each job with…
Rasmus Franke
  • 4,434
  • 8
  • 45
  • 62
29
votes
2 answers

Maven release:perform without deploy and calling an external shell script

I am using the maven release plugin. Problem is simple: I don't want to do a deploy on release:perform. I actually want to execute a shell script that will do the deploy for me. So I have two things to accomplish: Somehow disable the default…
TraderJoeChicago
  • 6,205
  • 8
  • 50
  • 54
27
votes
2 answers

Maven: Bind plugin execution to the execution of another plugin, not to a lifecycle phase

Note regarding the accepted answer: I accepted the answer because of strong circumstantial evidence. Nonetheless, this is circumstantial evidence, so take it with a grain of salt. How can I have a plugin be triggered when the user runs a plugin…
Mihai Danila
  • 2,229
  • 1
  • 23
  • 28
1
2 3
57 58