diff --git a/artifactory/cli.go b/artifactory/cli.go index 9927c4a70..59b4a464c 100644 --- a/artifactory/cli.go +++ b/artifactory/cli.go @@ -1090,7 +1090,7 @@ func mvnLegacyCmd(c *cli.Context) error { if err != nil { return err } - mvnCmd := mvn.NewMvnCommand().SetConfiguration(configuration).SetConfigPath(c.Args().Get(1)).SetGoals(c.Args().Get(0)).SetThreads(threads) + mvnCmd := mvn.NewMvnCommand().SetConfiguration(configuration).SetConfigPath(c.Args().Get(1)).SetGoals([]string{c.Args().Get(0)}).SetThreads(threads) return commands.Exec(mvnCmd) } @@ -1127,7 +1127,7 @@ func mvnCmd(c *cli.Context) error { if err != nil { return err } - mvnCmd := mvn.NewMvnCommand().SetConfiguration(buildConfiguration).SetConfigPath(configFilePath).SetGoals(strings.Join(filteredMavenArgs, " ")).SetThreads(threads).SetInsecureTls(insecureTls) + mvnCmd := mvn.NewMvnCommand().SetConfiguration(buildConfiguration).SetConfigPath(configFilePath).SetGoals(filteredMavenArgs).SetThreads(threads).SetInsecureTls(insecureTls) return commands.Exec(mvnCmd) } return mvnLegacyCmd(c)