Skip to content

Commit

Permalink
doc(trait): Add some documentation on maven profile trait
Browse files Browse the repository at this point in the history
Ref #4560
  • Loading branch information
gansheer authored and squakez committed Jul 26, 2023
1 parent 0b926c5 commit 925f3af
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
25 changes: 25 additions & 0 deletions docs/modules/ROOT/pages/configuration/maven-profile.adoc
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 925f3af

Please sign in to comment.