This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit c061e5ff6e8755ec8a5ce109b45c24929e57e519
Author: James Netherton <jamesnether...@gmail.com>
AuthorDate: Tue Apr 16 15:06:34 2024 +0100

    Document how to generate a new example project
    
    Fixes #5975
---
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../contributor-guide/create-new-example.adoc      | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index a27ee26006..4b27eec7c8 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -21,6 +21,7 @@
 ** xref:contributor-guide/extension-metadata.adoc[Extension metadata]
 ** xref:contributor-guide/extension-documentation.adoc[Extension documentation]
 ** xref:contributor-guide/extension-testing.adoc[Testing extensions]
+** xref:contributor-guide/create-new-example.adoc[Create new example]
 ** xref:contributor-guide/ci.adoc[Continuous Integration]
 ** xref:contributor-guide/release-guide.adoc[Release guide]
 * xref:reference/index.adoc[Reference]
diff --git a/docs/modules/ROOT/pages/contributor-guide/create-new-example.adoc 
b/docs/modules/ROOT/pages/contributor-guide/create-new-example.adoc
new file mode 100644
index 0000000000..2444464b5b
--- /dev/null
+++ b/docs/modules/ROOT/pages/contributor-guide/create-new-example.adoc
@@ -0,0 +1,36 @@
+[[create-a-new-example]]
+= Create a new example project
+:page-aliases: create-new-example.adoc
+
+This guide outlines how to contribute a new example project to 
https://github.com/apache/camel-quarkus-examples[camel-quarkus-examples].
+
+1. You should know xref:contributor-guide/index.adoc#how-to-build[how to 
build].
+
+2. Make sure that nobody else works on the same example project already by 
searching through the
+   https://github.com/apache/camel-quarkus/issues[GitHub issues] or search the 
https://github.com/apache/camel-quarkus/labels/example[examples label]. 
+
+3. Let others know that you work on the given example by either creating a
+   https://github.com/apache/camel-quarkus/issues/new[new issue] or asking to 
assign an existing one to you.
+
+4. Clone 
https://github.com/apache/camel-quarkus-examples[camel-quarkus-examples] and 
check out the `camel-quarkus-main` branch.
+
+5. Scaffold a new example project using the `cq-maven-plugin`. For example, to 
add a new project named `yaml-to-log`:
++
+[source,shell]
+----
+$ cd camel-quarkus-examples
+$ mvn org.l2x6.cq:cq-maven-plugin:create-example 
-Dcq.artifactIdBase="yaml-to-log" -Dcq.exampleName="YAML To Log" 
-Dcq.exampleDescription="Shows how to use a YAML route with the log EIP"
+----
++
+Where:
++
+* `cq.artifactIdBase` is the Maven `artifactId` to use on the project. It's 
also used as the directory name for the generated project.
++
+* `cq.exampleName` is a short descriptive name of the project. If you choose 
not to provide this, it'll be determined from the value of `cq.artifactIdBase`.
++
+* `cq.exampleDescription` is a longer description of the project.
++
+6. If the plugin execution completes successfully, change into the new project 
directory.
+You can test the project build with `mvn clean test`.
++
+You may now add your own routes, tests and README documentation. There are 
some `TODO` comments that show where to do this.

Reply via email to