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

本文介绍如何使用grepcode.com和mvnrepository.com查找Maven项目的依赖信息,包括groupId、artifactId和version,以geronimo-kernel为例进行详细说明。
所有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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值