maven基础一

介绍maven目录

maven基础一

maven基础一

maven项目的关系

三种关系:依赖关系、继承关系、聚合关系。

maven基础一

maven基础一

maven基础一

聚合项目和继承项目的关系

maven基础一

父项目中的一些其他知识点

maven基础一

代码演示:

<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>
  <groupId>com.bjsxt</groupId>
  <artifactId>parent</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <properties>
  	<spring-version>4.1.6.RELEASE</spring-version>
  </properties>
  <dependencyManagement>
  <dependencies>
  	<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>

			<version>${spring-version}</version>
		</dependency>
  </dependencies>
  </dependencyManagement>
  <modules>
  	<module>child2</module>
  </modules>
</project>