Skip to content

[MNG-4559] Support spaces in jvm.config#2213

Merged
gnodet merged 1 commit intoapache:masterfrom
gnodet:MNG-4559
Apr 2, 2025
Merged

[MNG-4559] Support spaces in jvm.config#2213
gnodet merged 1 commit intoapache:masterfrom
gnodet:MNG-4559

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 31, 2025

JIRA issue: MNG-4559

The .mvn/jvm.config file parsing in mvn.cmd needed improvements to properly handle multiple JVM arguments, especially when dealing with comments, quotes and spaces in values.

This PR:

  • Ensures proper parsing of multiple JVM arguments from .mvn/jvm.config
  • Maintains proper spacing between arguments
  • Handles both inline and full-line comments correctly
  • Fixes a bug in the space trimming logic (%%x -> %%i)
  • Preserves spaces within quoted values

The changes are validated by MavenITmng4559MultipleJvmArgsTest which verifies:

  • Multiple JVM arguments are properly handled
  • Comments are correctly processed
  • Arguments with spaces in quotes are preserved
  • Arguments from multiple lines are properly combined

@gnodet gnodet marked this pull request as ready for review April 1, 2025 21:16
@gnodet gnodet added this to the 4.0.0-rc-4 milestone Apr 1, 2025
@gnodet gnodet self-assigned this Apr 1, 2025
The .mvn/jvm.config file parsing in mvn.cmd needed improvements to properly handle multiple JVM arguments, especially when dealing with comments, quotes and spaces in values.

This PR:
- Ensures proper parsing of multiple JVM arguments from .mvn/jvm.config
- Maintains proper spacing between arguments
- Handles both inline and full-line comments correctly
- Fixes a bug in the space trimming logic (%%x -> %%i)
- Preserves spaces within quoted values

The changes are validated by MavenITmng4559MultipleJvmArgsTest which verifies:
- Multiple JVM arguments are properly handled
- Comments are correctly processed
- Arguments with spaces in quotes are preserved
- Arguments from multiple lines are properly combined

Fixes: https://issues.apache.org/jira/browse/MNG-4559
@gnodet gnodet merged commit 335ba39 into apache:master Apr 2, 2025
13 checks passed
gnodet added a commit that referenced this pull request Apr 3, 2025
…ts (#2213)

The .mvn/jvm.config file parsing in mvn.cmd needed improvements to properly handle multiple JVM arguments, especially when dealing with comments, quotes and spaces in values.

This PR:
- Ensures proper parsing of multiple JVM arguments from .mvn/jvm.config
- Maintains proper spacing between arguments
- Handles both inline and full-line comments correctly
- Fixes a bug in the space trimming logic (%%x -> %%i)
- Preserves spaces within quoted values

The changes are validated by MavenITmng4559MultipleJvmArgsTest which verifies:
- Multiple JVM arguments are properly handled
- Comments are correctly processed
- Arguments with spaces in quotes are preserved
- Arguments from multiple lines are properly combined

Fixes: https://issues.apache.org/jira/browse/MNG-4559
@jira-importer
Copy link

Resolve #6145

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants