eclipse 如何彻底删除Maven?

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

How to completely remove Maven?

javaeclipsemavenuninstall

提问by z7r1k3

My instructor had us all install the Maven add-on for programming in Java. Now, any time I make a new Java program, it is not recognized by Eclipse. By this I mean it redirects to another program. Also, when looking in "Run Configurations", under "Java Applications", any new programs I make don't show up there. However, all programs should show up here.

我的老师让我们都安装了用于 Java 编程的 Maven 插件。现在,每当我创建一个新的 Java 程序时,Eclipse 都无法识别它。我的意思是它重定向到另一个程序。此外,当查看“运行配置”时,在“Java 应用程序”下,我制作的任何新程序都不会显示在那里。但是,所有程序都应显示在此处。

Example:

例子:

Say I have a program named "Test" that I made beforeinstalling Maven. Now say I made a program "Test2" afterinstalling Maven. When running Test, it works fine. But when running Test2, it runs Test. Other than it showing in the directory on the left, Eclipse makes no indication that Test2 actually exists. That is my issue.

假设我安装 Maven之前制作了一个名为“Test”的程序。现在说我安装 Maven制作了一个程序“Test2” 。运行测试时,它工作正常。但是在运行 Test2 时,它运行的是 Test。除了在左侧目录中显示之外,Eclipse 没有表明 Test2 实际存在。那是我的问题。

My Question:

我的问题:

How do I completelyremove Maven from my system? I don't want to use System Restore.

如何从我的系统中完全删除 Maven?我不想使用系统还原。

What I've Tried:

我试过的:

I have removed the Environment Variable "M3 HOME" and removed it from the "Path" variable. The issue is still there, however.

我已经删除了环境变量“M3 HOME”并将其从“Path”变量中删除。然而,问题仍然存在。

I have a Windows 10 Lenovo Y50-70 Gaming Laptop (64 bit) with 4K resolution. I am using Eclipse Luna.

我有一台分辨率为 4K 的 Windows 10 Lenovo Y50-70 游戏笔记本电脑(64 位)。我正在使用 Eclipse Luna。

回答by z7r1k3

After messing around a bit, I figured out the answer.

经过一番折腾,我找到了答案。

Right click any "src" folder, and click something along the lines of "Exclude Maven Artifact" under the "Maven" option. This removed it from Eclipse, and I can now make new programs and run them again.

右键单击任何“src”文件夹,然后单击“Maven”选项下的“Exclude Maven Artifact”行中的某些内容。这将它从 Eclipse 中删除,我现在可以创建新程序并再次运行它们。

Hope this helps whoever has my issue!

希望这对遇到我问题的人有所帮助!