如何将Maven存储库jar添加到Eclipse构建路径? [英] How to add maven repository jars to eclipse buildpath?

查看:224
本文介绍了如何将Maven存储库jar添加到Eclipse构建路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Eclipse中,我可以在maven存储库视图中看到所有必需的jar.但是对于丢失的jar文件,我有大约100个错误.所以我已经设置了M2_REPO环境变量.我已经从命令行运行了mvn eclipse:eclipse命令.当我运行此命令时,一个耳包会添加到我的项目的一个子包中.例如,我的项目名称是Portal.子包是portal_ear.运行mvn eclipse:eclipse命令后的耳朵将添加到portal_ear的目标文件夹中.所以我的问题是,因为我已经在存储库中添加了jar,如何将它们添加到eclipse中的门户构建路径中?

From eclipse I can see all the necessary jars in maven repositories view. But I have around 100 errors for the missing jar files. So I have set M2_REPO environment variable. I have ran the mvn eclipse:eclipse command from command line. When I run this command an ear package is added to one of subpackages of my project. For example my project name is portal. And sub package is portal_ear. The ear after running mvn eclipse:eclipse command is added to target folder of portal_ear. So my question is as I have the jars already in the repository, how can I add those to the portal buildpath inside eclipse?

谢谢.

推荐答案

从Eclipse市场上安装m2e.现在,您可以将现有的Maven项目导入工作空间或转换现有的项目.

Install m2e from the eclipse marketplace. You can now import existing maven projects into your workspace or convert existing ones.

对于Eclipse 3.7效果很好

Works very well for Eclipse 3.7

这篇关于如何将Maven存储库jar添加到Eclipse构建路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆