Failed to execute goal maven release:prepare

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.


I had the same problem too at using Maven 3.3.1 in Windows 8.1. I searched on it and found that mvn.bat moved to mvn.cmd. Still, I don't know how to solve it at the version. So, I downloaded Maven 3.2.5 and there was the mvn.bat file. And it worked for me.