astefanutti commented on code in PR #3344: URL: https://github.com/apache/camel-k/pull/3344#discussion_r895370106
########## pkg/util/maven/maven_command.go: ########## @@ -74,6 +74,17 @@ func (c *Command) Do(ctx context.Context) error { args = append(args, "--settings", settingsPath) } + if GOMAXPROCS, ok := os.LookupEnv("GOMAXPROCS"); ok { + args = append(args, "-Dmaven.artifact.threads="+GOMAXPROCS) + } + + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + if !strings.Contains(c.context.AdditionalArguments[len(c.context.AdditionalArguments)-1], "-T") { + args = append(args, "-T"+cpuQuota) Review Comment: I think the idea here would be to set the `-T` option based on the `GOMAXPROCS` environment variable, as for the `maven.artifact.threads` option. ########## pkg/util/maven/maven_command.go: ########## @@ -74,6 +74,17 @@ func (c *Command) Do(ctx context.Context) error { args = append(args, "--settings", settingsPath) } + if GOMAXPROCS, ok := os.LookupEnv("GOMAXPROCS"); ok { + args = append(args, "-Dmaven.artifact.threads="+GOMAXPROCS) Review Comment: It should be checked that the `maven.artifact.threads` option is not already provided in `AdditionalArguments`, to avoid overriding user provided value. -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org