简体   繁体   English

在使用Camel 2.19的Maven构建中,Spring Boot自动配置失败

[英]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.

相关问题 春季启动自动配置:在daoimpl类中,数据源未自动装配,但在contoller中自动装配时,则正常工作 - Spring-boot Auto-config: DataSource not getting autowired in daoimpl class, but works properly when autowired in contoller spring-config中的auto-config = true有什么用? - what is the use of auto-config=true in spring security 我可以用吗 <http:auto-config=true> 和 <UsernamePasswordAuthenticationFilter> 在春季安全的同时 - can i use <http:auto-config=true> and <UsernamePasswordAuthenticationFilter> at the same time in spring security 定义 DataSource bean 是否会自动停止 spring 自动配置,即使数据源未使用 @Primary 注释? - Does defining a DataSource bean automatically stop spring auto-config, even if the data source is not annotated with @Primary? 如果Spring Boot 2中不存在mongodb服务器,Maven构建会失败吗? - Maven build fails if mongodb server is not present with spring boot 2? Maven全新安装构建失败:Spring Boot- MVC,JPA - Maven Clean Install build fails: Spring Boot- MVC, JPA Spring Boot和Camel Mail SSL配置 - Spring Boot and Camel Mail SSL config 将Custom AuthenticationProcessingFilter与 <form-login> (自动配置=“ true”) - Using Custom AuthenticationProcessingFilter with <form-login> (auto-config=“true”) Spring Boot-Maven构建错误 - Spring Boot - Maven build error Spring 启动 - Maven - 构建失败 - Spring boot - Maven - BUILD FAILURE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM