I'm having problems when I run mvn release:prepare. I have the following message:
[ERROR] Failed to execute goal org.apache.maven.plugins: maven-release-plugin: 2.5.1: prepare (default-cli) on project marketplace-po c: Failed to invoke Maven build. Error configuring command-line. Reason: Maven executable not found at: C: \ dev \ apache-maven-3.3.1 \ bin \ mvn.bat -> [Help 1]
Preparing a release goes through the following release phases by default: Check that there are no uncommitted changes in the sources. Check that there are no SNAPSHOT dependencies. Change the version in the POMs from x-SNAPSHOT to a new version (you will be prompted for the versions to use)
mvn release:prepare This command prepares for a release in SCM. It goes through several phases to ensure the POM is ready to be released and then creates a tag in SVN which can be used by release:perform to make a release.
When a release is rolled back, the following release phases are executed by default: All project POMs are reverted back to their pre-release state locally, and also in the SCM if the previous release command was able to successfully make changes in the SCM to the POMs.
An <execution> causes the plugin to be executed during the maven build lifecycle, i.e. during your build. The <configuration> allows you to configure the plugin for how it should behave during execution. Many Maven plugins provide documentation about their configuration options, e.g. the maven-compiler-plugin.
As of version 3.3.X
, Maven renamed mvn.bat
to mvn.cmd
. This is fixed in the maven-release-plugin
version 2.5.2
: MRELEASE-902
They suggest adding the following section in case the fixed plugin version is not picked up automatically:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.1</version> <dependencies> <dependency> <groupId>org.apache.maven.shared</groupId> <artifactId>maven-invoker</artifactId> <version>2.2</version> </dependency> </dependencies> </plugin> </plugins> </build>
I just had same problem when running from eclipse, it resolved by making copy of mvn.cmd to mvn.bat
And it worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With