-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(trait): Add some documentation on maven profile trait
Ref #4560
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |