zxy0307's picture
Upload 3493 files
08aee07 verified
Raw History Blame Contribute Delete
2.1 kB
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- 当前项目的坐标 -->
<groupId>org.example</groupId>
<artifactId>Maven_project</artifactId>
<!--
打包方式:
1、jar: java项目。默认值
2、war: web项目。
3、pom:
-->
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven_project Maven Webapp</name>
<url>http://maven.apache.org</url>
<!-- 导入jar包 -->
<dependencies>
<!-- 测试jar包 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- 添加servlet的依赖jar包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- 添加JDBC的插件 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.32</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<!-- 添加插件 -->
<build>
<plugins>
<!-- 编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<target>11</target>
<source>11</source>
</configuration>
</plugin>
<!-- tomcat插件 启动web应用 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<!-- 修改tomcat的端口号 -->
<port>80</port>
<!-- 修改当前项目的虚拟目录 -->
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
</project>