gpt4 book ai didi

java - Spring 工具套件中的 maven-compiler-plugin :3. 7.0:compile (default-compile)

转载 作者:行者123 更新时间:2023-12-02 02:13:07 48 4
gpt4 key购买 nike

I have added the plugin in pom.xml as shown in snap for jdk1.8 and maven-compiler-plugin version 3.7.0

当我通过右键单击项目名称进行 Maven 安装时,出现以下错误:

    [INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.userlogin.example:SpringMvcUser:war:0.1
[WARNING] 'dependencies.dependency.systemPath' for com.github.noraui:ojdbc8:jar should not point at files within the project directory, ${project.basedir}\lib\ojdbc8.jar will be unresolvable by dependent projects @ line 82, column 16
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpringMvcUser Maven Webapp 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SpringMvcUser ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ SpringMvcUser ---
[INFO] Compiling 7 source files to F:\workspace-sts-3.9.2.RELEASE\SpringMvcUser\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error reading C:\Users\Chandan\.m2\repository\javax\servlet\javax.servlet-api\3.0.1\javax.servlet-api-3.0.1.jar; invalid CEN header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-core\4.3.2.RELEASE\spring-core-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-beans\4.3.2.RELEASE\spring-beans-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-context\4.3.2.RELEASE\spring-context-4.3.2.RELEASE.jar; invalid CEN header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-aop\4.3.2.RELEASE\spring-aop-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-expression\4.3.2.RELEASE\spring-expression-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-jdbc\4.3.2.RELEASE\spring-jdbc-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-tx\4.3.2.RELEASE\spring-tx-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/RegistrationController.java:[12,29] package jbr.springmvc.service does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/RegistrationController.java:[17,16] cannot find symbol
symbol: class UserService
location: class com.userlogin.controller.RegistrationController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[11,27] package jbr.springmvc.model does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[12,27] package jbr.springmvc.model does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[13,29] package jbr.springmvc.service does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[18,9] cannot find symbol
symbol: class UserService
location: class com.userlogin.controller.LoginController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[29,50] cannot find symbol
symbol: class Login
location: class com.userlogin.controller.LoginController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[23,44] cannot find symbol
symbol: class Login
location: class com.userlogin.controller.LoginController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[31,17] cannot find symbol
symbol: class User
location: class com.userlogin.controller.LoginController
[INFO] 17 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.794 s
[INFO] Finished at: 2018-04-05T21:29:15+05:30
[INFO] Final Memory: 15M/179M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project SpringMvcUser: Compilation failure: Compilation failure:
[ERROR] error reading C:\Users\Chandan\.m2\repository\javax\servlet\javax.servlet-api\3.0.1\javax.servlet-api-3.0.1.jar; invalid CEN header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-core\4.3.2.RELEASE\spring-core-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-beans\4.3.2.RELEASE\spring-beans-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-context\4.3.2.RELEASE\spring-context-4.3.2.RELEASE.jar; invalid CEN header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-aop\4.3.2.RELEASE\spring-aop-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-expression\4.3.2.RELEASE\spring-expression-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-jdbc\4.3.2.RELEASE\spring-jdbc-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Chandan\.m2\repository\org\springframework\spring-tx\4.3.2.RELEASE\spring-tx-4.3.2.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/RegistrationController.java:[12,29] package jbr.springmvc.service does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/RegistrationController.java:[17,16] cannot find symbol
[ERROR] symbol: class UserService
[ERROR] location: class com.userlogin.controller.RegistrationController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[11,27] package jbr.springmvc.model does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[12,27] package jbr.springmvc.model does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[13,29] package jbr.springmvc.service does not exist
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[18,9] cannot find symbol
[ERROR] symbol: class UserService
[ERROR] location: class com.userlogin.controller.LoginController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[29,50] cannot find symbol
[ERROR] symbol: class Login
[ERROR] location: class com.userlogin.controller.LoginController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[23,44] cannot find symbol
[ERROR] symbol: class Login
[ERROR] location: class com.userlogin.controller.LoginController
[ERROR] /F:/workspace-sts-3.9.2.RELEASE/SpringMvcUser/src/main/java/com/userlogin/controller/LoginController.java:[31,17] cannot find symbol
[ERROR] symbol: class User
[ERROR] location: class com.userlogin.controller.LoginController
[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

我尝试过链接Maven compiler plugin always detecting a set of sources as "stale"

http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 还有许多其他链接,但我没有从上面的链接中得到任何解决方案,并且仍然收到错误,请帮助解决此问题

最佳答案

本地 Maven 存储库中的 JAR 文件似乎已损坏。删除本地 Maven 存储库 (~/.m2/repository) 并从命令行运行干净的构建。这应该可以解决问题。

关于java - Spring 工具套件中的 maven-compiler-plugin :3. 7.0:compile (default-compile),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49677471/

48 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com