在项目的pom.xml中加入:

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration><verbose>true</verbose><fork>true</fork><executable>${JAVA8_HOME}/bin/javac</executable></configuration></plugin></plugins>
</build>

然后去修改C:\Users\Administrator\.m2中的settings.xml文件(如果项目配置了maven的settings.xml,则去改maven的)

<profiles> <profile><id>custom1-compiler</id><properties> <JAVA8_HOME>D:\Java\jdk1.8.0_161</JAVA8_HOME> </properties></profile>
</profiles> //激活上面的配置 和上面的ID对应,就是激活对应的配置<activeProfiles><activeProfile>custom1-compiler</activeProfile><activeProfile>custom-compiler</activeProfile>
</activeProfiles>

maven编译报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile相关推荐

  1. maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle

    问题记录: maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle 解决办法: 这个 ...

  2. maven打包报错 Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar

    Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar (default-jar) on project ...

  3. 淘淘商城项目报错 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-

    @[TOC](淘淘商城项目报错 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (d ...

  4. maven package 时报错 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test

    之前启动springboot的项目,报错:Failed to determine suitable jdbc url 但是本地配置文件也配置着spring.datasource.url,目录也没错,想 ...

  5. mvn help:effective-pom 报错 Failed to execute goal org.apache.maven.plugins

    报错内容 Failed to execute goal org.apache.maven.plugins:maven-help-plugin:2.2:effective-pom (default-cl ...

  6. [雷]单元测试报错--Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test

    项目场景: SpringBoot集成Mybatis-Plus时,进行单元测试时报错 问题描述: package com.mybatisplusstudty.mapper;import org.juni ...

  7. Maven搭建webapp报错Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generat

    在使用maven模板搭建webapp项目时,项目搭建失败 报错如下: 这里显示搭建项目的脚手架和插件等未找到 解决办法: 我们找到自己的maven的仓库,找到搭建webapp的xml文件,我的mave ...

  8. maven项目打包报错Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default

    原因:缺少maven打包插件 解决办法:在pom.xml中加入如下 <build><plugins><plugin><groupId>org.apach ...

  9. SpringBoot打包报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile

    maven的setting文件内容这块修改成自己使用的JDK版本

最新文章

  1. 关于我对c#的一些看法
  2. Eclipse利用Maven2搭建SpringMVC框架的Web工程
  3. JS 字符串编码函数(解决URL特殊字符传递问题):escape()、encodeURI()、encodeURIComponent()区别详解...
  4. 阿里巴巴集团的几十款著名开源项目(Java)
  5. 利用jsonp、iframe和location.hash解决跨域问题
  6. linux目录硬链接,linux查看硬链接对应的所有文件
  7. More Effective C++ 笔记
  8. eigen3.3.8帮助文档下载 chm_惠普7500A驱动下载-惠普hp 7500A打印机驱动下载 v28.8官方版...
  9. 各厂家服务器存储默认登录信息
  10. Python代码编辑器jupyter的安装
  11. ipad浏览器安装java_360浏览器苹果平板下载
  12. mysql awr报告怎么看,OracleAWR报告查看分析
  13. Mineros 远程登录,外网登录,解决无法在家控制机器的问题
  14. 技术管理之巅-如何从零打造高质效互联网技术团队?
  15. linux重置ilo,重启HPE管理芯片ILO5的5种方法(Reset ilo)
  16. springboot从ftp读取图片且根据不同的content_type在前端直接展示
  17. DRGs SQL数据库查询城镇职工医保定点医疗机构药占比
  18. ESP32-PICO-D4的串口使用
  19. 深度中国——课后随感
  20. 安卓代替系统默认电话应用

热门文章

  1. Mac下录屏软件、压缩、格式转换
  2. Java中数组赋值的三种方式
  3. 【无人机 学习笔记 5】天线之全向天线与定向天线工作原理
  4. web前端开发必备基础单词整理
  5. Dialog常用对话框
  6. 与非门和或门实现异或门
  7. 基于flask+vue前后端分离 一款简单的旅游网站源码,带admin管理系统
  8. GRE词汇分类之病类词汇
  9. td内容过长,其他显示省略号
  10. npm下载量破 3.94亿次,Bootstrap 发布十周年