zoukankan      html  css  js  c++  java
  • pom.xml文件指定jdk版本号

    <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>com.chinasofti</groupId>
        <!-- 工程名 -->
        <artifactId>web01</artifactId>
        <!-- 打包类型 -->
        <packaging>war</packaging>
        <!-- 版本 -->
        <version>0.0.1-SNAPSHOT</version>
        <name>web01 Maven Webapp</name>
        <url>http://maven.apache.org</url>
    
    
        <!-- 指定依赖jar -->
        <dependencies>
            <!-- junit单元测试 -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.10</version>
                <!-- test 仅测试时依赖该jar compile 编译期使用 -->
                <scope>test</scope>
            </dependency>
    
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.0.1</version>
                <scope>compile</scope>
            </dependency>
    
            <dependency>
                <groupId>com.chinasofti</groupId>
                <artifactId>commons</artifactId>
                <version>0.0.1-SNAPSHOT</version>
    
            </dependency>
        </dependencies>
        <build>
            <!-- finalName指定打包生成的文件名,默认为工程名-版本号 -->
            <finalName>web01</finalName>
    
            <plugins>
                <!-- 指定jdk版本 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <!-- 源码的编译器版本 -->
                        <source>1.8</source>
                        <!-- class的编译器版本 -->
                        <target>1.8</target>
                    </configuration>
                </plugin>
    
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <!-- 跳过测试 -->
                        <skip>true</skip>
                    </configuration>
                    <version>2.18.1</version>
                </plugin>
    
            </plugins>
        </build>
    </project>

    错误截图

     解决方法:

    再重新构建就没问题了!

  • 相关阅读:
    UVA 10564 Paths through the Hourglass DP
    HDU 3397 Sequence operation 线段树 成段更新 区间合并
    HDU 3308 LCIS 线段树 单点更新+区间合并
    POJ 3667 Hotel 线段树 区间合并
    UVALive 3942 Remember the Word Tire+DP
    POJ 1703 Find them, Catch them
    UVA 1366 Martian Mining DP
    UVA 1456 Cellular Network 贪心+DP
    UVA 11573 Ocean Currents
    【ACM】hdu_zs1_1003_放大的X _201307271557
  • 原文地址:https://www.cnblogs.com/fuyuteng/p/13677259.html
Copyright © 2011-2022 走看看