This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit da45558d038740654c78b7e7d7ac71b1080c47ce Author: Claus Ibsen <[email protected]> AuthorDate: Fri Feb 20 21:16:12 2026 +0100 CAMEL-16861: Update docs --- .../src/main/docs/camel-report-maven-plugin.adoc | 25 ++++++++++++++++------ .../modules/ROOT/pages/camel-maven-plugin.adoc | 1 + .../ROOT/pages/camel-report-maven-plugin.adoc | 25 ++++++++++++++++------ .../camel-yaml-dsl-validator-maven-plugin.adoc | 11 +++++----- .../camel-yaml-dsl-validator-maven-plugin.adoc | 11 +++++----- .../src/main/docs/camel-maven-plugin.adoc | 1 + 6 files changed, 50 insertions(+), 24 deletions(-) diff --git a/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc b/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc index f3a513e7e1cb..88b599050902 100644 --- a/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc +++ b/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc @@ -17,6 +17,7 @@ For validating the source code for mis-configured Camel: Then you can run the `validate` goal from the command line or from within your Java editor such as IDEA or Eclipse. +[source,bash] ---- mvn camel-report:validate ---- @@ -70,13 +71,15 @@ You can also run the validate goal on any Maven project without having to add th Doing so requires to specify the plugin using its fully qualified name. For example to run the goal on the `camel-example-cdi` from Apache Camel you can run +[source,bash] ---- -$cd camel-example-cdi -$mvn org.apache.camel:camel-report-maven-plugin:2.20.0:validate +cd camel-example-cdi +mvn org.apache.camel:camel-report-maven-plugin:2.20.0:validate ---- which then runs and outputs the following: +[source,text] ---- [INFO] ------------------------------------------------------------------------ [INFO] Building Camel :: Example :: CDI 3.0.0 @@ -107,6 +110,7 @@ is changed to include a typo error in the `period` option And when running the `validate` goal again reports the following: +[source,text] ---- [INFO] ------------------------------------------------------------------------ [INFO] Building Camel :: Example :: CDI 3.0.0 @@ -158,8 +162,9 @@ The maven plugin *validate* goal supports the following options which can be con For example to turn on ignoring usage of deprecated options from the command line, you can run: +[source,bash] ---- -$mvn camel-report:validate -Dcamel.ignoreDeprecated=true +mvn camel-report:validate -Dcamel.ignoreDeprecated=true ---- Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.ignoreDeprecated` as the option name. @@ -169,9 +174,10 @@ Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.i If you have a Maven project then you can run the plugin to validate the endpoints in the unit test source code as well. You can pass in the options using `-D` style as shown: +[source,bash] ---- -$cd myproject -$mvn org.apache.camel:camel-report-maven-plugin:3.0.0:validate -Dcamel.includeTest=true +cd myproject +mvn org.apache.camel:camel-report-maven-plugin:3.0.0:validate -Dcamel.includeTest=true ---- === Validate Apache Camel routes in transitive dependencies @@ -183,7 +189,8 @@ In particular, in order to use the validate plugin with transitive dependencies, * The route `from("direct:out")` is declared into a dependency of your project, for example `my.company:routes-dependency:1.0` * If `routes-dependency` sources are released into a maven repository, the following plugin configuration can be used: -```xml +[source,xml] +---- <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-report-maven-plugin</artifactId> @@ -204,7 +211,7 @@ In particular, in order to use the validate plugin with transitive dependencies, </execution> </executions> </plugin> -``` +---- == camel-report:route-coverage @@ -257,6 +264,7 @@ This can be done either in the configuration of the `maven-surefire-plugin`: Or from the command line when running tests: +[source,bash] ---- mvn clean test -DCamelTestRouteCoverage=true ---- @@ -313,18 +321,21 @@ And in XML DSL you just assign the route id via the id attribute After unit testing with: +[source,bash] ---- mvn test ---- You can then run the goal to report the route coverage +[source,bash] ---- mvn camel-report:route-coverage ---- Which then reports which routes has missing route coverage with precise source code line reporting: +[source,text] ---- [INFO] --- camel-camel-report-plugin:3.0.0:route-coverage (default-cli) @ camel-example-spring-boot-xml --- [INFO] Discovered 1 routes diff --git a/docs/user-manual/modules/ROOT/pages/camel-maven-plugin.adoc b/docs/user-manual/modules/ROOT/pages/camel-maven-plugin.adoc index 0c0284b0d0c4..3a8554380d05 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-maven-plugin.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-maven-plugin.adoc @@ -12,6 +12,7 @@ The Camel Maven Plugin supports the following goals The `camel:run` goal of the Camel Maven Plugin is used to run your Camel Spring configurations in a forked JVM from Maven. A good example application to get you started is the Spring Example. +[source,bash] ---- cd examples/camel-example-spring mvn camel:run diff --git a/docs/user-manual/modules/ROOT/pages/camel-report-maven-plugin.adoc b/docs/user-manual/modules/ROOT/pages/camel-report-maven-plugin.adoc index f3a513e7e1cb..88b599050902 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-report-maven-plugin.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-report-maven-plugin.adoc @@ -17,6 +17,7 @@ For validating the source code for mis-configured Camel: Then you can run the `validate` goal from the command line or from within your Java editor such as IDEA or Eclipse. +[source,bash] ---- mvn camel-report:validate ---- @@ -70,13 +71,15 @@ You can also run the validate goal on any Maven project without having to add th Doing so requires to specify the plugin using its fully qualified name. For example to run the goal on the `camel-example-cdi` from Apache Camel you can run +[source,bash] ---- -$cd camel-example-cdi -$mvn org.apache.camel:camel-report-maven-plugin:2.20.0:validate +cd camel-example-cdi +mvn org.apache.camel:camel-report-maven-plugin:2.20.0:validate ---- which then runs and outputs the following: +[source,text] ---- [INFO] ------------------------------------------------------------------------ [INFO] Building Camel :: Example :: CDI 3.0.0 @@ -107,6 +110,7 @@ is changed to include a typo error in the `period` option And when running the `validate` goal again reports the following: +[source,text] ---- [INFO] ------------------------------------------------------------------------ [INFO] Building Camel :: Example :: CDI 3.0.0 @@ -158,8 +162,9 @@ The maven plugin *validate* goal supports the following options which can be con For example to turn on ignoring usage of deprecated options from the command line, you can run: +[source,bash] ---- -$mvn camel-report:validate -Dcamel.ignoreDeprecated=true +mvn camel-report:validate -Dcamel.ignoreDeprecated=true ---- Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.ignoreDeprecated` as the option name. @@ -169,9 +174,10 @@ Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.i If you have a Maven project then you can run the plugin to validate the endpoints in the unit test source code as well. You can pass in the options using `-D` style as shown: +[source,bash] ---- -$cd myproject -$mvn org.apache.camel:camel-report-maven-plugin:3.0.0:validate -Dcamel.includeTest=true +cd myproject +mvn org.apache.camel:camel-report-maven-plugin:3.0.0:validate -Dcamel.includeTest=true ---- === Validate Apache Camel routes in transitive dependencies @@ -183,7 +189,8 @@ In particular, in order to use the validate plugin with transitive dependencies, * The route `from("direct:out")` is declared into a dependency of your project, for example `my.company:routes-dependency:1.0` * If `routes-dependency` sources are released into a maven repository, the following plugin configuration can be used: -```xml +[source,xml] +---- <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-report-maven-plugin</artifactId> @@ -204,7 +211,7 @@ In particular, in order to use the validate plugin with transitive dependencies, </execution> </executions> </plugin> -``` +---- == camel-report:route-coverage @@ -257,6 +264,7 @@ This can be done either in the configuration of the `maven-surefire-plugin`: Or from the command line when running tests: +[source,bash] ---- mvn clean test -DCamelTestRouteCoverage=true ---- @@ -313,18 +321,21 @@ And in XML DSL you just assign the route id via the id attribute After unit testing with: +[source,bash] ---- mvn test ---- You can then run the goal to report the route coverage +[source,bash] ---- mvn camel-report:route-coverage ---- Which then reports which routes has missing route coverage with precise source code line reporting: +[source,text] ---- [INFO] --- camel-camel-report-plugin:3.0.0:route-coverage (default-cli) @ camel-example-spring-boot-xml --- [INFO] Discovered 1 routes diff --git a/docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc b/docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc index 99678fafadfd..2b4f4ca5cf5e 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc @@ -66,8 +66,8 @@ the `main-yaml` from Apache Camel you can run [source,bash] ---- -$cd main-yaml -$mvn org.apache.camel:camel-yaml-dsl-validator-maven-plugin:4.18.0:validate +cd main-yaml +mvn org.apache.camel:camel-yaml-dsl-validator-maven-plugin:4.18.0:validate ---- Which for example outputs (with a forced error) @@ -103,7 +103,7 @@ For example to excludes a specific file: [source,bash] ---- -$mvn camel-yaml-dsl-validator:validate -Dcamel.excludes=cheese.yaml +mvn camel-yaml-dsl-validator:validate -Dcamel.excludes=cheese.yaml ---- Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.excludes` as the option name. @@ -113,7 +113,8 @@ Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.e If you have a Maven project then you can run the plugin to validate the endpoints in the unit test source code as well. You can pass in the options using `-D` style as shown: +[source,bash] ---- -$cd myproject -$mvn org.apache.camel:camel-yaml-dsl-validator:4.18.0:validate -Dcamel.includeTest=true +cd myproject +mvn org.apache.camel:camel-yaml-dsl-validator:4.18.0:validate -Dcamel.includeTest=true ---- diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin/src/main/docs/camel-yaml-dsl-validator-maven-plugin.adoc b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin/src/main/docs/camel-yaml-dsl-validator-maven-plugin.adoc index 99678fafadfd..2b4f4ca5cf5e 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin/src/main/docs/camel-yaml-dsl-validator-maven-plugin.adoc +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin/src/main/docs/camel-yaml-dsl-validator-maven-plugin.adoc @@ -66,8 +66,8 @@ the `main-yaml` from Apache Camel you can run [source,bash] ---- -$cd main-yaml -$mvn org.apache.camel:camel-yaml-dsl-validator-maven-plugin:4.18.0:validate +cd main-yaml +mvn org.apache.camel:camel-yaml-dsl-validator-maven-plugin:4.18.0:validate ---- Which for example outputs (with a forced error) @@ -103,7 +103,7 @@ For example to excludes a specific file: [source,bash] ---- -$mvn camel-yaml-dsl-validator:validate -Dcamel.excludes=cheese.yaml +mvn camel-yaml-dsl-validator:validate -Dcamel.excludes=cheese.yaml ---- Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.excludes` as the option name. @@ -113,7 +113,8 @@ Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.e If you have a Maven project then you can run the plugin to validate the endpoints in the unit test source code as well. You can pass in the options using `-D` style as shown: +[source,bash] ---- -$cd myproject -$mvn org.apache.camel:camel-yaml-dsl-validator:4.18.0:validate -Dcamel.includeTest=true +cd myproject +mvn org.apache.camel:camel-yaml-dsl-validator:4.18.0:validate -Dcamel.includeTest=true ---- diff --git a/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc b/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc index 0c0284b0d0c4..3a8554380d05 100644 --- a/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc +++ b/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc @@ -12,6 +12,7 @@ The Camel Maven Plugin supports the following goals The `camel:run` goal of the Camel Maven Plugin is used to run your Camel Spring configurations in a forked JVM from Maven. A good example application to get you started is the Spring Example. +[source,bash] ---- cd examples/camel-example-spring mvn camel:run
