You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Barrie Treloar <ba...@gmail.com> on 2007/04/27 06:05:12 UTC

Plexus CommandShell on Windows?

Has anyone had experience with Plexus CommandShell on Windows?

I am finding that it is creating a Process like:
[cmd, /C, /X, "C:\path\to\maven\mvn.bat" goal1 goal2]

(mvn.bat is quoted because it contains spaces)

And that java.lang.Process is throwing an IllegalArgumentException
(without any message *grr*) but after stepping through the debugger I
see the problem is that Process expects that if an argument is quoted
then the whole argument is quoted.

So it expects:
"C:\path\to\maven\mvn.bat" goal1 goal2
to be
"C:\path\to\maven\mvn.bat goal1 goal2"

Or alternatively it could be
'C:\path\to\maven\mvn.bat' goal1 goal2

Before I start hacking into code I don't understand, does anyone have
experience using this class and is there something that should be done
prior to using it in a Windows environment?

Shouldn't CommandShell work out how to quote the executable correctly
on windows so I don't have to do anything special?

Thanks
Barrie

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Barrie Treloar <ba...@gmail.com>.
On 4/27/07, Jerome Lacoste <je...@gmail.com> wrote:
> On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> > On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> > > On 4/27/07, Jerome Lacoste <je...@gmail.com> wrote:
> > > > Yes its buggy. See http://jira.codehaus.org/browse/PLXUTILS-31
> > > >
> > > > I want to attach a batch file to the issue to test the problem. Would
> > > > you mind help out ?
> > > >
> > > > I will attach it in a few hours. Then we can fix my proposed patch
> > > > because it is not complete.
> >
> > Having looked at that issue Carlos indicates that he had a complete
> > test suite for this.
> >
> > Have you found that?
>
> No I saw his answer when I pointed it to you. But he said 'had' so I
> wonder why it isn't there anymore. I will look into that (if you
> don't) but not today.
>
> Note I already wrote the batch script I talked about, I just forgot to
> attach it.  It's on another PC, so it will have to wait for some
> hours.

This is a regression of http://jira.codehaus.org/browse/PLX-161
(i don't have comment rights *grr*)

revision 5960 broke the windows tests.
I haven't looked at which bits of code need fixing too yet.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Barrie Treloar <ba...@gmail.com>.
On 5/6/07, Barrie Treloar <ba...@gmail.com> wrote:
> On 5/6/07, Carlos Sanchez <ca...@apache.org> wrote:
> > I think I did a good test for windows, but must have been overwritten,
> > modified or something when fixing other OS. I'd go back on the
> > revisions of the unit tests until they fail on windows, then you know
> > what test is good for windows
>
> I am using the Carlos' versions in SVN to provide a patch for this regression.
>

Patch uploaded.

Can someone please apply it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Barrie Treloar <ba...@gmail.com>.
On 5/6/07, Carlos Sanchez <ca...@apache.org> wrote:
> I think I did a good test for windows, but must have been overwritten,
> modified or something when fixing other OS. I'd go back on the
> revisions of the unit tests until they fail on windows, then you know
> what test is good for windows

I am using the Carlos' versions in SVN to provide a patch for this regression.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Carlos Sanchez <ca...@apache.org>.
I think I did a good test for windows, but must have been overwritten,
modified or something when fixing other OS. I'd go back on the
revisions of the unit tests until they fail on windows, then you know
what test is good for windows

On 4/26/07, Jerome Lacoste <je...@gmail.com> wrote:
> On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> > On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> > > On 4/27/07, Jerome Lacoste <je...@gmail.com> wrote:
> > > > Yes its buggy. See http://jira.codehaus.org/browse/PLXUTILS-31
> > > >
> > > > I want to attach a batch file to the issue to test the problem. Would
> > > > you mind help out ?
> > > >
> > > > I will attach it in a few hours. Then we can fix my proposed patch
> > > > because it is not complete.
> >
> > Having looked at that issue Carlos indicates that he had a complete
> > test suite for this.
> >
> > Have you found that?
>
> No I saw his answer when I pointed it to you. But he said 'had' so I
> wonder why it isn't there anymore. I will look into that (if you
> don't) but not today.
>
> Note I already wrote the batch script I talked about, I just forgot to
> attach it.  It's on another PC, so it will have to wait for some
> hours.
>
> Cheers,
>
> Jerome
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Jerome Lacoste <je...@gmail.com>.
On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> > On 4/27/07, Jerome Lacoste <je...@gmail.com> wrote:
> > > Yes its buggy. See http://jira.codehaus.org/browse/PLXUTILS-31
> > >
> > > I want to attach a batch file to the issue to test the problem. Would
> > > you mind help out ?
> > >
> > > I will attach it in a few hours. Then we can fix my proposed patch
> > > because it is not complete.
>
> Having looked at that issue Carlos indicates that he had a complete
> test suite for this.
>
> Have you found that?

No I saw his answer when I pointed it to you. But he said 'had' so I
wonder why it isn't there anymore. I will look into that (if you
don't) but not today.

Note I already wrote the batch script I talked about, I just forgot to
attach it.  It's on another PC, so it will have to wait for some
hours.

Cheers,

Jerome

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Barrie Treloar <ba...@gmail.com>.
On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> On 4/27/07, Jerome Lacoste <je...@gmail.com> wrote:
> > Yes its buggy. See http://jira.codehaus.org/browse/PLXUTILS-31
> >
> > I want to attach a batch file to the issue to test the problem. Would
> > you mind help out ?
> >
> > I will attach it in a few hours. Then we can fix my proposed patch
> > because it is not complete.

Having looked at that issue Carlos indicates that he had a complete
test suite for this.

Have you found that?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Barrie Treloar <ba...@gmail.com>.
On 4/27/07, Jerome Lacoste <je...@gmail.com> wrote:
> Yes its buggy. See http://jira.codehaus.org/browse/PLXUTILS-31
>
> I want to attach a batch file to the issue to test the problem. Would
> you mind help out ?
>
> I will attach it in a few hours. Then we can fix my proposed patch
> because it is not complete.

Sure.
Ping me when you are ready to go.
I'll probably have to do it at home over the weekend.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Plexus CommandShell on Windows?

Posted by Jerome Lacoste <je...@gmail.com>.
On 4/27/07, Barrie Treloar <ba...@gmail.com> wrote:
> Has anyone had experience with Plexus CommandShell on Windows?
>
> I am finding that it is creating a Process like:
> [cmd, /C, /X, "C:\path\to\maven\mvn.bat" goal1 goal2]
>
> (mvn.bat is quoted because it contains spaces)
>
> And that java.lang.Process is throwing an IllegalArgumentException
> (without any message *grr*) but after stepping through the debugger I
> see the problem is that Process expects that if an argument is quoted
> then the whole argument is quoted.
>
> So it expects:
> "C:\path\to\maven\mvn.bat" goal1 goal2
> to be
> "C:\path\to\maven\mvn.bat goal1 goal2"
>
> Or alternatively it could be
> 'C:\path\to\maven\mvn.bat' goal1 goal2
>
> Before I start hacking into code I don't understand, does anyone have
> experience using this class and is there something that should be done
> prior to using it in a Windows environment?
>
> Shouldn't CommandShell work out how to quote the executable correctly
> on windows so I don't have to do anything special?

Yes its buggy. See http://jira.codehaus.org/browse/PLXUTILS-31

I want to attach a batch file to the issue to test the problem. Would
you mind help out ?

I will attach it in a few hours. Then we can fix my proposed patch
because it is not complete.

Jerome

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org