ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "North Alex" <>
Subject RE: question regarding WSAD specific ant tasks
Date Wed, 04 Jun 2003 07:34:55 GMT
>My question is regarding behavior of the <projectBuild> task 
>when there is at least one compile error present.  The 
><projectBuild> task is not failing or terminating when there 
>is a compile error present regardless of the value of the 
>"failonerror" attribute.  I get a "BUILD SUCCESSFUL" message 
>after the task even though compile problems are noted in the 
>trace.  Is this the expected behavior or am I somehow missing 

I came across the same problem (running inside WSAD 5) ... here is my

<target name="do.compile" depends="clean">
    <projectBuild ProjectName="${}" failonerror="true"
		DebugCompilation="true" BuildType="full"/>
    <getJavacErrorCount ProjectName="${}"  
        PropertyName="compile.error.count" />
    <condition property="build.ok">
        <equals arg1="${compile.error.count}" arg2="0"/>

<target name="" unless="build.ok">
  <fail>Failed while compiling ${}</fail>

<target name="Compile" depends="do.compile,">

If there is a nicer way to do this, I'd like to know.  

<= Alex =>

View raw message