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/

你可能感兴趣的:(maven2)