zoukankan      html  css  js  c++  java
  • maven 启动 报错 Fatal error compiling: 无效的目标发行版

    http://news.tuxi.com.cn/news/119999990123162/31622105.html

    http://lyking2001.iteye.com/blog/837440

    针对Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1的解决方案

    http://blog.csdn.net/u011734144/article/details/51894942

    ********************************************************************

     ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project nutzbook: Fatal error compiling: 无效的目标发行版: 1.8 -> [Help 1]

    [ERROR]

    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

    [ERROR] Re-run Maven using the -X switch to enable full debug logging.

    [ERROR]

    [ERROR] For more information about the errors and possible solutions, please read the following articles:

    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Fatal error compiling: 无效的目 标发行版 jdk环境和mvn配置的jdk不一样

    ************************************

    方式1、修改maven全局jdk

        

        修改 安装目录maven2confsettings.xml

    Xml代码  收藏代码
    1. <profiles>     
    2.       <profile>       
    3.            <id>jdk-1.6</id>       
    4.            <activation>       
    5.                <activeByDefault>true</activeByDefault>       
    6.                <jdk>1.6</jdk>       
    7.            </activation>       
    8.            <properties>       
    9.                <maven.compiler.source>1.6</maven.compiler.source>       
    10.                <maven.compiler.target>1.6</maven.compiler.target>       
    11.                <maven.compiler.compilerVersion>1.6</maven.compiler.compilerVersion>       
    12.            </properties>       
    13.    </profile>      
    14. </profiles>    

    方式2、修改项目pom.xml

    Xml代码  收藏代码
      1. <build>  
      2.     <plugins>  
      3.         <plugin>  
      4.             <groupId>org.apache.maven.plugins</groupId>  
      5.             <artifactId>maven-compiler-plugin</artifactId>  
      6.             <version>2.0.2</version>  
      7.             <configuration>  
      8.                 <source>1.6</source>  
      9.                 <target>1.6</target>  
      10.             </configuration>  
      11.         </plugin>  
      12.     </plugins>  
      13. </build
  • 相关阅读:
    更改discuz!3.4注册后用户所在用户组
    APACHE服务器500错误解决方法
    有关redis笔记
    真正免费!!!爱客追剧神器【珍藏】
    discuz 论坛如何设置一个邀请码重复使用不过期,真正管理员专用
    discuz3.4设置会员免回复查看隐藏帖
    BigDecimal的用法详解(保留两位小数,四舍五入,数字格式化,科学计数法转数字,数字里的逗号处理)
    tinyproxy轻量代理服务器安装
    人物-企业家-实业家、发明家:松下幸之助
    图书-励志:《你的梦想一定能实现》
  • 原文地址:https://www.cnblogs.com/zhao1949/p/6180155.html
Copyright © 2011-2022 走看看