简体   繁体   English

将Maven与Eclipse Kepler集成的问题

[英]Problems integrating Maven with Eclipse Kepler

I am totally new to working with Maven in Eclipse . 我完全不熟悉在Eclipse中使用Maven I am using the latest verion of Eclipse (Kepler) . 我正在使用Eclipse的最新版本(开普勒) According other posts, as well as Eclipse's help page http://help.eclipse.org/kepler/index.jsp?topic=//org.eclipse.platform.doc.user/tasks/tasks-127.htm , I am supposed to try to install new software within Eclipse IDE. 根据其他帖子,以及Eclipse的帮助页面http://help.eclipse.org/kepler/index.jsp?topic=//org.eclipse.platform.doc.user/tasks/tasks-127.htm ,我是应该尝试在Eclipse IDE中安装新软件。

However, when I try to Add Eclipse's recommended m2e release, Eclipse gives me an error: 但是,当我尝试添加Eclipse推荐的m2e版本时,Eclipse给出了一个错误:

Unable to read repository at http://download.eclipse.org/technology/m2e/releases . 无法在http://download.eclipse.org/technology/m2e/releases上阅读存储库。 download.eclipse[...]releases is not a valid repository location. download.eclipse [...]版本不是有效的存储库位置。

Essentially I run into the same problem no matter which approach I take outlined on the Eclipse help page. 基本上我遇到了同样的问题,无论我在Eclipse帮助页面上采用哪种方法。 Is there some other/better way to integrate Maven with Eclipse? 是否有其他/更好的方法将Maven与Eclipse集成? Are there steps I should have taken before this? 在此之前我应该​​采取哪些措施? All I have done so far is install Eclipse. 到目前为止,我所做的就是安装Eclipse。 How can I successfully get Maven running? 我怎样才能成功运行Maven?

EDIT: Now I am using Java EE and still run into problems when making a Maven project. 编辑:现在我正在使用Java EE,但在制作Maven项目时仍遇到问题。 I get a "Could not resolve archetype error" could this be because I'm behind a proxy? 我得到一个“无法解决原型错误”这可能是因为我在代理背后?

Most convenient option: 最方便的选择:

The reason you're getting that error is because that repo is deprecated, and it has been moved. 您收到该错误的原因是因为该repo已弃用,并且已被移动。 Example of how the new repo looks: 新repo的外观示例:

http://download.eclipse.org/technology/m2e/releases/1.0/1.0.0.20110607-2117

Copy that in the Install New Software view, and you will see that it works. 将其复制到“ 安装新软件”视图中,您将看到它的工作原理。


Other options: 其他选择:

  • Install the Maven Integration from Eclipse Marketplace (Help -> Eclipse Marketplace) Eclipse Marketplace安装Maven集成(帮助 - > Eclipse Marketplace)
  • Download the EE version of Kepler (comes with m2e) 下载开普勒EE版本 (随m2e一起提供)
  • Choose your own release (bottom of the page) and use the Install New Software view. 选择您自己的版本 (页面底部)并使用“ 安装新软件”视图。

  • I had the same issue here and the above answer didnt work for me. 我在这里有同样的问题,上面的答案对我没有用。 Although Maven is installed I cane update my dependencies on my folder the way I used to be able to do on Juno. 虽然安装了Maven,但我可以按照以前在Juno上的方式更新我的文件夹依赖项。 What I did was used the pom.xml from my current project and pasted it into the pom of my new project I created specifically in Eclipse using new project->Maven. 我所做的是使用我当前项目中的pom.xml并将其粘贴到我使用new project-> Maven在Eclipse中专门创建的新项目的pom中。

    This was eclipse knows its a Maven project and allows my all the benefits of being one. 这是eclipse知道它的Maven项目并且允许我作为一个项目的所有好处。

    To install maven properly for eclipse you should set the correct repos as follow: 要为eclipse正确安装maven,你应该设置正确的repos如下:

    Help=>install=> then work with http://download.eclipse.org/releases/ Help => install =>然后使用http://download.eclipse.org/releases/

    example of eclipse version : mars or kepler .. eclipse版本的例子:火星或kepler ..

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

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