Maven Install报错:Perhaps you are running on a JRE rather than a JDK?

英文描述:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project busiservice: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

中文描述:此环境中未提供编译器,你可能使用jre运行而不是jdk。
引发原因:Eclipse默认在jre上运行,maven install 编译需要jdk中的编译器,而jre中并没有

问题解决:

1,window>>preference>>java>>installJRes  添加jdk安装路径,并勾选

2,window>>preference>>java>>installJRes >>excutionEnvironments:选择当前用的Java版本,右边勾选刚添加的jdk。

原文地址:https://www.cnblogs.com/wjx6270/p/11617834.html

时间: 2024-11-06 07:13:00

Maven Install报错:Perhaps you are running on a JRE rather than a JDK?的相关文章

Maven install 报错: Failed to execute goalorg.apache.maven.plugins:maven-gpg-plugin:1.4:sign (sign-art

执行 Maven install 时报错: Failed to execute goalorg.apache.maven.plugins:maven-gpg-plugin:1.4:sign (sign-artifacts)on project openstack-java-sdk: Cannot obtain passphrase in batchmode -> [Help 1] 如下: [INFO] BUILD FAILURE[INFO]----------------------------

解决maven install报错信息(Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile )

Maven install失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project autotest_fchtgl: Compilation failure[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE r

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

项目运行环境:jdk1.8+tomcat8 maven install 时报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1 造成此错误的原因也比较多,下面分2种情况: 情况1(常见):你可能编译在一个JRE而不是JDK上,maven 编译是要JDK的,即你的编译器配置了一个jre路径,需要换成jdk. 操作:window→preference→java→Installed JREs 点add添

使用myeclipse自带的maven创建新项目,直接执行maven install报错

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test) on project TestWidget: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test failed: Unable to load the mojo 'test' in 

maven install 报错Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 解决方法: 删除maven库

mavne install 报错org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException

maven install 报错 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: nulljava.lang.reflect.InvocationTargetException at sun.reflect.

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? idea maven 打包报错问题解决

mvn clean install -X -Dmaven.test.skip=true -P dev 打包报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? idea,项目,maven 也设置了统一的jdk,还是报错, 解决方法1:在maven的setting.xml 文件 <profiles> 标签中加入指定JDK的版本, <profile

mvn install 报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2 错误: 找不到符号

报错信息 在Eclipse中执行mvn install时,console端显示如下报错信息: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ERP: Compilation failure: Compilation failure: [ERROR] \test01\src\main\java\HStyl

【maven】Maven插件篇 --- maven项目 mvn install 报错: Failed to execute goal on project 项目名: Could not resolve dependencies for project

参考:Maven实用技巧 https://msd.misuland.com/pd/3255817963235707346 报错: maven项目 mvn install 报错: [ERROR] Failed to execute goal on project 项目名XXX: Could not resolve dependencies for project com.项目名XXX:war:1.0.0-SNAPSHOT: Failure to find 项目名1XXX:jar:0.1.0-SNA