如何添加“maven依赖关系”在日食? [英] How do I add a "maven dependency" in eclipse?
问题描述
< ;储存库>
< 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屋!