RTECO-1646 - Enhance Maven native mode support by adding server ID fl… - #3637
RTECO-1646 - Enhance Maven native mode support by adding server ID fl…#3637fluxxBot wants to merge 8 commits into
Conversation
0183fbb to
3a4069a
Compare
…ag and updating build-info extraction logic
…0803102926-0e842d9721c5 in go.mod and go.sum
… multi-module build tests
…through Artifactory instance and remove central mirror settings
49e644f to
b9cf4d7
Compare
…ifactory remote repo and clarify comments
…ord for Basic auth instead of access token
…-info-go dependencies with specific commit hashes
… jfrog-cli-artifactory and build-info-go dependencies
| // Native accepts --server-id (for build-info collection: property tagging, virtual-repo | ||
| // resolution, repository lookups). Strip it from the goals and resolve the target server, | ||
| // falling back to the default configured server when not provided. | ||
| filteredMavenArgs, serverID, err := coreutils.ExtractServerIdFromCommand(filteredMavenArgs) |
There was a problem hiding this comment.
This new behavior — strip --server-id from goals and resolve the target server — is scoped to the nativeMode && !configExists branch, but the flag is registered unconditionally for Mvn in commandsflags.go line 2148, so users on the legacy (config-file) path see --server-id in jf mvn --help and it silently has no effect.
Either error out when --server-id is passed in legacy mode, or make the serverIdMvn.Usage string (line 785 of commandsflags.go) explicitly note "no effect in legacy mode" so users aren't surprised.
| Name: serverId, | ||
| Usage: "[Optional] Server ID configured using the 'jf config' command.` `", | ||
| }, | ||
| serverIdMvn: cli.StringFlag{ |
There was a problem hiding this comment.
Fine addition, but the flag's actual CLI name (via cli.StringFlag.Name) will be serverId — same as the base — so users still type --server-id, not --server-id-mvn. Please confirm no docs / release notes reference --server-id-mvn as a distinct flag.

…ag and updating build-info extraction logic
masterbranch.go vet ./....go fmt ./....