You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sean Bridges (JIRA)" <ji...@codehaus.org> on 2008/04/16 18:15:55 UTC

[jira] Created: (MNG-3529) mvn -Da=" " throws an excepltion

mvn -Da=" " throws an excepltion
--------------------------------

                 Key: MNG-3529
                 URL: http://jira.codehaus.org/browse/MNG-3529
             Project: Maven 2
          Issue Type: Bug
    Affects Versions: 2.0.8
            Reporter: Sean Bridges
            Priority: Trivial


Doing,

mvn -Da=" "

throws,

---------------------------------------------------
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
        at java.lang.StringBuffer.setLength(StringBuffer.java:154)
        at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
        at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-3529.
----------------------------------

    Resolution: Fixed
      Assignee: Benjamin Bentmann

Fixed in [r928714|http://svn.apache.org/viewvc?view=revision&revision=928714].

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Assignee: Benjamin Bentmann
>            Priority: Trivial
>             Fix For: 3.0-alpha-8
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215682#action_215682 ] 

Benjamin Bentmann commented on MNG-3529:
----------------------------------------

It appears approach b) is more helpful as it also fixes a related issue with the MAVEN_OPTS variable. Right now
{noformat}
export "MAVEN_OPTS=-Dthe.prop=\"x y\""
{noformat}
makes mvn also fail ({{Exception in thread "main" java.lang.NoClassDefFoundError: y"}}).

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 3.0-alpha-8
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Dominic Mitchell (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155241#action_155241 ] 

Dominic Mitchell commented on MNG-3529:
---------------------------------------

I've just seen this as well:

{noformat}
% mvn release:prepare -DscmCommentPrefix='FOO-139 '
---------------------------------------------------
constituent[0]: file:/usr/local/apache-maven-2.0.9/lib/maven-2.0.9-uber.jar
---------------------------------------------------
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:143)
        at java.lang.StringBuffer.setLength(StringBuffer.java:153)
        at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:824)
        at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:777)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:103)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
{noformat}

It's quite useful to have a trailing space in the scmCommentPrefix, as otherwise it gets joined up with the automatically generated commit message and looks rather ugly.

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 2.0.x
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3529:
------------------------------

    Fix Version/s: 2.0.x

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 2.0.x
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215676#action_215676 ] 

Benjamin Bentmann edited comment on MNG-3529 at 3/27/10 5:27 PM:
-----------------------------------------------------------------

The problem originates from the Unix shell script we use to launch Maven, the relevant part:
{noformat}
QUOTED_ARGS=""
while [ "$1" != "" ] ; do
  QUOTED_ARGS="$QUOTED_ARGS \"$1\""
  shift
done

[...]

exec [...] $QUOTED_ARGS
{noformat}
While I can't explain it, this screws up the parameter passing and makes {{-D=" "}} parse as the two parameters {{"-D=}} and {{"}}

There seem to be two possible solutions to this:
a) Nuke the QUOTED_ARGS variable and use the special variable {{$@}} instead, i.e. 
{noformat}
exec [...] "$@"
{noformat}
b) Mimic Ant's launch script and do
{noformat}
exec_cmd="exec [...] $QUOTED_ARGS"
eval $exec_cmd
{noformat}

Personally, I don't know enough about Unix shell scripting to judge which of these is preferrable or might have unwanted side effects so Unix gurus please speak up.

      was (Author: bentmann):
    The problem originates from the Unix shell script we use to launch Maven, the relevant part:
{noformat}
QUOTED_ARGS=""
while [ "$1" != "" ] ; do
  QUOTED_ARGS="$QUOTED_ARGS \"$1\""
  shift
done

[...]

exec [...] $QUOTED_ARGS
{noformat}
While I can't explain it, this screws up the parameter passing and makes {{-D=" "}} parse as the two parameters {{"-D=}} and {{"}}

There seem to be two possible solutions to this:
a) Nuke the QUOTED_ARGS variable and use the special variable {{$@}} instead, i.e. 
{noformat}
exec [...] "$@"
{noformat}
b) Mimic Ant's launch script and do
{noformat}
exec_cmd="exec [...] $QUOTED_ARGS"
eval $exec_cmd
{noformat}

Personally, I don't enough about Unix shell scripting to judge which of these is preferrable or might have unwanted side effects so Unix gurus please speak up.
  
> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 3.0-alpha-8
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-3529:
-------------------------------

    Fix Version/s:     (was: 2.2.x)
                   3.0-alpha-7

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 3.0-alpha-7
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215676#action_215676 ] 

Benjamin Bentmann commented on MNG-3529:
----------------------------------------

The problem originates from the Unix shell script we use to launch Maven, the relevant part:
{noformat}
QUOTED_ARGS=""
while [ "$1" != "" ] ; do
  QUOTED_ARGS="$QUOTED_ARGS \"$1\""
  shift
done

[...]

exec [...] $QUOTED_ARGS
{noformat}
While I can't explain it, this screws up the parameter passing and makes {{-D=" "}} parse as the two parameters {{"-D=}} and {{"}}

There seem to be two possible solutions to this:
a) Nuke the QUOTED_ARGS variable and use the special variable {{$@}} instead, i.e. 
{noformat}
exec [...] "$@"
{noformat}
b) Mimic Ant's launch script and do
{noformat}
exec_cmd="exec [...] $QUOTED_ARGS"
eval $exec_cmd
{noformat}

Personally, I don't enough about Unix shell scripting to judge which of these is preferrable or might have unwanted side effects so Unix gurus please speak up.

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 3.0-alpha-8
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Paul Benedict (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=168524#action_168524 ] 

Paul Benedict commented on MNG-3529:
------------------------------------

I wonder if it is an OS-specific issue? I am on Windows. The report indicates a unix problem and OS X is, unless I am mistaken, a port of unix.

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 2.0.x
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Paul Benedict (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=168515#action_168515 ] 

Paul Benedict commented on MNG-3529:
------------------------------------

The duplicated issue (MNG-3994) has 2.0.10 has an affected version, but I can't reproduce it using 2.0.10. I tried these commands:

{code}
mvn -Da=" "
mvn -Da=""
mvn validate -Da=" "
{code}

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 2.0.x
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232249#action_232249 ] 

Jesse Glick commented on MNG-3529:
----------------------------------

Caused a regression; see: MNG-4767

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Assignee: Benjamin Bentmann
>            Priority: Trivial
>             Fix For: 3.0-beta-1
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=168517#action_168517 ] 

Brett Porter commented on MNG-3529:
-----------------------------------

I can definitely reproduce it here (Mac OS X)

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 2.0.x
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3529) mvn -Da=" " throws an excepltion

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-3529:
-----------------------------------

    Component/s: Command Line

> mvn -Da=" " throws an excepltion
> --------------------------------
>
>                 Key: MNG-3529
>                 URL: http://jira.codehaus.org/browse/MNG-3529
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.8
>            Reporter: Sean Bridges
>            Priority: Trivial
>             Fix For: 2.0.x
>
>
> Doing,
> mvn -Da=" "
> throws,
> ---------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>         at java.lang.StringBuffer.setLength(StringBuffer.java:154)
>         at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:793)
>         at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:746)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira