从 Atlassian Bamboo 构建时的 Maven 问题



我是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

问候

圭多·范·布拉克尔

由于编译错误,生成失败。 假设您做了如下操作:

mvn clean install

这意味着Maven经历了所有的生命周期阶段进行编译,但在编译中遇到了编译错误(通过编译插件(。 https://maven.apache.org/components/ref/3.5.0/maven-core/lifecycles.html

在这种情况下,我要做的第一件事是检查它所在的任何存储库中的代码并尝试"全新安装"它。

如果开发人员没有签入新文件/更新,则可能会发生这种情况。

您的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

似乎在类OldCarValueMapperOldCarValueServiceCustomImpl中找不到包nl.confidential2.web.client.model中的类VweCarExtraInruil

通常的原因:

  • nl.confidential2.web.client.model.VweCarExtraInruil属于另一个依赖项,该依赖项在 Maven 存储库中不可用。
  • nl.confidential2.web.client.model.VweCarExtraInruil属于不属于构建的模块。

解决 方案:

  • 如果是依赖项问题,请确保 Maven 存储库中提供了正确的依赖项。
  • 如果是模块问题,请确保在pom.xml中正确定义模块

相关内容

  • 没有找到相关文章

最新更新