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


pom.xml中的项目配置

1 <!--当前项目坐标-->
2     <groupId>cn.itcast</groupId>
3     <artifactId>maven_java_1</artifactId>
4     <version>1.0-SNAPSHOT</version>
5     <!--打包方式jar-->
6     <packaging>jar</packaging>

导入jar包

1 <!--导入单元测试jar包-->
2     <dependencies>
3         <dependency>
4             <groupId>junit</groupId>
5             <artifactId>junit</artifactId>
6             <version>4.9</version>
7             <scope>test</scope>
8         </dependency>
9     </dependencies>

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

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

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

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM