zoukankan      html  css  js  c++  java
  • Maven异常:Dynamic Web Module 3.0 requires Java 1.6 or newer.

    问题

    我目前用的JDK 是java 1.8 ,搭建Maven项目的时候,设置Project facets后,出现来以下problem : Dynamic Web Module 3.0 requires Java 1.6 or newer. 


    然后尝试如下方案依然没有效果:

    1. Go to project Build Path and change the Java Library version to 1.7
    2. Go to Eclipse Preferences -> Java -> Compilre -> Change compliance level to 1.7 

    3. Right click on project -> Properties -> Project Facets
    4. Uncheck Dynamic Web Module and click Apply (also uncheck JavaServer Faces if you had that)
    5. Change the Java facet version to 1.8 and click Apply
    6. Add the Dyanmic Web Module v3.0, apply.

    解决方案

    经过反复试验,可以通过以下途径解决:
    1.打开pom.xml
    2.加入以下插件
     <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
             <source>1.8</source> 
             <target>1.8</target> 
        </configuration>
    </plugin>
    3.右键点击项目->Maven->Update Project


    异常消失了


  • 相关阅读:
    IOS
    WAN
    在不同网段使用 VLAN 通信
    数据链路层
    GRE 协议
    路由协议 (1)
    隔离广播域的 VLAN 来了
    数据包的通信过程
    Webpack 原理浅析
    蒲公英 · JELLY技术周刊 Vol.16 谷歌首个线上 Web 开发者大会
  • 原文地址:https://www.cnblogs.com/evan-liang/p/9189631.html
Copyright © 2011-2022 走看看