idea中maven项目pom.xml的项目配置以及导入jar包


pom.xml中的项目配置

1 
2     <groupId>cn.itcastgroupId>
3     <artifactId>maven_java_1artifactId>
4     <version>1.0-SNAPSHOTversion>
5     
6     <packaging>jarpackaging>

导入jar包

1 
2     <dependencies>
3         <dependency>
4             <groupId>junitgroupId>
5             <artifactId>junitartifactId>
6             <version>4.9version>
7             <scope>testscope>
8         dependency>
9     dependencies>

导入jar包需要有坐标,如果本地仓库中有,则在输入时会有提示。

如果没有,可以在浏览器输入maven repository

然后选择一个版本的jar包,把配置信息粘贴到pom.xml的标签中