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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM