You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daun DeFrance (JIRA)" <ji...@codehaus.org> on 2006/04/13 18:29:48 UTC

[jira] Created: (MRELEASE-92) PerformMojo throws an error if there are no process args

PerformMojo throws an error if there are no process args
--------------------------------------------------------

         Key: MRELEASE-92
         URL: http://jira.codehaus.org/browse/MRELEASE-92
     Project: Maven 2.x Release Plugin
        Type: Bug

    Versions: 2.0-beta-5    
 Environment: winxp, maven 2.0.4
    Reporter: Daun DeFrance


While reading the process, PerformReleasMojo.getSystemEnvVars looks for an '=' and then tries to get substrings on either side to form key/value properties.  Under my environment, the index of '=' is -1 and the code does not guard before trying to grab a substring with this index.

I will attach the diff file of the (very minor) fix to workaround this problem.

-- 
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: (MRELEASE-92) PerformMojo throws an error if there are no process args

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRELEASE-92?page=all ]
     
Brett Porter closed MRELEASE-92:
--------------------------------

      Assign To: Brett Porter
     Resolution: Cannot Reproduce
    Fix Version:     (was: 2.0-beta-4)

the code has moved to plexus-utils. If you find an environment that causes this again, please open a new bug or reopen this one then.

> PerformMojo throws an error if there are no process args
> --------------------------------------------------------
>
>          Key: MRELEASE-92
>          URL: http://jira.codehaus.org/browse/MRELEASE-92
>      Project: Maven 2.x Release Plugin
>         Type: Bug

>     Versions: 2.0-beta-4
>  Environment: winxp, maven 2.0.4
>     Reporter: Daun DeFrance
>     Assignee: Brett Porter
>  Attachments: MRELEASE-92.patch
>
>
> While reading the process, PerformReleasMojo.getSystemEnvVars looks for an '=' and then tries to get substrings on either side to form key/value properties.  Under my environment, the index of '=' is -1 and the code does not guard before trying to grab a substring with this index.
> I will attach the diff file of the (very minor) fix to workaround this problem.

-- 
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: (MRELEASE-92) PerformMojo throws an error if there are no process args

Posted by "Daun DeFrance (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-92?page=comments#action_63537 ] 

Daun DeFrance commented on MRELEASE-92:
---------------------------------------

I'm not sure how I could have gotten into the situation where I was getting an substring index error: -1.  When I applied the patch, the release plugin performed flawlessly.  Without it, I was unable to complete a perform.  I have checked my env vars in the past for phantom carriage returns.  I am working off a windows XP machine (unfortunately) and it's been an issue in the past.  Regardless, if the idx is -1, calling substring with it will result in an error.  Bring defensive is not so wrong, even if my env is atypical.  

Best.

> PerformMojo throws an error if there are no process args
> --------------------------------------------------------
>
>          Key: MRELEASE-92
>          URL: http://jira.codehaus.org/browse/MRELEASE-92
>      Project: Maven 2.x Release Plugin
>         Type: Bug

>     Versions: 2.0-beta-5
>  Environment: winxp, maven 2.0.4
>     Reporter: Daun DeFrance
>  Attachments: MRELEASE-92.patch
>
>
> While reading the process, PerformReleasMojo.getSystemEnvVars looks for an '=' and then tries to get substrings on either side to form key/value properties.  Under my environment, the index of '=' is -1 and the code does not guard before trying to grab a substring with this index.
> I will attach the diff file of the (very minor) fix to workaround this problem.

-- 
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: (MRELEASE-92) PerformMojo throws an error if there are no process args

Posted by "Daun DeFrance (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRELEASE-92?page=all ]

Daun DeFrance updated MRELEASE-92:
----------------------------------

    Attachment: MRELEASE-92.patch

> PerformMojo throws an error if there are no process args
> --------------------------------------------------------
>
>          Key: MRELEASE-92
>          URL: http://jira.codehaus.org/browse/MRELEASE-92
>      Project: Maven 2.x Release Plugin
>         Type: Bug

>     Versions: 2.0-beta-5
>  Environment: winxp, maven 2.0.4
>     Reporter: Daun DeFrance
>  Attachments: MRELEASE-92.patch
>
>
> While reading the process, PerformReleasMojo.getSystemEnvVars looks for an '=' and then tries to get substrings on either side to form key/value properties.  Under my environment, the index of '=' is -1 and the code does not guard before trying to grab a substring with this index.
> I will attach the diff file of the (very minor) fix to workaround this problem.

-- 
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: (MRELEASE-92) PerformMojo throws an error if there are no process args

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-92?page=comments#action_63513 ] 

Emmanuel Venisse commented on MRELEASE-92:
------------------------------------------

I'm not sure this patch is correct. If a line doesn't include "=" that mean previous env var have a carriage return so the line must be added to previous key.

> PerformMojo throws an error if there are no process args
> --------------------------------------------------------
>
>          Key: MRELEASE-92
>          URL: http://jira.codehaus.org/browse/MRELEASE-92
>      Project: Maven 2.x Release Plugin
>         Type: Bug

>     Versions: 2.0-beta-5
>  Environment: winxp, maven 2.0.4
>     Reporter: Daun DeFrance
>  Attachments: MRELEASE-92.patch
>
>
> While reading the process, PerformReleasMojo.getSystemEnvVars looks for an '=' and then tries to get substrings on either side to form key/value properties.  Under my environment, the index of '=' is -1 and the code does not guard before trying to grab a substring with this index.
> I will attach the diff file of the (very minor) fix to workaround this problem.

-- 
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: (MRELEASE-92) PerformMojo throws an error if there are no process args

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRELEASE-92?page=all ]

Brett Porter updated MRELEASE-92:
---------------------------------

    Fix Version: 2.0-beta-4

> PerformMojo throws an error if there are no process args
> --------------------------------------------------------
>
>          Key: MRELEASE-92
>          URL: http://jira.codehaus.org/browse/MRELEASE-92
>      Project: Maven 2.x Release Plugin
>         Type: Bug

>     Versions: 2.0-beta-4
>  Environment: winxp, maven 2.0.4
>     Reporter: Daun DeFrance
>      Fix For: 2.0-beta-4
>  Attachments: MRELEASE-92.patch
>
>
> While reading the process, PerformReleasMojo.getSystemEnvVars looks for an '=' and then tries to get substrings on either side to form key/value properties.  Under my environment, the index of '=' is -1 and the code does not guard before trying to grab a substring with this index.
> I will attach the diff file of the (very minor) fix to workaround this problem.

-- 
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