我是Maven的新手,我正在尝试使用Bamboo使用Maven构建一些软件,但无法工作,这里有谁能提供帮助?请参阅下面的错误日志
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/mapper/OldCarValueMapper.java:[5,35] cannot find symbol
build 28-Aug-2018 15:02:25 symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 location: package nl.confidential2.web.client.model
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/mapper/OldCarValueMapper.java:[31,54] cannot find symbol
build 28-Aug-2018 15:02:25 symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 location: interface com.confidential1.confidential2.service.mapper.OldCarValueMapper
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/custom/impl/OldCarValueServiceCustomImpl.java:[11,35] cannot find symbol
build 28-Aug-2018 15:02:25 symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 location: package nl.confidential2.web.client.model
build 28-Aug-2018 15:02:25 [ERROR] Encountered erroneous type VweCarExtraInruil
build 28-Aug-2018 15:02:25 [INFO] 4 errors
build 28-Aug-2018 15:02:25 [INFO] -------------------------------------------------------------
build 28-Aug-2018 15:02:25 [INFO] ------------------------------------------------------------------------
build 28-Aug-2018 15:02:25 [INFO] BUILD FAILURE
build 28-Aug-2018 15:02:25 [INFO] ------------------------------------------------------------------------
build 28-Aug-2018 15:02:25 [INFO] Total time: 01:31 min
build 28-Aug-2018 15:02:25 [INFO] Finished at: 2018-08-28T15:02:25+02:00
build 28-Aug-2018 15:02:25 [INFO] Final Memory: 55M/528M
build 28-Aug-2018 15:02:25 [INFO] ------------------------------------------------------------------------
build 28-Aug-2018 15:02:25 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project confidential2services: Compilation failure: Compilation failure:
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/mapper/OldCarValueMapper.java:[5,35] cannot find symbol
build 28-Aug-2018 15:02:25 [ERROR] symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 [ERROR] location: package nl.confidential2.web.client.model
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/mapper/OldCarValueMapper.java:[31,54] cannot find symbol
build 28-Aug-2018 15:02:25 [ERROR] symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 [ERROR] location: interface com.confidential1.confidential2.service.mapper.OldCarValueMapper
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/custom/impl/OldCarValueServiceCustomImpl.java:[11,35] cannot find symbol
build 28-Aug-2018 15:02:25 [ERROR] symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 [ERROR] location: package nl.confidential2.web.client.model
build 28-Aug-2018 15:02:25 [ERROR] Encountered erroneous type VweCarExtraInruil
build 28-Aug-2018 15:02:25 [ERROR] -> [Help 1]
build 28-Aug-2018 15:02:25 [ERROR]
build 28-Aug-2018 15:02:25 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
build 28-Aug-2018 15:02:25 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
build 28-Aug-2018 15:02:25 [ERROR]
build 28-Aug-2018 15:02:25 [ERROR] For more information about the errors and possible solutions, please read the following articles:
build 28-Aug-2018 15:02:25 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
此致
Guido van Brakel
答案 0 :(得分:0)
由于编译错误,构建失败。假设您做了类似的事情:
mvn clean install
这意味着Maven经历了所有生命周期阶段的编译工作,但是在编译过程中(通过compile插件)出现了编译错误。 https://maven.apache.org/components/ref/3.5.0/maven-core/lifecycles.html
在这种情况下,我要做的第一件事是从其中的任何回购中检查代码,然后尝试对其进行“全新安装”。
如果开发人员未签入新文件/更新,则可能会发生这种情况。
答案 1 :(得分:0)
您的Maven版本显示编译错误:
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/mapper/OldCarValueMapper.java:[5,35] cannot find symbol
build 28-Aug-2018 15:02:25 [ERROR] symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 [ERROR] location: package nl.confidential2.web.client.model
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/mapper/OldCarValueMapper.java:[31,54] cannot find symbol
build 28-Aug-2018 15:02:25 [ERROR] symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 [ERROR] location: interface com.confidential1.confidential2.service.mapper.OldCarValueMapper
build 28-Aug-2018 15:02:25 [ERROR] /D:/Bamboo-home/xml-data/build-dir/RS-RSR-JOB1/src/main/java/com/confidential1/confidential2/service/custom/impl/OldCarValueServiceCustomImpl.java:[11,35] cannot find symbol
build 28-Aug-2018 15:02:25 [ERROR] symbol: class VweCarExtraInruil
build 28-Aug-2018 15:02:25 [ERROR] location: package nl.confidential2.web.client.model
build 28-Aug-2018 15:02:25 [ERROR] Encountered erroneous type VweCarExtraInruil
似乎在类VweCarExtraInruil
和nl.confidential2.web.client.model
中找不到包OldCarValueMapper
中的类OldCarValueServiceCustomImpl
。
常见原因:
nl.confidential2.web.client.model.VweCarExtraInruil
属于另一个依赖关系,在Maven存储库中不可用。nl.confidential2.web.client.model.VweCarExtraInruil
属于一个模块,该模块不是构建的一部分。解决方案:
pom.xml
中正确定义了模块