pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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.qfedu.edu</groupId>
<artifactId>cd-2204-java-project-02</artifactId>
<version>1.0-SNAPSHOT</version>
<!--项目最终运行的时候 打成什么包?
jar: 打成jar包
war:打成war包
pom:不打包
-->
<packaging>jar</packaging>
<!--常量存放的地方
一般情况 用来进行 包的版本号的维护
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
这三个是系统引用的 我们在下面的库中是不需要去引用的
这里来维护你的版本号的目的是为了方便你去进行修改
-->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<mysql-version>5.1.40</mysql-version>
<junit-version>4.12</junit-version>
<druid-version>1.2.9</druid-version>
</properties>
<!--这个是用来进行jar包引入的
jar:就是别人写好的程序 我们直接可以用
-->
<dependencies>
<!--<dependency>-->
<!--<groupId>mysql</groupId>-->
<!--<artifactId>mysql-connector-java</artifactId>-->
<!--<version>${mysql-version}</version>-->
<!--</dependency>-->
<!--
<scope></scope> 这个jar包在什么时候有效
test:表示的是你这个包 只是在测试的时候 会有用 这个包 最终打包的时候是不会打包上去的
runtime:这个包只是在运行的时候 有效
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
<!--这里就表示的是 我们在导包的时候需要将这个包给排除 不导包-->
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-core -->
<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest -->
<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-core -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>com.alibaba</groupId>-->
<!--<artifactId>druid</artifactId>-->
<!--<version>${druid-version}</version>-->
<!--</dependency>-->
</dependencies>
<build>
<!--配置我们项目打包的这个名字-->
<finalName>xiaobobo</finalName>
</build>
<!--可以配置我们当前这个项目 去哪里下载包 以及如何将本地的这个包放到远程私有库-->
<distributionManagement>
<!--<repository>-->
<!--<id></id>-->
<!--<name></name>-->
<!--<url></url>-->
<!--</repository>-->
<!--<snapshotRepository>-->
<!--<url></url>-->
<!--<name></name>-->
<!--<id></id>-->
<!--</snapshotRepository>-->
</distributionManagement>
</project>