[
https://issues.apache.org/jira/browse/MNG-4559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825940#comment-16825940
]
Markus Schuh commented on MNG-4559:
-----------------------------------
The support of path names containing spaces within maven is meanwhile quite
complete due to meanwhile proper quoting. Just this special case issue is open.
As already mentioned by [~dwijnand] in a comment above in 2012, the
[POSIX|[http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html]]
solution - within a POSIX shell - for addition of the needed quoting in final
call is just to prefix the exec by an "eval ".
The introduction of arrays (not yet part of POSIX) were cleaner - but requires
bash (or another shell). This may have compatibility concerns for a tool of
such wide spread usage as maven.
"eval" has some security implication (code injection) - but when used as prefix
for "exec" this isn't relevant, since the "exec" terminates the shell execution
anyway.
> MAVEN_OPTS are incorrectly resolved in Unix
> -------------------------------------------
>
> Key: MNG-4559
> URL: https://issues.apache.org/jira/browse/MNG-4559
> Project: Maven
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1, 3.0.5
> Environment: OS: Linux, 2.6.32-11-generic, amd64.
> Java: 1.6.0_17
> Also Operating System = Mac OS X version 10.9.2 running on x86_64
> Java; VM; Vendor = 1.7.0_51
> Reporter: Maxim Podkolzine
> Priority: Major
>
> I'm trying to pass a quoted parameter through MAVEN_OPTS, e.g.
> MAVEN_OPTS="-Dfoo='bar baz'"
> As a result the quotes are not resolved, causing Java failure:
> Exception in thread "main" java.lang.NoClassDefFoundError: baz'
> ...
> I couldn't figure out a way to make it work.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)