1. 程式人生 > >maven pom.xml基本設置

maven pom.xml基本設置

fin pen tid show ID fig 依賴 jar ati

<dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>

        <!-- 允許創建jsp頁面 -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        
        <!-- 導入springmvc依賴的jar包 -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>5.0.6.RELEASE</version>
        </dependency>
        
    </dependencies>
    <build>
        <finalName>SpringMVC_Maven</finalName>
        <plugins>
            <!--設置編譯的JDK版本 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                    <showWarnings>true
</showWarnings> </configuration> </plugin> </plugins> </build>

maven pom.xml基本設置