maven pom.xml 的配置及解释
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- 模型版本号 -->
<!-- 群组id ,单位域名反写 -->
<groupId>cn.itcast</groupId>
<!-- 项目 id 一个单位只有一个域名,但是一个单位可以有多个项目 -->
<artifactId>One</artifactId>
<!--版本号:用于描述 开发过程的阶段性标识 -->
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging><!--生成什么类型的,有jar, war(默认) -->
<name>One</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<!--依赖管理 -->
<dependencies>
<!-- 具体依赖-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
======================`
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
====== <dependency>
<groupId>cn.itcast</groupId>
<artifactId>One</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>========
</dependencies>`
在一个maven项目里需要用的另一个maven项目里的东西需要在pom中配置的东西