Maven ,java web 简单依赖和Servlet 3.0 web.xml配置

web.xml 文件配置



<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0">

web-app>

Maven 简单依赖

JDK使用1.7版本


<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.0modelVersion>

    <groupId>com.*groupId>
    <artifactId>ManagementSystemartifactId>
    <version>1.0-SNAPSHOTversion>

    <packaging>warpackaging>

    <properties>
        <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
    properties>

    <dependencies>
    
    <dependency>
        <groupId>javax.servletgroupId>
        <artifactId>javax.servlet-apiartifactId>
        <version>3.1.0version>
        <scope>providedscope>
    dependency>
    
    <dependency>
        <groupId>javax.servlet.jspgroupId>
        <artifactId>jsp-apiartifactId>
        <version>2.2version>
        <scope>providedscope>
    dependency>
    
    <dependency>
        <groupId>javax.servletgroupId>
        <artifactId>jstlartifactId>
        <version>1.2version>
        <scope>runtimescope>
    dependency>
    dependencies>

    <build>

    <plugins>

        
        <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-surefire-pluginartifactId>
            <version>2.18.1version>
            <configuration>
                <skipTests>trueskipTests>
            configuration>
        plugin>

    
    <plugin>
        <groupId> org.apache.maven.plugins groupId>
        <artifactId> maven-compiler-plugin artifactId>
        <version> 3.3 version>
        <configuration>
            <source> 1.7 source>
            <target> 1.7 target>
        configuration>
    plugin>

    plugins>
    build>
project>

你可能感兴趣的:(Maven)