20秒 教你maven2的pom文件的依赖包如何写

来源:互联网 发布:php单例模式实例 编辑:程序博客网 时间:2024/05/23 17:21
所有Maven 库 需要的包 及 pom.xml 中 groupId  artifactId version 都可在这个网上收到。

例如:需要 通过 maven 在项目 中 添加 geronimo-kernel 的包,但不知道 maven 中的 pom 文件的 groupId  artifactId version 是什么?这种情况下就可到  http://grepcode.com/ 搜索。

步骤:
  1:框中输入:  geronimo-kernel
  
  2:在左侧  All Repositories 列表中,选中 Maven-Central 项

  3:右侧依次 出现 org.apache.geronimo.framework / geronimo-kernel
                   3.0-M1  2.2.1  2.2   2.1.7   2.1.6   2.1.5


4:pom文件中输入:
<dependency><groupId>org.apache.geronimo.framework</groupId><artifactId>geronimo-kernel</artifactId><version>2.2</version></dependency>


http://grepcode.com/

http://mvnrepository.com/  这个网址查依赖写法

原文地址:http://www.myexception.cn/program/897516.html

0 0
原创粉丝点击