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 committed Jul 26, 2023
1 parent 25c83ad commit 991616b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/modules/ROOT/pages/configuration/maven-profile.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
= 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 991616b

Please sign in to comment.