image.png

    image.png

    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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    5. <modelVersion>4.0.0</modelVersion>
    6. <groupId>org.example</groupId>
    7. <artifactId>web-demo</artifactId>
    8. <version>1.0-SNAPSHOT</version>
    9. <packaging>war</packaging>
    10. <properties>
    11. <maven.compiler.source>8</maven.compiler.source>
    12. <maven.compiler.target>8</maven.compiler.target>
    13. </properties>
    14. <build>
    15. <plugins>
    16. <!-- tomcat 插件 -->
    17. <plugin>
    18. <groupId>org.apache.tomcat.maven</groupId>
    19. <artifactId>tomcat7-maven-plugin</artifactId>
    20. <version>2.2</version>
    21. </plugin></plugins>
    22. </build>
    23. <dependencies>
    24. <dependency>
    25. <groupId>javax.servlet</groupId>
    26. <artifactId>javax.servlet-api</artifactId>
    27. <version>3.1.0</version>
    28. <scope>provided</scope> <!-- provided只在编译 和测试环境下有效,不在运行环境有效 -->
    29. </dependency>
    30. </dependencies>
    31. </project>

    image.png