You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Didion (JIRA)" <ji...@codehaus.org> on 2006/05/25 21:52:40 UTC

[jira] Created: (SCM-209) Specifying working directory for Runtime.exec() on linux has no effect

Specifying working directory for Runtime.exec() on linux has no effect
----------------------------------------------------------------------

         Key: SCM-209
         URL: http://jira.codehaus.org/browse/SCM-209
     Project: Maven SCM
        Type: Bug

  Components: maven-scm-provider-perforce  
    Versions: 1.0-beta-3    
    Reporter: John Didion


Passing the working directory as an argument to Runtime.exec seems to have no effect on linux...perforce still goes with whatever the VM's initial working directory was. You need to set -d to make it use the correct one.

In PerforceScmProvider.createP4Command():

command.createArgument().setValue("-d");
command.createArgument().setValue(workingDir.getAbsolutePath());

-- 
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: (SCM-209) Specifying working directory for Runtime.exec() on linux has no effect

Posted by "John Didion (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-209?page=comments#action_72074 ] 
            
John Didion commented on SCM-209:
---------------------------------

Sorry...I don' t have the bandwidth for this. We've patched it locally, so I think we'll hang on until you do your refactoring (should be pretty soon now, looking at the date of your comment).

> Specifying working directory for Runtime.exec() on linux has no effect
> ----------------------------------------------------------------------
>
>                 Key: SCM-209
>                 URL: http://jira.codehaus.org/browse/SCM-209
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-perforce
>    Affects Versions: 1.0-beta-3
>            Reporter: John Didion
>         Assigned To: Mike Perham
>
> Passing the working directory as an argument to Runtime.exec seems to have no effect on linux...perforce still goes with whatever the VM's initial working directory was. You need to set -d to make it use the correct one.
> In PerforceScmProvider.createP4Command():
> command.createArgument().setValue("-d");
> command.createArgument().setValue(workingDir.getAbsolutePath());

-- 
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: (SCM-209) Specifying working directory for Runtime.exec() on linux has no effect

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Venisse updated SCM-209:
---------------------------------

    Fix Version/s: future

> Specifying working directory for Runtime.exec() on linux has no effect
> ----------------------------------------------------------------------
>
>                 Key: SCM-209
>                 URL: http://jira.codehaus.org/browse/SCM-209
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-perforce
>    Affects Versions: 1.0-beta-3
>            Reporter: John Didion
>         Assigned To: Mike Perham
>             Fix For: future
>
>
> Passing the working directory as an argument to Runtime.exec seems to have no effect on linux...perforce still goes with whatever the VM's initial working directory was. You need to set -d to make it use the correct one.
> In PerforceScmProvider.createP4Command():
> command.createArgument().setValue("-d");
> command.createArgument().setValue(workingDir.getAbsolutePath());

-- 
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: (SCM-209) Specifying working directory for Runtime.exec() on linux has no effect

Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-209?page=comments#action_66940 ] 

Mike Perham commented on SCM-209:
---------------------------------

I can't make this change easily as it breaks pretty much every test.  Please submit a patch with everything fixed, if possible.  Otherwise this will have to wait until the big refactoring I have planned for next month.

> Specifying working directory for Runtime.exec() on linux has no effect
> ----------------------------------------------------------------------
>
>          Key: SCM-209
>          URL: http://jira.codehaus.org/browse/SCM-209
>      Project: Maven SCM
>         Type: Bug

>   Components: maven-scm-provider-perforce
>     Versions: 1.0-beta-3
>     Reporter: John Didion

>
>
> Passing the working directory as an argument to Runtime.exec seems to have no effect on linux...perforce still goes with whatever the VM's initial working directory was. You need to set -d to make it use the correct one.
> In PerforceScmProvider.createP4Command():
> command.createArgument().setValue("-d");
> command.createArgument().setValue(workingDir.getAbsolutePath());

-- 
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: (SCM-209) Specifying working directory for Runtime.exec() on linux has no effect

Posted by "Patrick Schneider (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Schneider closed SCM-209.
---------------------------------

         Assignee: Patrick Schneider  (was: Mike Perham)
       Resolution: Fixed
    Fix Version/s:     (was: future)
                   1.0

Now passes -d flag to command line instead of using setWorkingDirectory.  The resulting command is different which is why the unit tests were failing.  Updated all failing tests to new expected value.

> Specifying working directory for Runtime.exec() on linux has no effect
> ----------------------------------------------------------------------
>
>                 Key: SCM-209
>                 URL: http://jira.codehaus.org/browse/SCM-209
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-perforce
>    Affects Versions: 1.0-beta-3
>            Reporter: John Didion
>            Assignee: Patrick Schneider
>             Fix For: 1.0
>
>
> Passing the working directory as an argument to Runtime.exec seems to have no effect on linux...perforce still goes with whatever the VM's initial working directory was. You need to set -d to make it use the correct one.
> In PerforceScmProvider.createP4Command():
> command.createArgument().setValue("-d");
> command.createArgument().setValue(workingDir.getAbsolutePath());

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