eclipse Maven 不更新/下载依赖项

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

Maven not updating/downloading dependencies

eclipseapachemavenwicket

提问by Comic Sans MS Lover

I'm using Eclipse EE and Apache Wicket.

我正在使用 Eclipse EE 和 Apache Wicket。

I have my dependencies written down at pom.xml.

我在 pom.xml 中写下了我的依赖项。

For some reason, maven is not updating even when I try to clean the project and go under Maven > Update Project.

出于某种原因,即使我尝试清理项目并转到 Maven > Update Project 下,Maven 也不会更新。

When I go to check the dependencies the jar is there, but it still give me error when I try to run (ClassNotFoundException).

当我去检查依赖项时,jar 在那里,但是当我尝试运行时它仍然给我错误(ClassNotFoundException)。

Why is this happening?

为什么会这样?

Dependency in question:

有问题的依赖:

<dependency>
    <groupId>org.tuckey</groupId>
    <artifactId>urlrewritefilter</artifactId>
    <version>4.0.3</version>
</dependency>

Also already tried to reinstall maven.

也已经尝试重新安装maven。

回答by Melvins

Try running mvn eclipse:eclipseto update ur Eclipse. Also, refresh after completion of the command run.

尝试运行mvn eclipse:eclipse来更新你的 Eclipse。此外,在命令运行完成后刷新。

回答by Allen Parslow

You shouldn't mix "mvn eclipse:eclipse" and m2eclipse maven eclipse plugin, it will cause the plugin to not operate correctly. If you have done so, you need to remove your .project/.classpath/.settings files and re-import with "import existing maven projects".

你不应该混合使用“mvn eclipse:eclipse”和m2eclipse maven eclipse plugin,这会导致插件无法正常运行。如果你这样做了,你需要删除你的 .project/.classpath/.settings 文件并使用“导入现有的 maven 项目”重新导入。