diff --git a/archetypes/camel-archetype-api-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-api-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index c0e8e5d142715..bf81e9185366e 100644 --- a/archetypes/camel-archetype-api-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-api-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -63,11 +63,19 @@ + + + + + README.md + AGENTS.md + + + __artifactId__-component/ - ReadMe.txt pom.xml diff --git a/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/AGENTS.md b/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/AGENTS.md new file mode 100644 index 0000000000000..a5c980608b127 --- /dev/null +++ b/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/AGENTS.md @@ -0,0 +1,29 @@ +# AGENTS.md + +Guidance for AI coding assistants working on this project, which was generated from the +`camel-archetype-api-component` Maven archetype. + +## Start here + +- Apache Camel LLM index: https://camel.apache.org/llms.txt +- Any Apache Camel documentation page is available as LLM-friendly Markdown by replacing `.html` with `.md` in its URL. +- Prefer the Camel CLI and the Camel MCP server (both linked from the index above) to look up components, their endpoint options and the catalog. Do not invent component URIs or options — verify them against the catalog or the documentation. + +## Project layout + +This is a multi-module project: + +- `*-api` — the Java API that this component proxies. +- `*-component` — the Camel component generated from that API. +- `*-component/signatures` — the API signature files consumed by `camel-api-component-maven-plugin`. + +## Build and test + +- Build: `mvn install` from the project root (the `*-api` module must be built before the `*-component` module). +- Test: `mvn test` + +## Conventions + +- The API method proxies and collections are generated at build time by `camel-api-component-maven-plugin` from the API signatures. Do not hand-edit them — change the API or the signature files instead. +- The endpoint and configuration classes under `*-component/src/main/java` are hand-written: annotate the endpoint with `@UriEndpoint` and its options with `@UriPath`, `@UriParam` and `@Metadata`. +- Reference: https://camel.apache.org/manual/writing-components.html diff --git a/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/README.md b/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/README.md new file mode 100644 index 0000000000000..96da8bc0c41bc --- /dev/null +++ b/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/README.md @@ -0,0 +1,22 @@ +# Camel API Component Project + +A custom API-based Apache Camel component generated from the `camel-archetype-api-component` Maven archetype. + +This is a multi-module project: + +- `*-api` — the Java API that the component proxies. +- `*-component` — the Camel component, generated from that API by `camel-api-component-maven-plugin` + using the API signatures under `*-component/signatures`. + +## Build + + mvn install + +## For AI coding assistants + +See `AGENTS.md` in this directory, and start from the Apache Camel LLM index: +https://camel.apache.org/llms.txt + +## More information + +Writing custom components: https://camel.apache.org/manual/writing-components.html diff --git a/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/ReadMe.txt b/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/ReadMe.txt deleted file mode 100644 index f327e1e986c80..0000000000000 --- a/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/ReadMe.txt +++ /dev/null @@ -1,13 +0,0 @@ -Camel Component Project -======================= - -This project is a template of a Camel component. - -To build this project use - - mvn install - -For more help see the Apache Camel documentation: - - http://camel.apache.org/writing-components.html - diff --git a/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index 5f485d2cc4319..9b9249b21d231 100644 --- a/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -79,7 +79,8 @@ - ReadMe.txt + README.md + AGENTS.md diff --git a/archetypes/camel-archetype-component/src/main/resources/archetype-resources/AGENTS.md b/archetypes/camel-archetype-component/src/main/resources/archetype-resources/AGENTS.md new file mode 100644 index 0000000000000..f0199d210c9cf --- /dev/null +++ b/archetypes/camel-archetype-component/src/main/resources/archetype-resources/AGENTS.md @@ -0,0 +1,27 @@ +# AGENTS.md + +Guidance for AI coding assistants working on this project, which was generated from the +`camel-archetype-component` Maven archetype. + +## Start here + +- Apache Camel LLM index: https://camel.apache.org/llms.txt +- Any Apache Camel documentation page is available as LLM-friendly Markdown by replacing `.html` with `.md` in its URL. +- Prefer the Camel CLI and the Camel MCP server (both linked from the index above) to look up components, their endpoint options and the catalog. Do not invent component URIs or options — verify them against the catalog or the documentation. + +## Project layout + +- `src/main/java` — the `Component`, `Endpoint`, `Producer` and `Consumer` classes of this component. +- `src/main/resources/META-INF/services/org/apache/camel/component/` — registers the component for its URI scheme. +- `src/test/java` — tests based on `CamelTestSupport`. + +## Build and test + +- Build: `mvn install` +- Test: `mvn test` + +## Conventions + +- Annotate the endpoint with `@UriEndpoint`, and its options with `@UriPath`, `@UriParam` and `@Metadata`; these annotations drive the generated component metadata and documentation. +- Keep the file name under `META-INF/services/org/apache/camel/component` in sync with the endpoint scheme. +- Reference: https://camel.apache.org/manual/writing-components.html diff --git a/archetypes/camel-archetype-component/src/main/resources/archetype-resources/README.md b/archetypes/camel-archetype-component/src/main/resources/archetype-resources/README.md new file mode 100644 index 0000000000000..fc3a81c4d8787 --- /dev/null +++ b/archetypes/camel-archetype-component/src/main/resources/archetype-resources/README.md @@ -0,0 +1,19 @@ +# Camel Component Project + +A custom Apache Camel component generated from the `camel-archetype-component` Maven archetype. + +The component, endpoint, producer and consumer classes are in `src/main/java`, and the component is +registered for its URI scheme by the file in `src/main/resources/META-INF/services/org/apache/camel/component`. + +## Build + + mvn install + +## For AI coding assistants + +See `AGENTS.md` in this directory, and start from the Apache Camel LLM index: +https://camel.apache.org/llms.txt + +## More information + +Writing custom components: https://camel.apache.org/manual/writing-components.html diff --git a/archetypes/camel-archetype-component/src/main/resources/archetype-resources/ReadMe.txt b/archetypes/camel-archetype-component/src/main/resources/archetype-resources/ReadMe.txt deleted file mode 100644 index c12b82a0e4662..0000000000000 --- a/archetypes/camel-archetype-component/src/main/resources/archetype-resources/ReadMe.txt +++ /dev/null @@ -1,13 +0,0 @@ -Camel Component Project -======================= - -This project is a template of a Camel component. - -To build this project use - - mvn install - -For more help see the Apache Camel documentation: - - https://camel.apache.org/writing-components.html - diff --git a/archetypes/camel-archetype-dataformat/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-dataformat/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index f9da0e3d9c44d..ac763e0d0b421 100644 --- a/archetypes/camel-archetype-dataformat/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-dataformat/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -73,7 +73,8 @@ - ReadMe.txt + README.md + AGENTS.md diff --git a/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/AGENTS.md b/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/AGENTS.md new file mode 100644 index 0000000000000..78fec1396df6b --- /dev/null +++ b/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/AGENTS.md @@ -0,0 +1,28 @@ +# AGENTS.md + +Guidance for AI coding assistants working on this project, which was generated from the +`camel-archetype-dataformat` Maven archetype. + +## Start here + +- Apache Camel LLM index: https://camel.apache.org/llms.txt +- Any Apache Camel documentation page is available as LLM-friendly Markdown by replacing `.html` with `.md` in its URL. +- Prefer the Camel CLI and the Camel MCP server (both linked from the index above) to look up components, their endpoint options and the catalog. Do not invent component URIs or options — verify them against the catalog or the documentation. + +## Project layout + +- `src/main/java` — the `org.apache.camel.spi.DataFormat` implementation. +- `src/test/java` — tests based on `CamelTestSupport`. + +## Build and test + +- Build: `mvn install` +- Test: `mvn test` + +## Conventions + +- Implement both `marshal` and `unmarshal`, and stream from the given `InputStream`/`OutputStream` instead of buffering whole messages where possible. +- Use the Camel type converters (`exchange.getContext().getTypeConverter()`) rather than casting the body directly. +- The data format is registered by the `@org.apache.camel.spi.annotations.Dataformat("")` annotation on the class; there is no `META-INF/services` file to add. Keep the annotation value and `getDataFormatName()` in sync. +- Data formats in Camel: https://camel.apache.org/manual/data-format.html +- Writing the implementation: https://camel.apache.org/manual/writing-components.html diff --git a/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/README.md b/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/README.md new file mode 100644 index 0000000000000..496d2302c98fb --- /dev/null +++ b/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/README.md @@ -0,0 +1,21 @@ +# Camel Data Format Project + +A custom Apache Camel data format generated from the `camel-archetype-dataformat` Maven archetype. + +The data format implementation is in `src/main/java` and implements `org.apache.camel.spi.DataFormat` +(`marshal` and `unmarshal`). + +## Build + + mvn install + +## For AI coding assistants + +See `AGENTS.md` in this directory, and start from the Apache Camel LLM index: +https://camel.apache.org/llms.txt + +## More information + +Data formats in Camel: https://camel.apache.org/manual/data-format.html + +Writing the implementation: https://camel.apache.org/manual/writing-components.html diff --git a/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/ReadMe.txt b/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/ReadMe.txt deleted file mode 100644 index 65be3fa23c54e..0000000000000 --- a/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/ReadMe.txt +++ /dev/null @@ -1,13 +0,0 @@ -Camel Data Format Project -========================= - -This project is a template of a Camel data format. - -To build this project use - - mvn install - -For more help see the Apache Camel documentation: - - http://camel.apache.org/writing-components.html - diff --git a/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index 94ddf16d3357b..a9a8abbc57c8a 100644 --- a/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -70,7 +70,8 @@ - ReadMe.txt + README.md + AGENTS.md diff --git a/archetypes/camel-archetype-java/src/main/resources/archetype-resources/AGENTS.md b/archetypes/camel-archetype-java/src/main/resources/archetype-resources/AGENTS.md new file mode 100644 index 0000000000000..3a31178e59afd --- /dev/null +++ b/archetypes/camel-archetype-java/src/main/resources/archetype-resources/AGENTS.md @@ -0,0 +1,27 @@ +# AGENTS.md + +Guidance for AI coding assistants working on this project, which was generated from the +`camel-archetype-java` Maven archetype. + +## Start here + +- Apache Camel LLM index: https://camel.apache.org/llms.txt +- Any Apache Camel documentation page is available as LLM-friendly Markdown by replacing `.html` with `.md` in its URL. +- Prefer the Camel CLI and the Camel MCP server (both linked from the index above) to look up components, their endpoint options and the catalog. Do not invent component URIs or options — verify them against the catalog or the documentation. + +## Project layout + +- `src/main/java//MyRouteBuilder.java` — the Camel routes. +- `src/main/java//MainApp.java` — starts the application via `org.apache.camel.main.Main`. +- `src/main/resources/log4j2.properties` — logging. +- `src/data` — sample messages consumed by the generated route. + +## Build and run + +- Build: `mvn install` +- Run: `mvn camel:run` + +## Conventions + +- Add routes as `RouteBuilder` classes and register them on `Main` the same way as `MyRouteBuilder`, with `main.configure().addRoutesBuilder(...)`. This archetype does not scan for routes. +- Keep endpoint configuration in `pom.xml` dependencies plus route URIs; add a component dependency before using its scheme. diff --git a/archetypes/camel-archetype-java/src/main/resources/archetype-resources/README.md b/archetypes/camel-archetype-java/src/main/resources/archetype-resources/README.md new file mode 100644 index 0000000000000..0875350fd515e --- /dev/null +++ b/archetypes/camel-archetype-java/src/main/resources/archetype-resources/README.md @@ -0,0 +1,22 @@ +# Camel Java Router Project + +A standalone Apache Camel application generated from the `camel-archetype-java` Maven archetype. +Routes live in `src/main/java//MyRouteBuilder.java` and are started by +`src/main/java//MainApp.java`. + +## Build + + mvn install + +## Run + + mvn camel:run + +## For AI coding assistants + +See `AGENTS.md` in this directory, and start from the Apache Camel LLM index: +https://camel.apache.org/llms.txt + +## More information + +Apache Camel documentation: https://camel.apache.org/ diff --git a/archetypes/camel-archetype-java/src/main/resources/archetype-resources/ReadMe.txt b/archetypes/camel-archetype-java/src/main/resources/archetype-resources/ReadMe.txt deleted file mode 100644 index db87153ae6254..0000000000000 --- a/archetypes/camel-archetype-java/src/main/resources/archetype-resources/ReadMe.txt +++ /dev/null @@ -1,18 +0,0 @@ -Camel Java Router Project -========================= - -=== How to build - -To build this project use - - mvn install - -=== How to run - -You can run this example using - - mvn camel:run - -=== More information - -You can find more information about Apache Camel at the website: http://camel.apache.org/ \ No newline at end of file diff --git a/archetypes/camel-archetype-main/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-main/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index 98106f32fb7f8..60ac852a6940c 100644 --- a/archetypes/camel-archetype-main/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-main/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -73,7 +73,8 @@ - ReadMe.txt + README.md + AGENTS.md diff --git a/archetypes/camel-archetype-main/src/main/resources/archetype-resources/AGENTS.md b/archetypes/camel-archetype-main/src/main/resources/archetype-resources/AGENTS.md new file mode 100644 index 0000000000000..45972983f2680 --- /dev/null +++ b/archetypes/camel-archetype-main/src/main/resources/archetype-resources/AGENTS.md @@ -0,0 +1,29 @@ +# AGENTS.md + +Guidance for AI coding assistants working on this project, which was generated from the +`camel-archetype-main` Maven archetype. + +## Start here + +- Apache Camel LLM index: https://camel.apache.org/llms.txt +- Any Apache Camel documentation page is available as LLM-friendly Markdown by replacing `.html` with `.md` in its URL. +- Prefer the Camel CLI and the Camel MCP server (both linked from the index above) to look up components, their endpoint options and the catalog. Do not invent component URIs or options — verify them against the catalog or the documentation. + +## Project layout + +- `src/main/java//MyRouteBuilder.java` — the Camel routes. +- `src/main/java//MyApplication.java` — starts the application via `org.apache.camel.main.Main`. +- `src/main/java//MyBean.java`, `src/main/java//MyConfiguration.java` — beans wired by Camel's built-in dependency injection. +- `src/main/resources/application.properties` — Camel Main configuration. +- `src/test/java//MyApplicationTest.java` — test using `CamelMainTestSupport`. + +## Build and run + +- Build: `mvn install` +- Run: `mvn camel:run` +- Test: `mvn test` + +## Conventions + +- Configure Camel through `application.properties` (`camel.main.*`, `camel.component.*`) rather than in code where possible. +- Register beans with `@BindToRegistry`, and inject with `@BeanInject` and `@PropertyInject`. diff --git a/archetypes/camel-archetype-main/src/main/resources/archetype-resources/README.md b/archetypes/camel-archetype-main/src/main/resources/archetype-resources/README.md new file mode 100644 index 0000000000000..8bc90221cc0a4 --- /dev/null +++ b/archetypes/camel-archetype-main/src/main/resources/archetype-resources/README.md @@ -0,0 +1,24 @@ +# Camel Main + +A standalone Apache Camel application generated from the `camel-archetype-main` Maven archetype, +running via the built-in `Main` class. + +It also shows how to configure the application with Camel's built-in dependency injection +(`@BindToRegistry`, `@BeanInject` and `@PropertyInject`), and via `src/main/resources/application.properties`. + +## Build + + mvn install + +## Run + + mvn camel:run + +## For AI coding assistants + +See `AGENTS.md` in this directory, and start from the Apache Camel LLM index: +https://camel.apache.org/llms.txt + +## More information + +Apache Camel documentation: https://camel.apache.org/ diff --git a/archetypes/camel-archetype-main/src/main/resources/archetype-resources/ReadMe.txt b/archetypes/camel-archetype-main/src/main/resources/archetype-resources/ReadMe.txt deleted file mode 100644 index 5c6f1cf6fe208..0000000000000 --- a/archetypes/camel-archetype-main/src/main/resources/archetype-resources/ReadMe.txt +++ /dev/null @@ -1,26 +0,0 @@ -Camel Main -========== - -This example shows how to run Camel standalone via the built-in Main class. - -The example also demonstrates how you can configure the Camel application -via Camel built-in dependency-injection that supports binding via the -`@BindToRegistry`, `@BeanInject` and `@PropertyInject` annotations. - -Also notice how you can configure Camel in the `application.properties` file. - -=== How to build - -To build this project use - - mvn install - -=== How to run - -You can run this example using - - mvn camel:run - -=== More information - -You can find more information about Apache Camel at the website: http://camel.apache.org/ \ No newline at end of file diff --git a/archetypes/camel-archetype-spring/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-spring/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index 5d5170840b98c..afb2623b776fe 100644 --- a/archetypes/camel-archetype-spring/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-spring/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -68,7 +68,8 @@ - ReadMe.txt + README.md + AGENTS.md diff --git a/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/AGENTS.md b/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/AGENTS.md new file mode 100644 index 0000000000000..4495eb487458d --- /dev/null +++ b/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/AGENTS.md @@ -0,0 +1,32 @@ +# AGENTS.md + +Guidance for AI coding assistants working on this project, which was generated from the +`camel-archetype-spring` Maven archetype. + +## Status + +This project was generated from a **deprecated** archetype. It uses the plain Spring XML setup rather +than Camel on Spring Boot. Before investing in large changes here, consider whether the project should +be migrated to Camel on Spring Boot, or regenerated with the Camel CLI (`camel init`). + +## Start here + +- Apache Camel LLM index: https://camel.apache.org/llms.txt +- Any Apache Camel documentation page is available as LLM-friendly Markdown by replacing `.html` with `.md` in its URL. +- Prefer the Camel CLI and the Camel MCP server (both linked from the index above) to look up components, their endpoint options and the catalog. Do not invent component URIs or options — verify them against the catalog or the documentation. + +## Project layout + +- `src/main/resources/META-INF/spring/camel-context.xml` — the Spring XML context holding the Camel routes. +- `src/main/resources/log4j2.properties` — logging. +- `src/data` — sample messages consumed by the generated route. + +## Build and run + +- Build: `mvn install` +- Run: `mvn camel:run` + +## Conventions + +- Routes are defined in the Spring XML DSL inside ``; keep the XML valid against the Camel Spring schema. +- When adding a component, add its Maven dependency before referencing its scheme in an endpoint URI. diff --git a/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/README.md b/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/README.md new file mode 100644 index 0000000000000..2e0b36fa33924 --- /dev/null +++ b/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/README.md @@ -0,0 +1,24 @@ +# Camel Router Spring Project + +An Apache Camel application generated from the `camel-archetype-spring` Maven archetype. +Routes are defined in the Spring XML context at `src/main/resources/META-INF/spring/camel-context.xml`. + +> **This archetype is deprecated.** For new projects prefer Camel on Spring Boot, or the Camel CLI +> (`camel init`), instead of the plain Spring XML setup generated here. + +## Build + + mvn install + +## Run + + mvn camel:run + +## For AI coding assistants + +See `AGENTS.md` in this directory, and start from the Apache Camel LLM index: +https://camel.apache.org/llms.txt + +## More information + +Apache Camel documentation: https://camel.apache.org/ diff --git a/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/ReadMe.txt b/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/ReadMe.txt deleted file mode 100644 index 3d20ae801b717..0000000000000 --- a/archetypes/camel-archetype-spring/src/main/resources/archetype-resources/ReadMe.txt +++ /dev/null @@ -1,15 +0,0 @@ -Camel Router Spring Project -=========================== - -To build this project use - - mvn install - -To run this project with Maven use - - mvn camel:run - -For more help see the Apache Camel documentation - - http://camel.apache.org/ - diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc index 37cdd6818fb9d..fff5f3a8fb8f7 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc @@ -39,3 +39,13 @@ any other name. Set `allowLocalWebhookUrls=true` to permit loopback targets during local development. That option is unchanged and still does not permit any of the ranges above. + +=== camel-archetypes + +The Camel Maven archetypes now generate a `README.md` instead of the previous `ReadMe.txt`, with the +content rewritten in Markdown and the documentation links updated. Each generated project also gets +an `AGENTS.md` file with guidance for AI coding assistants, pointing at the Apache Camel LLM index +(`https://camel.apache.org/llms.txt`), the Camel CLI and the Camel MCP server. + +The `camel-archetype-api-component` archetype also generates its readme again: the file was declared +in the wrong file set and was therefore silently skipped.