This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit c1bacd45b5a7c19dc76fbe46a20f16bb0064a44f Author: Antonin Stefanutti <anto...@stefanutti.fr> AuthorDate: Fri Jan 14 17:28:09 2022 +0100 feat(cli): Add --maven-cli-option option to the install command --- pkg/cmd/install.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go index 99fe01f..f3869dd 100644 --- a/pkg/cmd/install.go +++ b/pkg/cmd/install.go @@ -124,6 +124,7 @@ func newCmdInstall(rootCmdOptions *RootCmdOptions) (*cobra.Command, *installCmdO cmd.Flags().String("maven-settings", "", "Configure the source of the Maven settings (configmap|secret:name[/key])") cmd.Flags().StringArray("maven-repository", nil, "Add a Maven repository") cmd.Flags().String("maven-ca-secret", "", "Configure the secret key containing the Maven CA certificates (secret/key)") + cmd.Flags().StringArray("maven-cli-option", nil, "Add a default Maven CLI option to the list of arguments for Maven commands") // health cmd.Flags().Int("health-port", 8081, "The port of the health endpoint") @@ -181,6 +182,7 @@ type installCmdOptions struct { MavenRepositories []string `mapstructure:"maven-repositories"` MavenSettings string `mapstructure:"maven-settings"` MavenCASecret string `mapstructure:"maven-ca-secret"` + MavenCLIOptions []string `mapstructure:"maven-cli-options"` HealthPort int32 `mapstructure:"health-port"` Monitoring bool `mapstructure:"monitoring"` MonitoringPort int32 `mapstructure:"monitoring-port"` @@ -360,6 +362,11 @@ func (o *installCmdOptions) install(cobraCmd *cobra.Command, _ []string) error { if o.MavenLocalRepository != "" { platform.Spec.Build.Maven.LocalRepository = o.MavenLocalRepository } + + if len(o.MavenCLIOptions) > 0 { + platform.Spec.Build.Maven.CLIOptions = o.MavenCLIOptions + } + if o.RuntimeVersion != "" { platform.Spec.Build.RuntimeVersion = o.RuntimeVersion }