Guidelines for AI agents contributing examples to apache/camel-spring-boot-examples.
This repository contains runnable Maven examples that demonstrate Apache Camel on Spring Boot. Each example is an independent Spring Boot application wired as a Maven module of the aggregator build.
These guidelines complement the canonical, org-wide rules in the main
apache/camel AGENTS.md.
Read that file for the full Rules of Engagement; the section below repeats the
essentials and adds what is specific to this examples repository.
- Build: Maven 3.9+ (use the provided
./mvnwwrapper) - Java: 21 (set by
javaVersionin the rootpom.xml) - Parent:
org.apache.camel.springboot.example:examples(e.g.4.22.0-SNAPSHOTonmain); pullscamel-spring-boot-bom - Tests: JUnit Jupiter via
@CamelSpringBootTest(camel-test-spring-junit6) - JIRA project:
CAMEL(https://issues.apache.org/jira/projects/CAMEL)
- Attribution: every AI-generated PR description, review or JIRA comment MUST
identify itself as AI-generated and name the human operator, e.g.
_Claude Code on behalf of [Human Name]_. - JIRA ownership: only pick Unassigned tickets. Before starting, assign
the ticket to your operator and transition it to In Progress. Set
fixVersionsbefore closing. - One example per PR, kept small and self-contained. Do not exceed 10 PRs per day per operator. Quality over quantity.
- Branch from your own fork (not apache/), with a descriptive name containing
the topic and JIRA id (e.g.
CAMEL-12345-rest-openapi-example). Delete the branch after merge/close. Never push to a branch you did not create. - Green CI is required:
./mvnw clean installand./mvnw testmust pass. - Tests, docs and license headers are required on every contribution.
- Never merge without at least one human approval; never approve your own PR.
- One example per top-level directory, registered as a
<module>in the rootpom.xml. A new example is not built until it is listed there. - Examples are grouped by category via the
<category>property in each module'spom.xml(e.g.Beginner,Messaging,Cloud,REST,AI).
<example>/
├── pom.xml # parent = examples; artifactId camel-example-spring-boot-<name>
├── README.adoc # AsciiDoc docs incl. "how to run"
└── src/
├── main/java/... # <Name>Application.java (@SpringBootApplication)
│ # <Name>Router.java (@Component extends RouteBuilder)
├── main/resources/
│ └── application.properties # Spring + Camel config (ASF header)
└── test/java/... # <Name>Test (@CamelSpringBootTest @SpringBootTest)
- Use Spring Boot starters (
camel-<component>-starter), never rawcamel-coredependencies; versions come fromcamel-spring-boot-bom. - Routes are auto-discovered: annotate the
RouteBuilderwith@Component.
# one-time, from the repo root (resolves parent + shared config)
./mvnw clean install -DskipTests
# run a single example
cd <example>
../mvnw spring-boot:run
# or
../mvnw clean package && java -jar target/camel-example-spring-boot-*.jar
# tests
./mvnw test # all examplesCI (.github/workflows) runs ./mvnw -V --no-transfer-progress clean install -DskipTests then ./mvnw ... test on Java 21.
- Maven coordinates: parent
org.apache.camel.springboot.example:examples; childartifactId=camel-example-spring-boot-<name>(matches the directory);<name>=Camel SB Examples :: <Category> :: <Title>. - Java naming:
<Name>Application(@SpringBootApplication+main),<Name>Router(extendsRouteBuilder); tests end inTest. - License headers: ASF header required on every
.java,.properties,.xml,.adoc,.yml,.sh. - Config: use
{{placeholder}}in routes andcamel.component.<component>.<option>keys inapplication.properties. - README: AsciiDoc, with at least an Introduction and a "How to run"
section showing
mvn spring-boot:run.
- Create
<example>/with apom.xmldeclaring theexamplesparent and thecamel-example-spring-boot-<name>artifactId plus a<category>. - Add
<Name>Application.java,<Name>Router.java,application.properties, a<Name>Test, and aREADME.adoc— all with ASF headers. - Register the module in the root
pom.xml<modules>block. - Run
./mvnw -pl <example> -am clean installand confirm it starts and tests pass. - Open the PR from your fork, link the JIRA ticket, and request review from active committers.
- Camel Spring Boot docs: https://camel.apache.org/camel-spring-boot/latest/
- Camel Spring Boot starters list: https://camel.apache.org/camel-spring-boot/latest/list.html
- Canonical agent rules: https://github.com/apache/camel/blob/main/AGENTS.md