maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (MNG-6255) Maven script cannot parse jvm.config with CRLF
Date Tue, 18 Jul 2017 19:36:00 GMT


ASF GitHub Bot commented on MNG-6255:

Github user Tunaki commented on the issue:
    Looks like we have a similar bug in `mvn.cmd`. The added `testJvmConfigFileCR` test fails
on Windows:
    testJvmConfigFileCR(  Time elapsed: 1.983
sec  <<< FAILURE!
    junit.framework.ComparisonFailure: null expected:<ok[]> but was:<ok[-Xms256m-Xmx512m]>
      at junit.framework.Assert.assertEquals(
      at junit.framework.Assert.assertEquals(
    Looks like the carriage returns at the end of the line were stripped and everything was
put on a single line.

> Maven script cannot parse jvm.config with CRLF
> ----------------------------------------------
>                 Key: MNG-6255
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.5.0
>         Environment: Windows 7 with MINGW64 environment via Git for Windows 0.1.1 including
GNU coreutils and bash 4.4.12
>            Reporter: Andrew Kennedy
> A project with a {{.mvn/jvm.config}} file that has *CRLF* line endings will not parse
it correctly. The script uses the {{tr}} command to change *LF* to space, but this leaves
*CR* behind. For example, with the {{jvm.config}} file containing the text {{-Xmx1024m -Xms512m}}
followed by *CRLF*, the following error message is printed:
> {code}
> $ mvn install
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> Invalid initial heap size: -Xms512m
> {code}

This message was sent by Atlassian JIRA

View raw message