使用M2Eclipse插件以交互模式设置带有versions-maven-plugin的版本? [英] Set version with versions-maven-plugin in interactive mode with M2Eclipse plug-in?

查看:81
本文介绍了使用M2Eclipse插件以交互模式设置带有versions-maven-plugin的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 versions-maven-插件 和目标 versions:set 在Eclipse中.我使用 M2Eclipse .

我可以在启动配置中使用 -DnewVersion = 0.0.2-SNAPTSHOT 设置新版本,并且工作正常.但是我想使用交互模式.

I can set the new version with -DnewVersion=0.0.2-SNAPTSHOT in the launch configuration and it works fine. But I want to use the interactive mode.

如果未在启动配置中设置 -DnewVersion = 0.0.2-SNAPTSHOT ,则会收到以下错误消息:

If I don't set -DnewVersion=0.0.2-SNAPTSHOT in launch configuration, I get following error message:

[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.2:set (default-cli) on project test-parent: You must specify the new version, either by using the newVersion property (that is -DnewVersion=... on the command line) or run in interactive mode -> [Help 1]

Maven设置参考说:

  • interactiveMode :如果Maven应该尝试与用户交互以进行输入,则为 true ,否则为 false .默认为 true .
  • interactiveMode: true if Maven should attempt to interact with the user for input, false if not. Defaults to true.

推荐答案

您不能使用Eclipse Run as> Maven Build ..配置进行交互.

You can't have an interactive mode with Eclipse Run as > Maven Build.. configuration.

我建议将控制台用于更可靠,更易于处理的Maven构建.

I would suggest to use the console for Maven builds which is more reliable and easier to handle.

如果您不想离开自己的IDE,可以运行终端(默认情况下为最新版本)(右键单击>显示在>终端中),或安装类似 EasyShell的插件,这两个选项都将为您提供一个已经具有Maven项目作为工作目录的控制台.

If you don't want to leave your IDE, you can run a Terminal (which comes by default with the latest versions) via right click > Show In > Terminal or install a plugin like the EasyShell, both options will provide your a console already having as working directory your Maven project.

这篇关于使用M2Eclipse插件以交互模式设置带有versions-maven-plugin的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆