You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jörn Gebhardt <Jo...@ptv.de> on 2004/08/09 11:27:08 UTC

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

RE: Maven Return Codes

Posted by Carlos Sanchez <ap...@carlos.cousas.net>.
Hi,

The OutOfMemoryExceptions have been already discussed in previous threads.
Forking the jvm should help, also you can increase the memory available.

Regards

Carlos Sanchez
A Coruña, Spain

Oness Project
http://oness.sourceforge.net


> -----Original Message-----
> From: Jörn Gebhardt [mailto:Joern.Gebhardt@ptv.de] 
> Sent: Monday, August 09, 2004 11:27 AM
> To: users@maven.apache.org
> Subject: 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
> 



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