简体   繁体   English

如何停止Eclipse以从Maven项目的存储库重新下载插件

[英]How to stop eclipse to redownload the plugin from repository for a maven project

I am importing an existing project into my eclipse workspace. 我将现有项目导入Eclipse工作区。 I am using Maven 2.2.0, and Eclipse Juno. 我正在使用Maven 2.2.0和Eclipse Juno。 I could build project successfully using mvn command prompt. 我可以使用mvn命令提示符成功构建项目。

But unable to import the project as eclipse could not build the project.Eclipse is trying to again download from repository. 但是由于eclipse无法导入该项目而无法导入该项目。Eclipse试图再次从存储库下载。 What If we stop eclipse to download the resources again from repository. 如果我们停止Eclipse再次从资源库下载资源该怎么办?

I thought I would add Windows--->Preferences-->Maven--Archetype--Add local catalog 我以为我会添加Windows--->Preferences-->Maven--Archetype--Add local catalog

I understood that we have ~/.m2/archetype-catalog.xml catalogu file. 我知道我们有~/.m2/archetype-catalog.xml catalogu文件。 But to my surprise I cannot find it. 但是令我惊讶的是我找不到它。

Please suggest me if I am proceeding with correct way or not. 如果我使用正确的方法,请提出建议。

If its correct way, how do I set local archetype. 如果方法正确,如何设置本地原型。

Please share your thoughts. 请分享您的想法。

Thanks In Advance. 提前致谢。

You need to install the mvn plugin and import the mvn project as such. 您需要安装mvn插件并按原样导入mvn项目。 Alternatively, you can eclipsify the mvn project using the goal eclipse:eclipse (with the mvn command line). 另外,您可以使用目标eclipse:eclipse(使用mvn命令行)使mvn项目黯然失色。

In mvn itself you could set the pluginRepo to updatePolicy NEVER temporarily, if you still have issues with Eclipse. 如果您仍然对Eclipse有问题,可以在mvn本身中暂时将pluginRepo设置为updatePolicy NEVER。 I think Eclipse uses the same settings for importing mvn projects. 我认为Eclipse使用相同的设置来导入mvn项目。

http://maven.apache.org/settings.html http://maven.apache.org/settings.html

I personally never was happy with Eclipse's mvn integration. 我个人从未对Eclipse的mvn集成感到满意。 Have you tried IntelliJ? 您尝试过IntelliJ吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM