[英]Spring boot auto-config fails on maven build with Camel 2.19
I'm building a Java Camel project using Maven 3.3.9 and Camel 2.19.5, everything compiles, but on validation Maven fails with the error below. 我正在使用Maven 3.3.9和Camel 2.19.5构建Java Camel项目,所有内容均可编译,但在验证时Maven失败,并出现以下错误。 Looks like Spring boot is trying to auto-configure something. 看起来Spring Boot正在尝试自动配置某些内容。 The project is not a typical Springboot app, it's a custom Maven plugin that happens to depend on Camel. 该项目不是典型的Springboot应用程序,而是一个自定义的Maven插件,恰好依赖于Camel。 My suspicion is Maven's expecting to find main() in the code but it does not exist since the project has no runnable main(). 我怀疑Maven希望在代码中找到main(),但是由于项目没有可运行的main(),所以它不存在。 Anyway, that's what I think, it's a nasty issue I'll tell ya that. 无论如何,这就是我的想法,我会告诉你这是一个令人讨厌的问题。
[INFO] BUILD FAILURE
[INFO] ----------------------------------------------------
[INFO] Total time: 10.344 s
[INFO] Finished at: 2018-06-22T16:13:41-04:00
[INFO] Final Memory: 39M/622M
[INFO] ----------------------------------------------------
[ERROR] Failed to execute goal
org.apache.camel:camel-package-maven-plugin:2.19.5:
prepare-spring-boot-auto-configuration
(validate) on project ofi-salesforce-maven-plugin:
Execution validate of goal org.apache.camel:camel-package-maven-plugin:2.19.5:
prepare-spring-boot-auto-configuration
failed: Cannot find Apache Camel project root directory
Figured it out; 弄清楚了; the code was previously using Camel 2.15.1, but after upgrading to Camel 2.19.1 we failed to consider Maven build changes. 该代码以前使用的是Camel 2.15.1,但是在升级到Camel 2.19.1之后,我们未能考虑Maven构建更改。 Since our code is branched from Camel Salesforce Maven plugin, the pom for that project now includes camel-package-maven-plugin , which we failed to include in our pom. 由于我们的代码是从Camel Salesforce Maven插件分支而来的,因此该项目的pom现在包括camel-package-maven-plugin ,但我们未能将其包含在pom中。 The plugin skips validation phase, and that's where the error was happening, makes sense. 该插件跳过了验证阶段,那就是发生错误的地方了。
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-package-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare</id>
<phase>none</phase>
</execution>
<execution>
<id>validate</id>
<phase>none</phase>
</execution>
<execution>
<id>readme</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.