You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/07/26 15:34:55 UTC

[camel-k] branch main updated: doc(trait): Add some documentation on maven profile trait

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 925f3afe9 doc(trait): Add some documentation on maven profile trait
925f3afe9 is described below

commit 925f3afe99f2a564e5af3b5e20d0cec6b891099f
Author: Gaelle Fournier <ga...@gmail.com>
AuthorDate: Wed Jul 26 14:58:40 2023 +0200

    doc(trait): Add some documentation on maven profile trait
    
    Ref #4560
---
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../ROOT/pages/configuration/maven-profile.adoc    | 25 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 990e11d91..2d9cd6b56 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -40,6 +40,7 @@
 ** xref:configuration/build-time-properties.adoc[Build time properties]
 ** xref:configuration/components.adoc[Components]
 ** xref:configuration/dependencies.adoc[Dependencies]
+** xref:configuration/maven-profile.adoc[Maven Profile]
 ** xref:configuration/runtime-properties.adoc[Properties]
 ** xref:configuration/runtime-config.adoc[Runtime configuration]
 ** xref:configuration/runtime-resources.adoc[Runtime resources]
diff --git a/docs/modules/ROOT/pages/configuration/maven-profile.adoc b/docs/modules/ROOT/pages/configuration/maven-profile.adoc
new file mode 100644
index 000000000..3b6021a36
--- /dev/null
+++ b/docs/modules/ROOT/pages/configuration/maven-profile.adoc
@@ -0,0 +1,25 @@
+[[maven-profile]]
+= Maven Profile
+
+You can customize the build of an integration with a https://maven.apache.org/guides/introduction/introduction-to-profiles.html#profiles-in-poms[Maven profile]:
+
+```
+<profile>
+  <id>my-profile</id>
+  ...
+</profile>
+```
+
+Once you have the file ready you can create a Configmap or a Secret in order to use it in your integration:
+
+```
+kubectl create cm my-maven-profile --from-file my-profile.xml
+```
+
+Once the Configmap/Secret is ready, then, you can use it to run your integration:
+
+```
+kamel run hello.groovy -t builder.maven-profile=configmap:my-maven-profile/my-profile.xml
+```
+
+The profile will be added to your integration's project generated pom file. What will be changed in the `mvn package` execution will depend on your profile definition.