maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barrie Treloar" <baerr...@gmail.com>
Subject Re: maven-invoker/plexus-utils: Problems with Windows and "cmd.exe" always returning 0 exit code.
Date Sun, 06 May 2007 11:57:16 GMT
On 5/6/07, Barrie Treloar <baerrach@gmail.com> wrote:
> After fixing plexus-utils to run processes correctly, I think there is
> another issue.
[...]
> This is most likely because on Windows the commands are invoked
> indirectly via "cmd.exe" which will return success regardless of what
> the sub-command returns.
>
> Does this seem reasonable?

According to http://www.jguru.com/forums/view.jsp?EID=1334930 there
should be an option to cause the return code to work, but I can't see
it.

http://www.cygwin.com/ml/cygwin/2002-12/msg00392.html claims that
trying just "exit %ERROR_CODE%" instead of "exit /B %ERROR_CODE%"
might be the trick.

This means setting "%MAVEN_TERMINATE_CMD%" to on.

And yes, this works.

So now CmdShell should probably set this on by default.

Thoughts?

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


Mime
View raw message