Skip to content

Conversation

quintesse
Copy link
Contributor

Some normal options like "plugin:apply" were taken to be a classpath and where marked for substitution. We now properly ignore them.

Fixes #68

@quintesse quintesse requested a review from Copilot September 3, 2025 23:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where the classpath substitution logic incorrectly identified Maven plugin options (like "spotless:apply") as classpaths that needed substitution. The fix adds validation to ensure only legitimate file paths with at least one directory separator are considered for classpath substitution.

  • Adds a validation check to prevent false positive classpath detection
  • Refactors the substitution logic into separate methods for better testability
  • Updates app.yml to remove incorrect substitution markers from Maven commands

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/main/java/org/codejive/jpm/util/ScriptUtils.java Adds validation logic to prevent Maven plugin options from being treated as classpaths and refactors substitution methods
src/test/java/org/codejive/jpm/util/ScriptUtilsTest.java Adds test case to verify that Maven plugin options are not incorrectly substituted
app.yml Removes incorrect substitution markers from Maven commands that were falsely identified as classpaths

Some normal options like "plugin:apply" were taken to be a classpath and
where marked for substitution. We now properly ignore them.

Fixes #68
@quintesse quintesse merged commit 5f03291 into main Sep 3, 2025
2 checks passed
@quintesse quintesse deleted the fix_68 branch September 3, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some arguments with colons are seen as classpaths by the "smart" command parser

1 participant