Camel Developer Console

Camel Maven Archetypes

qianmoQqianmoQ· 更新于 2026-09-22· 阅读 6 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

Camel Maven Archetypes

Camel is distributed with the following archetypes for Maven end users.

Archetype Supported

ArchetypeDescription
camel-archetype-api-componentThis archetype is used for creating a new Maven project for Camel Components. Use this if there is an API component missing in Camel that you want to create yourself.
camel-archetype-componentThis archetype is used for creating a new Maven project for Camel Components. Use this if there is a component missing in Camel that you want to create yourself.
camel-archetype-dataformatThis archetype is used for creating a new Maven project for Camel Data Formats. Use this if there is a data format missing in Camel that you want to create yourself.
camel-archetype-javaThis archetype is used to create a new Maven project for Camel routes using Java DSL.
camel-archetype-mainThis archetype is used to create a new Maven project for Camel routes running Camel standalone (camel-main).
camel-archetype-spring-bootThis archetype is used to create a new Maven project for Camel routes using Spring Boot.

The maven coordinates for these archetypes is the following:

<dependency>
  <groupId>org.apache.camel.archetypes</groupId>
  <artifactId>${archetype-name}</artifactId>
  <version>${camel-version}</version>
</dependency>

Snapshot Archetypes

If you would like to use an archetype from an unreleased version of Camel, you just need to let the maven-archetype-plugin know where to look for it. For example, say someone wanted to create a Java based project based on Camel 4.23.0-SNAPSHOT. He’d need to use the following command

mvn archetype:generate \
  -DarchetypeGroupId=org.apache.camel.archetypes \
  -DarchetypeArtifactId=camel-archetype-java \
  -DarchetypeVersion=4.23.0-SNAPSHOT

When the project is created, you may need to add another repository to the pom.xml file. This is to load a SNAPSHOT version of the camel-maven-plugin

<pluginRepositories>
  <pluginRepository>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots/>
    <id>Apache Snapshot Repository</id>
    <url>http://repository.apache.org/snapshots</url>
  </pluginRepository>
</pluginRepositories>

评论

登录后参与评论

正在加载评论…