Skip to content

Comments

fix(cli): Patch generated Windows shell script for JAVACMD installs with spaces#7653

Merged
jeremylong merged 1 commit intodependency-check:mainfrom
chadlwilson:fix-cli-windows-javacmd-quoting
May 22, 2025
Merged

fix(cli): Patch generated Windows shell script for JAVACMD installs with spaces#7653
jeremylong merged 1 commit intodependency-check:mainfrom
chadlwilson:fix-cli-windows-javacmd-quoting

Conversation

@chadlwilson
Copy link
Collaborator

@chadlwilson chadlwilson commented May 22, 2025

Description of Change

Workaround for mojohaus/appassembler#114 which seems to be unmaintained and stuck upstream. Essentially does the same as mojohaus/appassembler#115

Not ideal, but not sure if there is a better way to address the issue given the upstream status.

%CLASSPATH% will still have issues, but don't think it's worth the hassle to patch this given it should not be used with dep check.

Related issues

Have test cases been added to cover the new functionality?

no

Manually compared generated zip before/after:
image

[INFO] --- appassembler:2.1.0:assemble (assemble) @ dependency-check-cli ---
[INFO] <omitted>
[INFO] --- antrun:3.1.0:run (fix-windows-shell-script) @ dependency-check-cli ---
[INFO] Executing tasks
[INFO] Executed tasks
[INFO]
[INFO] --- assembly:3.7.1:single (create-distribution) @ dependency-check-cli ---
[INFO] Reading assembly descriptor: src/main/assembly/release.xml
[INFO] Building zip: /Users/chad/Projects/community/DependencyCheck/cli/target/dependency-check-12.1.2-SNAPSHOT-release.zip
[INFO]

@boring-cyborg boring-cyborg bot added the cli changes to the cli label May 22, 2025
@chadlwilson chadlwilson changed the title fix: Patch generated Windows shell script for JAVACMD installs with spaces fix(cli): Patch generated Windows shell script for JAVACMD installs with spaces May 22, 2025
@chadlwilson chadlwilson force-pushed the fix-cli-windows-javacmd-quoting branch from e2a57ee to 551b790 Compare May 22, 2025 04:04
…ith spaces

Workaround for mojohaus/appassembler#114 which seems to be unmaintained and stuck upstream.

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
@chadlwilson chadlwilson force-pushed the fix-cli-windows-javacmd-quoting branch from 551b790 to f22d344 Compare May 22, 2025 09:24
Copy link
Collaborator

@jeremylong jeremylong left a comment

Choose a reason for hiding this comment

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

LGTM

@jeremylong jeremylong added this to the 12.1.2 milestone May 22, 2025
@marcelstoer
Copy link
Collaborator

[OT] @jeremylong this is currently the last issue tagged for 12.1.2. Does that mean we can expect a new release soon?

@jeremylong jeremylong merged commit aa0ae51 into dependency-check:main May 22, 2025
8 checks passed
@jeremylong
Copy link
Collaborator

@marcelstoer sure - I'll try to go through the release process this weekend.

@chadlwilson chadlwilson deleted the fix-cli-windows-javacmd-quoting branch May 22, 2025 15:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cli changes to the cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows CLI fails if JAVACMD contains spaces Batch failes if Java Path contains whitespaces

3 participants