You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/03/06 08:38:38 UTC
[camel-k] branch release-1.10.x updated: fix(#3956): Add maven settings-security to maven command
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/release-1.10.x by this push:
new 77265a038 fix(#3956): Add maven settings-security to maven command
77265a038 is described below
commit 77265a0383268232ccf6b46776dc9bae3723a8c2
Author: Gaelle Fournier <ga...@gmail.com>
AuthorDate: Fri Mar 3 13:25:01 2023 +0100
fix(#3956): Add maven settings-security to maven command
---
pkg/util/maven/maven_command.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pkg/util/maven/maven_command.go b/pkg/util/maven/maven_command.go
index 2440a4328..8b55c463d 100644
--- a/pkg/util/maven/maven_command.go
+++ b/pkg/util/maven/maven_command.go
@@ -76,6 +76,13 @@ func (c *Command) Do(ctx context.Context) error {
args = append(args, "--settings", settingsPath)
}
+ settingsSecurityPath := path.Join(c.context.Path, "settings-security.xml")
+ if settingsSecurityExists, err := util.FileExists(settingsSecurityPath); err != nil {
+ return err
+ } else if settingsSecurityExists {
+ args = append(args, "-Dsettings.security="+settingsSecurityPath)
+ }
+
if !util.StringContainsPrefix(c.context.AdditionalArguments, "-Dmaven.artifact.threads") {
args = append(args, "-Dmaven.artifact.threads="+strconv.Itoa(runtime.GOMAXPROCS(0)))
}