From 925f3afe99f2a564e5af3b5e20d0cec6b891099f Mon Sep 17 00:00:00 2001 From: Gaelle Fournier Date: Wed, 26 Jul 2023 14:58:40 +0200 Subject: [PATCH] doc(trait): Add some documentation on maven profile trait Ref #4560 --- docs/modules/ROOT/nav.adoc | 1 + .../pages/configuration/maven-profile.adoc | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 docs/modules/ROOT/pages/configuration/maven-profile.adoc diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 990e11d91d..2d9cd6b56c 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 0000000000..3b6021a368 --- /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]: + +``` + + my-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.