You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@continuum.apache.org by "Zach B (JIRA)" <ji...@codehaus.org> on 2005/11/02 17:33:45 UTC

[jira] Created: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

build reported as successful on win xp even when maven 1 build fails
--------------------------------------------------------------------

         Key: CONTINUUM-413
         URL: http://jira.codehaus.org/browse/CONTINUUM-413
     Project: Continuum
        Type: Bug
    Versions: 1.0    
 Environment: Maven 1.0.2
Java 1.5
Win XP SP2
Continuum 1.0
 Reporter: Zach B


Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Chad Ellison (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_49842 ] 

Chad Ellison commented on CONTINUUM-413:
----------------------------------------

I've also had this problem w/ Windows XP and Maven 2.

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Brian Ewins (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_50047 ] 

Brian Ewins commented on CONTINUUM-413:
---------------------------------------

The FAQ answer is incorrect.

The suggestion of setting MAVEN_TERMINATE_CMD to "on" in the environment makes the code do this every time:
exit %ERROR_CODE% 
except that ERROR_CODE isn't defined - should have been ERRORLEVEL. Even if it was, this causes exit to be called every time, and without a /B flag that kills off the command window, which is a bit useless outside continuum. 

The correct answer is, change continuum's run.bat to begin:
@echo off
set MAVEN_TERMINATE_CMD=on

then add this one line to the end of maven.bat:
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERRORLEVEL% 

I've tested this solution, it works.

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.0.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Brian Ewins (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_50061 ] 

Brian Ewins commented on CONTINUUM-413:
---------------------------------------

Ok, I did more checking (since I did believe you tested this!). This bug was reported against the current /stable/ version of maven1, ie maven 1.0.2. That has maven.bat from immediately prior to this change:
http://svn.apache.org/viewcvs.cgi/maven/maven-1/core/trunk/src/bin/maven.bat?rev=165456&r1=122478&r2=165456
I downloaded a fresh copy of 1.0.2 to make sure I hadn't messed mine up.

This patch added ERROR_CODE as a synonym, as you say. However, I still don't think the FAQ is right. On the bleeding edge of maven1, the code to exit on error is already there, and all that is needed is for continuum to set MAVEN_TERMINATE_CMD, ie the change to run.bat I described above. For maven 1.0.2, support for using ERROR_CODE isn't there and the change in the FAQ isn't enough.

However, from reading up on this, theres a caveat: my change to maven.bat will only work on winXP, win2k3. Documentation on the corresponding ant bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=13655
shows that the solution needs to be different on win95, NT - incorporating all the changes that are now in maven-1 HEAD.

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.0.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/CONTINUUM-413?page=all ]
     
Emmanuel Venisse closed CONTINUUM-413:
--------------------------------------

      Assign To: Emmanuel Venisse
     Resolution: Fixed
    Fix Version: 1.1

Faqs are updated

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Zach B (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_49989 ] 

Zach B commented on CONTINUUM-413:
----------------------------------

I've tried every conceivable combination of return codes, echo statements, etc.  I even tried exiting before @endlocal in the maven.bat script to see if env vars were getting erased before the exit code was returned.  I was not able to get a failed maven build to report as a build failure in Continuum.  I'm completely confused at this point as to what is either causing the problem, or what specifically is causing the problem for me.  I can reproduce at will a non-zero code and echo it as the last command before exiting maven.bat according to windows conventions (exit /B 1)--but still no reported failure.

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Brian Ewins (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_50055 ] 

Brian Ewins commented on CONTINUUM-413:
---------------------------------------

On what version of windows? This is what I see:

G:\>cmd /version
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

# get a process to exit with code 0
G:\>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
G:\>echo %ERRORLEVEL%
0
G:\>echo %ERROR_CODE%
%ERROR_CODE%

# note error_code is not defined. now the same, getting java to exit with errors
G:\>java -garbage
Unrecognized option: -garbage
Could not create the Java virtual machine.
G:\>echo %ERRORLEVEL%
1
G:\>echo %ERROR_CODE%
%ERROR_CODE%

#NB error code still wasn't defined.  
I can't see any documentation of ERROR_CODE on microsoft.com either, looking for older versions of cmd.exe/command.com




> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.0.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Chad Ellison (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_49977 ] 

Chad Ellison commented on CONTINUUM-413:
----------------------------------------

The FAQ suggests adding "exit /B errorlevel" to the end of your maven.bat file. I'm running maven 2 and I have "exit /B %ERROR_CODE%" at the end of my mvn.bat file but continuum still thinks every build is a success.

Are there alternate instructions to correct this for Maven 2?

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_49985 ] 

Emmanuel Venisse commented on CONTINUUM-413:
--------------------------------------------

you need to refresh you page.

content is :
 Continuum uses the command line return code for detecting a successful or failed execution.

If you use maven or ant, you need to add at the end of maven.bat and ant.bat, the following lines :

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
        
and define the MAVEN_TERMINATE_CMD environment var to "on".

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Alan Cabrera (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_49824 ] 

Alan Cabrera commented on CONTINUUM-413:
----------------------------------------

I also get this problem w/ Windows Server 2003

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-413?page=comments#action_50053 ] 

Emmanuel Venisse commented on CONTINUUM-413:
--------------------------------------------

The faq answer isn't incorrect
ERROR_CODE is a dos env var equivalent to ERRORLEVEL

we have test too the solution written in FAQ and it works.

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.0.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/CONTINUUM-413?page=all ]
     
Emmanuel Venisse closed CONTINUUM-413:
--------------------------------------

    Resolution: Fixed

I updated FAQ with Brian informations.

We'll provide later a maven.bat file for users

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.0.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

-- 
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] Reopened: (CONTINUUM-413) build reported as successful on win xp even when maven 1 build fails

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/CONTINUUM-413?page=all ]
     
Emmanuel Venisse reopened CONTINUUM-413:
----------------------------------------


ok, I reopen the issue. We need to provide a new maven.bat for users.

Brian, do you want to to write a patch for maven.bat 1.0.2?
do you have test maven.bat 1.1 script with continuum?

> build reported as successful on win xp even when maven 1 build fails
> --------------------------------------------------------------------
>
>          Key: CONTINUUM-413
>          URL: http://jira.codehaus.org/browse/CONTINUUM-413
>      Project: Continuum
>         Type: Bug
>     Versions: 1.0
>  Environment: Maven 1.0.2
> Java 1.5
> Win XP SP2
> Continuum 1.0
>     Reporter: Zach B
>     Assignee: Emmanuel Venisse
>      Fix For: 1.0.1

>
>
> Continuum always reports a successful build even when Maven reports a build failure.

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