You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "James Nord (JIRA)" <ji...@apache.org> on 2016/01/11 14:47:39 UTC

[jira] [Issue Comment Deleted] (MNG-4559) MAVEN_OPTS are incorrectly resolved in Unix

     [ https://issues.apache.org/jira/browse/MNG-4559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Nord updated MNG-4559:
----------------------------
    Comment: was deleted

(was: still broken with 3.3.9

{noformat}
teilo@linuxdevx:~/a space$ mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /opt/apache/apache-maven-3.3.9
Java version: 1.8.0_66-internal, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "4.2.0-16-generic", arch: "amd64", family: "unix"

teilo@linuxdevx:~/a space$ export MAVEN_OPTS=/home/teilo/a\ space/.m2_repo
teilo@linuxdevx:~/a space$ mvn --version
Error: Could not find or load main class .home.teilo.a

teilo@linuxdevx:~/a space$ export MAVEN_OPTS="/home/teilo/a\ space/.m2_repo"
teilo@linuxdevx:~/a space$ mvn --version
Error: Could not find or load main class .home.teilo.a

teilo@linuxdevx:~/a space$ export MAVEN_OPTS=\"/home/teilo/a\ space/.m2_repo\"
teilo@linuxdevx:~/a space$ mvn --version
Error: Could not find or load main class ".home.teilo.a

teilo@linuxdevx:~/a space$ export MAVEN_OPTS=\""/home/teilo/a space/.m2_repo\""
teilo@linuxdevx:~/a space$ mvn --version

teilo@linuxdevx:~/a space$ export MAVEN_OPTS=\""'/home/teilo/a space/.m2_repo'"\"
teilo@linuxdevx:~/a space$ mvn --version
Error: Could not find or load main class "'.home.teilo.a
{noformat}

However this is handled - it should be cross platform so the same CI scripts can work on windows as well as Linux - thus quoting should be the preffered option/)

> MAVEN_OPTS are incorrectly resolved in Unix
> -------------------------------------------
>
>                 Key: MNG-4559
>                 URL: https://issues.apache.org/jira/browse/MNG-4559
>             Project: Maven
>          Issue Type: Bug
>    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
>
> 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
(v6.3.4#6332)