You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gansheer (via GitHub)" <gi...@apache.org> on 2023/07/13 08:32:50 UTC

[GitHub] [camel-k] gansheer opened a new pull request, #4568: feat(trait): Add maven profile to Integration in builder trait

gansheer opened a new pull request, #4568:
URL: https://github.com/apache/camel-k/pull/4568

   Ref #4560
   
   ## Description
   
   * Add builder.maven-profile property referencing a secret or a configmap : `[configmap|secret]:name[/key]`
   * Inject the given profile into the pom.xml generated in the project
   * Some refactoring on configmap/secret decoding from cli
   
   Example: 
   * Creates a secret or a configmap: `kubectl create secret generic maven-profile-owasp --from-file=owasp-profile.xml`
   * Use it in the builder trait: `-t builder.maven-profile=secret:maven-profile-owasp/owasp-profile.xml`
   
   **Release Note**
   ```release-note
   Add maven profile to Integration in builder trait as the maven-profile property referencing a secret or a configmap
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] github-actions[bot] commented on pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#issuecomment-1633820660

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] gansheer commented on a diff in pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#discussion_r1262354188


##########
pkg/builder/project.go:
##########
@@ -191,3 +194,14 @@ func injectDependencies(ctx *builderContext) error {
 func sanitizeDependencies(ctx *builderContext) error {
 	return camel.SanitizeIntegrationDependencies(ctx.Maven.Project.Dependencies)
 }
+
+func injectProfile(ctx *builderContext) error {

Review Comment:
   I analyzed this option. There is a way to use an external file but it will limit the build functionnalities overides from the profile as stated in [the maven documentation](https://maven.apache.org/guides/introduction/introduction-to-profiles.html#which-areas-of-a-pom-can-be-customized-by-each-type-of-profile-w). This is the reason I decided to inject the content into the pom file. Let me know what you think.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] github-actions[bot] commented on pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#issuecomment-1634355177

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] gansheer commented on pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#issuecomment-1651124905

   It's complete, ready for merge :sparkler: .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#issuecomment-1651129261

   Thanks for the contribution. Consider to add some documentation to show usage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on a diff in pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#discussion_r1273164186


##########
pkg/builder/project.go:
##########
@@ -191,3 +194,14 @@ func injectDependencies(ctx *builderContext) error {
 func sanitizeDependencies(ctx *builderContext) error {
 	return camel.SanitizeIntegrationDependencies(ctx.Maven.Project.Dependencies)
 }
+
+func injectProfile(ctx *builderContext) error {

Review Comment:
   I see. Thanks for clarifying. Then, it's good to go for me. Please, wait the fix I'm doing for https://github.com/apache/camel-k/issues/4597 before rebasing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] github-actions[bot] commented on pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#issuecomment-1649589445

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on a diff in pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#discussion_r1262323564


##########
pkg/builder/project.go:
##########
@@ -191,3 +194,14 @@ func injectDependencies(ctx *builderContext) error {
 func sanitizeDependencies(ctx *builderContext) error {
 	return camel.SanitizeIntegrationDependencies(ctx.Maven.Project.Dependencies)
 }
+
+func injectProfile(ctx *builderContext) error {

Review Comment:
   Instead of injecting the profile (which could be seen as dangerous against the immutability of the project provided) I wonder if it would be possible to have instead the profile called in the `./mvnw package -P custom-profile.xml` being the custom-profile.xml created from the configmap/secret (as I think we do the same for the settings.xml).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] gansheer commented on a diff in pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#discussion_r1262354188


##########
pkg/builder/project.go:
##########
@@ -191,3 +194,14 @@ func injectDependencies(ctx *builderContext) error {
 func sanitizeDependencies(ctx *builderContext) error {
 	return camel.SanitizeIntegrationDependencies(ctx.Maven.Project.Dependencies)
 }
+
+func injectProfile(ctx *builderContext) error {

Review Comment:
   I analyzed this option. There is a way to use an external file but it will limit the build functionnalities overides from the profile as stated in [the maven documentation](https://maven.apache.org/guides/introduction/introduction-to-profiles.html#which-areas-of-a-pom-can-be-customized-by-each-type-of-profile-w). 
   In short any profile in an external file would only be able to modify the `<repositories>` and `<pluginRepositories>` sections, plus an extra <properties> section, whereas an inlined profile in the POM will be able the full spec of a profile. This is a design decision from maven.
   
   This is the reason I decided to inject the content into the pom file. Let me know what you think.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez merged pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez merged PR #4568:
URL: https://github.com/apache/camel-k/pull/4568


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] github-actions[bot] commented on pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#issuecomment-1633812832

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] github-actions[bot] commented on pull request #4568: feat(trait): Add maven profile to Integration in builder trait

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4568:
URL: https://github.com/apache/camel-k/pull/4568#issuecomment-1643474045

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage unchanged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org