无法执行目标org.apache.maven.plugins(spring框架依赖项)

时间:2017-03-24 10:22:11

标签: java maven spring-mvc intellij-idea spring-boot

我今天早上打开了IntelliJ,看到了这一点。没有对代码进行任何更改。我删除了我的本地.m2存储库并重新下载了所有依赖项。我仍然遇到同样的问题。为什么我的基本弹簧库没有被导入?

enter image description here

错误:

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 17 source files to C:\Users\martin\Documents\Web Projects\home.office\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/UserController.java:[45,45] incompatible types: java.util.Optional<geo.app.entity.Users> cannot be converted to geo.app.entity.Users
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[139,54] incompatible types: java.util.Optional<geo.app.entity.RequestDO> cannot be converted to geo.app.entity.RequestDO
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[140,49] incompatible types: java.util.Optional<geo.app.entity.Users> cannot be converted to geo.app.entity.Users
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[155,54] incompatible types: java.util.Optional<geo.app.entity.RequestDO> cannot be converted to geo.app.entity.RequestDO
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[157,49] incompatible types: java.util.Optional<geo.app.entity.Users> cannot be converted to geo.app.entity.Users
[INFO] 5 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:43 min
[INFO] Finished at: 2017-03-24T11:12:29+01:00
[INFO] Final Memory: 36M/255M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project demo: Compilation failure: Compilation failure:
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/UserController.java:[45,45] incompatible types: java.util.Optional<geo.app.entity.Users> cannot be converted to geo.app.entity.Users
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[139,54] incompatible types: java.util.Optional<geo.app.entity.RequestDO> cannot be converted to geo.app.entity.RequestDO
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[140,49] incompatible types: java.util.Optional<geo.app.entity.Users> cannot be converted to geo.app.entity.Users
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[155,54] incompatible types: java.util.Optional<geo.app.entity.RequestDO> cannot be converted to geo.app.entity.RequestDO
[ERROR] /C:/Users/martin/Documents/Web Projects/home.office/src/main/java/geo/app/controller/RequestController.java:[157,49] incompatible types: java.util.Optional<geo.app.entity.Users> cannot be converted to geo.app.entity.Users
[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

0 个答案:

没有答案