Skip to content

Fix excessive Windows jlink command quoting - #698

Open
efegokdemir wants to merge 3 commits into
apache:masterfrom
efegokdemir:codex/fix-windows-quoting-697
Open

efegokdemir wants to merge 3 commits into
apache:masterfrom
efegokdemir:codex/fix-windows-quoting-697

Conversation

@efegokdemir

Copy link
Copy Markdown

Fixes #697

On Windows, maven-shared-utils' CmdShell already quotes the complete /X /C command. The toolchain executor was causing the command to be quoted a second time, producing a failing cmd.exe /C ""..." invocation.

This keeps the existing Unix command construction unchanged and uses a small Windows shell adapter so the executable path and arguments are passed as one correctly quoted command. The Windows-focused test now guards against the duplicated quotes.

Validation:

  • mvn -Dspotless.skip=true -Dtest=JLinkMojoTest test — passed (6 tests, 1 skipped)
  • Checkstyle — 0 violations
  • git diff --check
  • Default Spotless run was blocked by an existing Palantir formatter NoSuchFieldError under Java 27; Spotless was skipped only for the focused test run.

@slachiewicz slachiewicz added the bug Something isn't working label Oct 29, 2026
Use supported Invoker inclusion and exclusion selectors to run the
Java 14 requirement check on Java 9 through 13. The former 9-13
selector matched a version prefix rather than the intended range.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excessive quoting makes the command fail (Windows)

2 participants