《Maven_孔浩》Maven依赖

项目目录结构如下:
pom.xml
src          mainjavazttcitatmavench02
target
 
pom.xml文件说明

groupId:项目id(如:zttc.itat.maven)

artifactId:模块id(如:maven-ch01)
version:版本(如:0.0.1-SNAPSHOT)
 
添加依赖:
<dependencies>

     <!--添加对junit的依赖-->

     <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.10</version>
          <scope>test</scope>
     </dependency>

     <!--添加对maven-ch01的依赖-->

     <dependency>
          <groupId>zttc.itat.maven</groupId>
          <artifactId>maven-ch01</artifactId>
          <version>0.0.1-SNAPSHOT</version>
     </dependency>
</dependencies>
原文地址:https://www.cnblogs.com/sunflower627/p/4526467.html