maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Gebhardt <Joern.Gebha...@ptv.de>
Subject AW: Maven Return Codes
Date Mon, 09 Aug 2004 10:36:47 GMT
Hi,

I found the solution myself. Instead of calling 'cmd /c maven' I have to
call 'cmd /c call maven'. In this case the error code is corretly returned
and interpreted by Ant and the build aborts.
For completeness here the correct maven.xml section

 <maven:reactor 
    basedir="${basedir}"
    includes="*/project.xml"
    ignoreFailures="false"
    collectOnly="true"
    postProcessing="true"/>
         
 <j:forEach var="reactorProject" items="${reactorProjects}">
    <ant:exec executable="cmd"  
        dir="${reactorProject.context.getVariable('basedir')}"
        failonerror="true">
      <arg line="/c call maven"/>
    </ant:exec>
 </j:forEach>

Joern



-----Ursprüngliche Nachricht-----
Von: Jörn Gebhardt [mailto:Joern.Gebhardt@ptv.de]
Gesendet: Montag, 9. August 2004 11:27
An: users@maven.apache.org
Betreff: Maven Return Codes


Hi,

we have modularized our build by using Maven. However, because the build
runs into OutOfMemoryExceptions when we compile all modules within one Maven
Reactor call, we are using the reactor only to determine the build order and
call afterwards each module via the ant:exec call.

 <maven:reactor 
    basedir="${basedir}"
    includes="*/project.xml"
    ignoreFailures="false"
    collectOnly="true"
    postProcessing="true"/>
         
 <j:forEach var="reactorProject" items="${reactorProjects}">
    <ant:exec executable="cmd"  
        dir="${reactorProject.context.getVariable('basedir')}"
        failonerror="true">
      <arg line="/c maven"/>
    </ant:exec>
 </j:forEach>

Now we have the problem, that the build goes on even if one module fails. It
seems that the failonerror Ant property doesn't work correctly.
Does the maven.bat batch file return any error code that is passed on by the
cmd shell? Does anybody know, how we can make sure that our build fails if
one Maven call fails?

Thanks in advance,
Jörn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message