Skip to content

RTECO-1646 - Enhance Maven native mode support by adding server ID fl… - #3637

Open
fluxxBot wants to merge 8 commits into
masterfrom
RTECO-1646-mvnWorkspace
Open

RTECO-1646 - Enhance Maven native mode support by adding server ID fl…#3637
fluxxBot wants to merge 8 commits into
masterfrom
RTECO-1646-mvnWorkspace

Conversation

@fluxxBot

@fluxxBot fluxxBot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

…ag and updating build-info extraction logic

  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • The pull request is targeting the master branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....

@fluxxBot fluxxBot added the new feature Automatically generated release notes label Aug 3, 2026
@fluxxBot
fluxxBot force-pushed the RTECO-1646-mvnWorkspace branch from 0183fbb to 3a4069a Compare August 3, 2026 10:33
@fluxxBot
fluxxBot force-pushed the RTECO-1646-mvnWorkspace branch from 49e644f to b9cf4d7 Compare August 4, 2026 07:27
…-info-go dependencies with specific commit hashes
… jfrog-cli-artifactory and build-info-go dependencies
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


Comment thread buildtools/cli.go
// 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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants