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

所有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

posted @ 2017-10-14 15:38  懒人写博客  阅读(1714)  评论(0编辑  收藏  举报