如何添加“maven依赖关系”在日食? [英] How do I add a "maven dependency" in eclipse?

查看:113
本文介绍了如何添加“maven依赖关系”在日食?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何使用maven。我已经和Eclipse开发了几年了,还没有必要了解它。但是,现在我正在查看一些文档( http: //docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/json.html ),建议我执行以下操作:



 < ;储存库> 
< id> jboss< / id>
< url> http://repository.jboss.org/maven2< / url>
< / repository>

...
< dependency>
< groupId> org.jboss.resteasy< / groupId>
< artifactId> resteasy-jackson-provider< / artifactId>
< version> 1.1.GA< / version>
< / dependency>

我的eclipse项目如何做?



请假设我对maven一无所知。我刚才在命令行上键入 mvn 可能会安装在我的电脑上,但这正是我认识的程度。如果有一个等效的,非maven的方式跟踪这些说明与eclipse,我会很乐意继续不了解maven。



谢谢!

解决方案

(菜单)窗口 - >显示视图 - >其他 - > Maven - > Maven存储库



在出现的窗口中:



右键单击全局存储库,然后选择进入
右键单击central( http://repo.maven.apache.org/maven2 ),然后选择重建索引



需要一些时间才能完成下载。



之后,您可以:



右键单击项目 - > Maven - >添加依赖关系并开始输入(如hibernate),搜索结果将自动填写下面的搜索结果框。


I don't know how to use maven at all. I've been developing for a couple years with Eclipse and haven't yet needed to know about it. However, now I'm looking at some docs (http://docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/json.html) that suggest I do the following:

"To include it within your project, just add this maven dependency to your build."

<repository>
   <id>jboss</id>
   <url>http://repository.jboss.org/maven2</url>
</repository>

   ...
<dependency>
   <groupId>org.jboss.resteasy</groupId>
   <artifactId>resteasy-jackson-provider</artifactId>
   <version>1.1.GA</version>
</dependency>

How do I do this with my eclipse project?

Please assume I know nothing about maven. I just figured out it might be installed on my computer by typing mvn on the command line, but that's seriously the extent of my knowledge. I would be happy to continue knowing nothing about maven if there is an equivalent, non-maven way of following these instructions with eclipse.

Thanks!

解决方案

(Menu) Window -> Show View -> Other -> Maven -> Maven Repositories

In the window that appears:

Right-click on Global Repositories and select "Go Into" Right-click on "central (http://repo.maven.apache.org/maven2)" and select "Rebuild Index"

It takes some time to complete the download.

After this, you can then:

Right-click on the project -> Maven -> Add Dependency and start typing (such as "hibernate") and the search results will auto-fill in the "Search Results" box below.

这篇关于如何添加“maven依赖关系”在日食?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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