如何知道要获得哪个神器 [英] How to know which artifact to get

查看:79
本文介绍了如何知道要获得哪个神器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始阅读有关Maven的文章,但我不明白如何例如在快速搜索javaee6时应该选择哪个工件.下面的两个工件之间有什么区别吗?在我读到这一点之后,groupId是公司/组等的唯一"名称,artifactId是实际项目的名称.那么,这两个仅仅是Javaee6的两个项目吗?

I have started reading about Maven and I don't understand how I am able to know which artifact I should pick when for example making a quick search for javaee6. Are there any difference between the two artifacts below? After what I have read to this point the groupId is the "unique" name for a company/group etc and artifactId is the name of the actual project. So are these two just two projects for javaee6?

我可能需要一些关于如何阅读的解释,并知道在有很多选择时应该选择哪个.

I could need some explanation on how it is ment to be read, and know which to choose when there are many options.

Group: org.jboss.javaee
Artifact: jboss-javaee
Version: 5.2.0.Beta1
Extension: jar

Group: javax.javaee
Artifact: javaee
Version: 6.0-alpha-1
Extension: jar

推荐答案

它们是两个不同的jar.一个由jboss提供,另一个由Sun/Oracle提供.

They are two different jars. One is provided by jboss and the other one provided by Sun/Oracle.

jboss-javaee-5.2.0.Beta1.jar由jboss提供,如下所示:-

jboss-javaee-5.2.0.Beta1.jar is provided by jboss as noted here:-

Group: org.jboss.javaee

Sun/Oracle提供了javaee-6.0-alpha-1,如下所示:-

Whereas, javaee-6.0-alpha-1 is provided by Sun/Oracle as noted:-

Group: javax.javaee(javax是Java扩展类的标准包前缀)

Group: javax.javaee (javax is the standard package prefix for java extension classes)

不应将Java EE jar与该应用程序打包在一起.它们由conatiners(tomcat,jboss,weblogic等)提供.通常,您将在这里使用范围的概念来表示它是一个provided级别的jar,以便maven不会将jar与您的应用程序打包.

Java EE jars are not supposed to be packaged with the application. They are provided by the conatiners (tomcat, jboss, weblogic, etc). Usually you will use the concept of scope here to say it's a provided level jar so that maven does not package the jars with your application.

在maven术语中,groupId,artifactId,version代表三位一体.这3个坐标使Maven罐子可以放置在Maven制品(罐子的存储库)中.您可以在此处中了解更多有关如何解释它们的信息.

In maven terminology groupId, artifactId, version represent a trinity. These 3 co-ordinates makes a maven jar locatable in a maven artifactory (repository of jars). You can read more about how to interpret them here.

希望这会有所帮助!

这篇关于如何知道要获得哪个神器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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