On 4/27/07, Barrie Treloar <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]