开发者社区> 问答> 正文

maven构建不成功导致编译失败?报错

在编译项目时出现BUILD FAILURE,报错如下:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project sakai-content-tool: Compilation failure......

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

......

jdk是1.7,mvn -v看到的版本是3.1.1,编译失败,请问专家这问题如何解决?

展开
收起
爱吃鱼的程序员 2020-06-22 11:51:29 796 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    在原来编译的命令行里加-e,重新编译下,看看详细的出错信息。成功了,谢谢.不过不知道为什么加了-e就编译成功了,以前总是有错误.    <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.1</version>
         <configuration>
          <source>1.6</source>
          <target>1.6</target>
         </configuration>

        </plugin>

    默认是1.6,改成1.7

    setting.xml中?pom.xml有道理,问题解决了,是我的两个java文件变动导致的,不过,非常感谢您!

    2020-06-22 11:51:46
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关镜像