Java Eclipse 3.4 Maven 安装目录在哪里可以找到

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/289800/
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-08-11 12:37:21  来源:igfitidea点击:

Where can I find the Maven installation directory in Eclipse 3.4

javamaven-2eclipse-plugin

提问by Tushu

I have installed m2eclipse plugin from http://m2eclipse.codehaus.org/. Now I want to use that as a standalone build tool but I am unable to find the installation directory. Can anyone help me in this?

我已经从http://m2eclipse.codehaus.org/安装了 m2eclipse 插件。现在我想将它用作独立的构建工具,但我找不到安装目录。任何人都可以帮助我吗?

回答by Romain Linsolas

I am not sure to understand what you want. m2eclipse is a pluginfor Eclipse, thus it must be run inside Eclipse.

我不确定你想要什么。m2eclipse 是Eclipse的插件,因此它必须在 Eclipse 中运行。

To have a standalone build tool, I suggest that you just download directly the Maven2 binaries files, and install it on your computer, if it is not already done!

要拥有独立的构建工具,我建议您直接下载Maven2 二进制文件,并将其安装到您的计算机上,如果尚未完成!

For your information, all plugins are stored in the eclipse-dir/plugins directory, as a subdirectory or as a JAR file.

供您参考,所有插件都作为子目录或 JAR 文件存储在 eclipse-dir/plugins 目录中。

回答by toolkit

I have both the plugin (with its embedded maven instance) and a full maven download. Both should end up using the same repository in something like C:\Documents and Settings\user\.m2.

我有插件(带有嵌入式 maven 实例)和完整的 maven 下载。两者最终都应该在类似C:\Documents and Settings\user\.m2.

There are a few cases where you need a full maven download anyways. For example, trying to build a groovy maven plugin crashes with the embedded maven, but works fine for the full download.

在某些情况下,您无论如何都需要完整的 Maven 下载。例如,尝试构建一个 groovy maven 插件会在嵌入 maven 时崩溃,但对于完整下载来说工作正常。

You can also specify from the preference pane in Eclipse, to use a differen maven installation than the embedded one.

您还可以从 Eclipse 的首选项窗格中指定使用不同于嵌入式安装的 maven 安装。

Hope this helps.

希望这可以帮助。

回答by Birol Efe

My Eclipse is using a Default Maven Version (3.0.4). So try this:

我的 Eclipse 使用的是默认 Maven 版本 (3.0.4)。所以试试这个:

Option 1: Restart Restart your Eclipse and look if the Maven configuration is right again under "Windows" -> "Preferences" -> "Maven" -> "Installations"

选项 1:重新启动 重新启动 Eclipse,然后在“Windows”->“首选项”->“Maven”->“安装”下查看 Maven 配置是否正确

Option 2: Select/Configure your Embedded "Maven Runtime" Right-click on your project -> "Run As..." -> under "Maven Build", Tab "Main" -> take the "External" Maven in the Drop-Down Box. Then run it.

选项 2:选择/配置您的嵌入式“Maven 运行时”右键单击您的项目->“运行方式...”-> 在“Maven 构建”下,标签“主要”-> 在 Drop 中选择“外部”Maven - 羽绒服。然后运行它。

回答by Deepak Kumar Verma

Execute the following command:

执行以下命令:

mvn --version

Example Result:

示例结果:

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19  14:51:28+0100)
Maven home: `D:\apache-maven-3.0.5\bin`\..
Java version: 1.6.0_25, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_25\jre
Default locale: nl_NL, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

The Maven Home will show you where maven is installed.

Maven Home 将显示 maven 的安装位置。