Skip to content

Conversation

nicallen
Copy link
Member

@nicallen nicallen commented Oct 13, 2025

Summary

The maven and gradle cli parsers used by the gen-build-spec command fail to parse valid command lines with intermixed positional args and options. This change fixes that limitation.

Description of changes

Use argparse.ArgumentParser.parse_intermixed_args instead of argparse.ArgumentParser.parse_args to enable handling of intermixed args, and add a unit test case for the maven parser and for the gradle parser.

Checklist

  • I have reviewed the contribution guide.
  • My PR title and commits follow the Conventional Commits convention.
  • My commits include the "Signed-off-by" line.
  • I have signed my commits following the instructions provided by GitHub. Note that we run GitHub's commit verification tool to check the commit signatures. A green verified label should appear next to all of your commits on GitHub.
  • I have updated the relevant documentation, if applicable.
  • I have tested my changes and verified they work as expected.

…mmand lines with intermixed positional args and options

Signed-off-by: Nicholas Allen <[email protected]>
@nicallen nicallen requested a review from behnazh-w as a code owner October 13, 2025 02:03
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 13, 2025
@behnazh-w behnazh-w changed the title fix: gen-build-spec maven/gradle cli parsers failed to parse valid co… fix: gen-build-spec maven/gradle cli parsers failed to parse valid command lines with intermixed positional args and options Oct 13, 2025
@nicallen nicallen merged commit 27cd721 into main Oct 15, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants