如何使用 -e 开关从 Eclipse 运行 maven

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6842367/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 16:43:03  来源:igfitidea点击:

How to run maven from eclipse with the -e switch

javaeclipsemavenexec-maven-plugin

提问by MetaChrome

Is it possible to execute the exec goal with the exec-maven-plugin with the -e switch? I am getting a MojoExecutionException.

是否可以使用带有 -e 开关的 exec-maven-plugin 执行 exec 目标?我得到了一个MojoExecutionException.

采纳答案by Jigar Joshi

right click the project > run as > maven build...> supply goal there with -eswitch

右键单击项目 > 运行方式 > maven build...> 使用-e开关在那里提供目标

Note3 dots after maven build...

注意后面的 3 个点maven build...

回答by Mohd. Umar

Right click your project and Run as -> Run Configurations...

右键单击您的项目并运行为 -> 运行配置...

enter image description here

在此处输入图片说明

Add the -e (or other switches for eg. -X, etc.) in the Goals input box. If you already have some goals add a space and then put your switch.

在目标输入框中添加 -e(或其他开关,例如 -X 等)。如果您已经有一些目标,请添加一个空格,然后放置您的开关。

enter image description here

在此处输入图片说明