You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Gilday <ma...@imap.cc> on 2007/07/30 22:15:15 UTC
Exit codes on Windows
I am currently writing a Windows Powershell script which calls the maven
bat file to trigger a build as part of its functionality. It seems that
regardless of sucess or failure an exit code of 0 is returned. I have
found this closed JIRA issue (http://jira.codehaus.org/browse/MNG-2127)
which offers some suggestions, including setting MAVEN_TERMINATE_CMD=on.
I have tried these but have not had any luck. Is this an ongoing issue
with Maven on Windows? Should this be working with 2.0.7.
Thanks for any advice.
Martin.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Exit codes on Windows
Posted by Martin Gilday <ma...@imap.cc>.
Changing back to 2.0.6 fixes the issue for me.
I have created the following jira entry
http://jira.codehaus.org/browse/MNG-3126
----- Original message -----
From: "Martin Gilday" <ma...@imap.cc>
To: "Maven Users List" <us...@maven.apache.org>
Date: Tue, 31 Jul 2007 11:03:53 +0100
Subject: Re: Exit codes on Windows
It seems to not work on XP SP2 for me. I have set
MAVEN_TERMINATE_CMD=on whichever command I use %ERRORLEVEL% is always 0
from cmd.
When I set the terminate command then my prompt correctly closes
afterwards. When you use cmd /c mvn then %ERRORLVEL% remains at 0.
Can anyone else confirm this?
----- Original message -----
From: "Martin Gilday" <ma...@imap.cc>
To: "Maven Users List" <us...@maven.apache.org>
Date: Mon, 30 Jul 2007 21:33:23 +0100
Subject: Re: Exit codes on Windows
Seems I posted a bit prematurely. It works in a standard command
prompt just not in powershell. It seems it's not picking up the
environmental variable MAVEN_TERMINATE_CMD. If you define it again in
your powershell script in the env namespace
($ENV:MAVEN_TERMINATE_CMD="on") it starts working.
----- Original message -----
From: "Martin Gilday" <ma...@imap.cc>
To: users@maven.apache.org
Date: Mon, 30 Jul 2007 21:15:15 +0100
Subject: Exit codes on Windows
I am currently writing a Windows Powershell script which calls the maven
bat file to trigger a build as part of its functionality. It seems that
regardless of sucess or failure an exit code of 0 is returned. I have
found this closed JIRA issue (http://jira.codehaus.org/browse/MNG-2127)
which offers some suggestions, including setting MAVEN_TERMINATE_CMD=on.
I have tried these but have not had any luck. Is this an ongoing issue
with Maven on Windows? Should this be working with 2.0.7.
Thanks for any advice.
Martin.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Exit codes on Windows
Posted by Martin Gilday <ma...@imap.cc>.
It seems to not work on XP SP2 for me. I have set
MAVEN_TERMINATE_CMD=on whichever command I use %ERRORLEVEL% is always 0
from cmd.
When I set the terminate command then my prompt correctly closes
afterwards. When you use cmd /c mvn then %ERRORLVEL% remains at 0.
Can anyone else confirm this?
----- Original message -----
From: "Martin Gilday" <ma...@imap.cc>
To: "Maven Users List" <us...@maven.apache.org>
Date: Mon, 30 Jul 2007 21:33:23 +0100
Subject: Re: Exit codes on Windows
Seems I posted a bit prematurely. It works in a standard command
prompt just not in powershell. It seems it's not picking up the
environmental variable MAVEN_TERMINATE_CMD. If you define it again in
your powershell script in the env namespace
($ENV:MAVEN_TERMINATE_CMD="on") it starts working.
----- Original message -----
From: "Martin Gilday" <ma...@imap.cc>
To: users@maven.apache.org
Date: Mon, 30 Jul 2007 21:15:15 +0100
Subject: Exit codes on Windows
I am currently writing a Windows Powershell script which calls the maven
bat file to trigger a build as part of its functionality. It seems that
regardless of sucess or failure an exit code of 0 is returned. I have
found this closed JIRA issue (http://jira.codehaus.org/browse/MNG-2127)
which offers some suggestions, including setting MAVEN_TERMINATE_CMD=on.
I have tried these but have not had any luck. Is this an ongoing issue
with Maven on Windows? Should this be working with 2.0.7.
Thanks for any advice.
Martin.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Exit codes on Windows
Posted by Martin Gilday <ma...@imap.cc>.
Seems I posted a bit prematurely. It works in a standard command
prompt just not in powershell. It seems it's not picking up the
environmental variable MAVEN_TERMINATE_CMD. If you define it again in
your powershell script in the env namespace
($ENV:MAVEN_TERMINATE_CMD="on") it starts working.
----- Original message -----
From: "Martin Gilday" <ma...@imap.cc>
To: users@maven.apache.org
Date: Mon, 30 Jul 2007 21:15:15 +0100
Subject: Exit codes on Windows
I am currently writing a Windows Powershell script which calls the maven
bat file to trigger a build as part of its functionality. It seems that
regardless of sucess or failure an exit code of 0 is returned. I have
found this closed JIRA issue (http://jira.codehaus.org/browse/MNG-2127)
which offers some suggestions, including setting MAVEN_TERMINATE_CMD=on.
I have tried these but have not had any luck. Is this an ongoing issue
with Maven on Windows? Should this be working with 2.0.7.
Thanks for any advice.
Martin.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org