Search code examples
javaspring-bootapache-camelspring-camel

camel-spring-boot-starter: org.apache.camel or org.apache.camel.springboot groupId?


According to Camel Context starter one can use these:

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-spring-boot</artifactId>
    <version>${camel.version}</version> <!-- use the same version as your Camel core version -->
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-spring-boot-starter</artifactId>
    <version>${camel.version}</version> <!-- use the same version as your Camel core version -->
</dependency>

Seems to be no mistake, the artefacts exist in maven too:
Camel SB Core Starters :: Spring Boot Starter
Spring Boot Starter :: Camel :: Spring Boot

Should one use both (in same project) or only one?
Otherwise when to use one and when another and why?


Solution

  • If you check out Maven Central for both starter definition you will see that the <groupId>org.apache.camel</groupId> is used prior to Camel 3 while <groupId>org.apache.camel.springboot</groupId> is used since Camel 3 and onwards.

    As such, depending on your Camel version you use, you either should use <groupId>org.apache.camel</groupId> in case you are stuck with Camel 2.x or <groupId>org.apache.camel.springboot</groupId> for Camel 3.x+