欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Faild to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)

程序员文章站 2024-02-19 22:33:28
...

maven构建异常问题

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project myhibernate3
[ERROR] /E:/myWorkplace/SSH1/src/main/java/com/iflytek/util/Page.java:[1,1] 非法字符: '\ufeff'
[ERROR] /E:/myWorkplace/SSH1/src/main/java/com/iflytek/util/Page.java:[1,10] 需要class, interfaceenum
[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.

首先检查jdk版本问题,没问题的话 再 右键点击 项目–>Properties–>查看libraries
Faild to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
再查看是否添加了maven依赖,Order and Export
Faild to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)

勾上之后 右键点击项目 –>Build Project (至关重要的一步) 就可以解决问题了

这个问题只能怪自己手贱 把 eclipse 的 Project–>build Automatically给 关闭,勾选了 就不会出先这种问题……