在 eclipse indigo 中使用嵌入式 maven 3 时 mvn.exe 在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6790990/
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
Where is mvn.exe when using embedded maven 3 in eclipse indigo?
提问by MrDrews
I'm using the Indigo Release of eclipse. When I check Window -> Preferences, Maven -> Installations, it confirms that it's using the Embedded (3.0.2/...) installation of Maven.
我正在使用 Eclipse 的 Indigo Release。当我检查 Window -> Preferences, Maven -> Installations 时,它确认它正在使用 Maven 的 Embedded (3.0.2/...) 安装。
I want to be able to run maven commands from the command line (Windows Powershell), but when I type, e.g.,
我希望能够从命令行(Windows Powershell)运行 maven 命令,但是当我输入时,例如,
PS C:\> mvn
no executable is found. I did a search for "mvn.exe" and found no results.
找不到可执行文件。我搜索了“mvn.exe”并没有找到任何结果。
I suppose I could install a stand-alone version of Maven 3 and add that to my PATH, but I'd prefer to be using the same Maven installation for command line tasks as well as IDE (eclipse) tasks.
我想我可以安装独立版本的 Maven 3 并将其添加到我的 PATH,但我更喜欢使用相同的 Maven 安装来处理命令行任务以及 IDE (eclipse) 任务。
So, where is the embedded maven's mvn.exe hiding?
那么,嵌入式maven的mvn.exe藏在哪里呢?
采纳答案by khmarbaise
The simple answer is, cause it's embedded in Eclipse so you can't call it from console. If you like to do this you have to install Mavenyourself.
简单的答案是,因为它嵌入在 Eclipse 中,所以你不能从控制台调用它。如果您喜欢这样做,您必须自己安装 Maven。
回答by Michael-O
There is no mvn.exe at all. The Maven distro comes with batch or shell scripts. Eclipse runs an embedded version which is called through an API.
根本没有 mvn.exe。Maven 发行版带有批处理或 shell 脚本。Eclipse 运行通过 API 调用的嵌入式版本。