pom.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>com.sf</groupId>
  7. <artifactId>tomcat-demo</artifactId>
  8. <version>1.0-SNAPSHOT</version>
  9. <name>tomcat-demo</name>
  10. <!-- 这里是打包成war 其他项目类型中还有jar -->
  11. <packaging>war</packaging>
  12. <properties>
  13. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  14. <maven.compiler.target>17</maven.compiler.target>
  15. <maven.compiler.source>17</maven.compiler.source>
  16. <junit.version>5.10.2</junit.version>
  17. </properties>
  18. <dependencies>
  19. <dependency>
  20. <groupId>jakarta.servlet</groupId>
  21. <artifactId>jakarta.servlet-api</artifactId>
  22. <version>5.0.0</version>
  23. <scope>provided</scope>
  24. </dependency>
  25. <dependency>
  26. <groupId>mysql</groupId>
  27. <artifactId>mysql-connector-java</artifactId>
  28. <!-- 如果mysql5.0版本 使用5.1.49 -->
  29. <version>8.0.33</version>
  30. </dependency>
  31. <dependency>
  32. <groupId>org.junit.jupiter</groupId>
  33. <artifactId>junit-jupiter-api</artifactId>
  34. <version>${junit.version}</version>
  35. <scope>test</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.junit.jupiter</groupId>
  39. <artifactId>junit-jupiter-engine</artifactId>
  40. <version>${junit.version}</version>
  41. <scope>test</scope>
  42. </dependency>
  43. </dependencies>
  44. <build>
  45. <plugins>
  46. <plugin>
  47. <groupId>org.apache.maven.plugins</groupId>
  48. <artifactId>maven-war-plugin</artifactId>
  49. <version>3.4.0</version>
  50. </plugin>
  51. </plugins>
  52. </build>
  53. </project>