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-6256) Maven script can break if "-f" path contains special characters
Date Mon, 17 Jul 2017 09:02:00 GMT


ASF GitHub Bot commented on MNG-6256:

Github user etzelc commented on the issue:
    Now in `mvn.cmd` the string parameter of the echo command is surrounded with double quotes,
like in `mvn`.

> Maven script can break if "-f" path contains special characters 
> ----------------------------------------------------------------
>                 Key: MNG-6256
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.5.0
>         Environment: Windows 10 with PowerShell
>            Reporter: Christoph Etzel
> Executing maven on Windows using the {{\-f}} or {{--file}} parameter to specify an alternate
POM file can break the script if the path contains special characters. 
> It was originally discovered on a Windows Jenkins instance with working directory located
under C:\Program Files (x86)\Jenkins......
> Example:
> {code:java}mvn -f "folderWithClosing)Bracket/pomFolder"{code}
> Command line output: {{"Bracket/pomFolder" kann syntaktisch an dieser Stelle nicht verarbeitet
> Just for fun: Starting calc from maven script using {{\-f}}
> {code:java}mvn -f " ' & start calc"{code}
> Command line output: {{POM file  '}} and a new calculator process
> The bug was introduced with commit
for issue MNG-5889.
> Workaround: Use maven 3.3.9 or below
> Possible fix: Escape {{%FILE_ARG%}} and {{%POM_DIR%}} with {{"}} in {{echo}} commands
in {{maven.cmd}} (line 120 and 129).

This message was sent by Atlassian JIRA

View raw message