Idea maven编译报错 javacTask: 源发行版 1.8 需要目标发行版 1.8

javacTask: 源发行版 1.8 需要目标发行版 1.8
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] An unknown compilation problem occurred
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.409 s
[INFO] Finished at: 2019-04-16T15:27:55+08:00
[INFO] Final Memory: 7M/20M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project scala-bi-server: Compilation failure
[ERROR] An unknown compilation problem occurred
[ERROR] -> [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/MojoFailureException

Process finished with exit code 1

在pom.xml 加入编译插件

	<plugins>
		<!--compiler插件-->
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.3</version>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
				<encoding>${file.encoding}</encoding>
			</configuration>
		</plugin>
	</plugins>

  

原文地址:https://www.cnblogs.com/rumengqiang/p/10717481.html

时间: 2024-10-02 16:08:31

Idea maven编译报错 javacTask: 源发行版 1.8 需要目标发行版 1.8的相关文章

Idea_编译报错 javacTask: 源发行版 1.6 需要目标发行版 1.6

在idea中编译时发生如下的错误 Information:Using javac 1.7.0_75 to compile java sources Information:java: javacTask: 源发行版 1.6 需要目标发行版 1.6 Information:java: Errors occurred while compiling module 'kulong' Information:15/3/26 13:22 - Compilation completed with 1 err

Idea 编译报错 javacTask

报错信息: Idea 编译报错 javacTask: 源发行版 1.6 需要目标发行版 1.6 解决方案:

maven编译报错 -source 1.5 中不支持 lambda 表达式(转)

原文链接:http://blog.csdn.net/kai161/article/details/50379418 在用maven编译项目是由于项目中用了jdk 1.8, 编译是报错  -source 1.5 中不支持 lambda 表达式,Google找到这篇解决方案,记录一下: 编译时报如下错误: [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [

maven编译报错 -source 1.5 中不支持 lambda(或diamond) 表达式,编码 UTF-8 的不可映射字符

在用maven编译项目是由于项目中用了jdk 1.8, 编译是报错  -source 1.5 中不支持 lambda 表达式. 错误原因: Maven Compiler 插件默认会加 -source 1.5 及 -target 1.5 参数来编译(估计是为了兼容一些比较老的 Linux 服务器操作系统,它们通常只有 JDK 5),而我们的代码里使用了 JDK 7/8 的语法. 解决方法: 1 <project> 2 [...] 3 <build> 4 [...] 5 <plu

新建的maven项目直接用maven编译报错

1.新建的maven项目直接编译的时候会报错: [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]

SpringBoot MAVEN编译报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:

参考了好几篇文章没搞定,直到查询错误关键字 An unknown compilation problem occurred 分别参考了以下博客: https://blog.csdn.net/fanrenxiang/article/details/80864908 https://blog.csdn.net/weixin_42167717/article/details/80377123 最后搞定的是这篇 https://my.oschina.net/u/170632/blog/857078 An

maven 编译报错 “找不到符号”

报错如下: E:\workspace\iccardcore\mis\src\main\java\com\hxsmart\sicard\core\webapp\action\process\DayEndProcessBean.java:[298,65] 找不到符号符号: 变量 autoTapeFile位置: 类 com.hxsmart.framework.webapp.util.Constant E:\workspace\iccardcore\mis\src\main\java\com\hxsma

maven编译报错 -source 1.7 中不支持 lambda 表达式

Maven项目编译失败: [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /opt/ihome/jenkins/jobs/dev-aladdin-order/workspace/aladdin-order-intf/src/main/java/com/ihomefnt/aladdin/common/utils/RemoteUtil.ja

maven 编译报错 java: -source 1.5 中不支持switch 中存在字符串

在pom里面加上 <build> <defaultGoal>compile</defaultGoal> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configurat