无法执行目标Maven版本:准备 [英] Failed to execute goal maven release:prepare
本文介绍了无法执行目标Maven版本:准备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行mvn release:prepare时遇到问题.我收到以下消息:
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]
推荐答案
从版本3.3.X
开始,Maven将mvn.bat
重命名为mvn.cmd
.在maven-release-plugin
版本2.5.2
中已修复此问题: MRELEASE-902
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>
这篇关于无法执行目标Maven版本:准备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文