You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Darin Swanson <Da...@us.ibm.com> on 2004/01/12 19:49:43 UTC

Ant 1.6 and -keep-going

I have been playing around with Ant 1.6 and the -keep-going option. It 
does not work as I would expect and I wanted to find out if I am 
misinterpreting this new functionality.

My test buildfile:


<project default="fails">
        <target name="fails">
                <jar jarfile="jar16.jar" basedir="doesNotExist"/>
        </target>
        <target name="echos">
                <echo>Still echo on failure</echo>
        </target>
</project>


As stated, the basedir for the jar task does not exist.
The output from the commandline:



C:\apache-ant-1.6.0\bin>ant -buildfile failingTarget.xml -keep-going fails 
echos
Buildfile: failingTarget.xml

fails:
Target 'fails' failed with message 'C:\apache-ant-1.6.0\bin\doesNotExist
not found.'.

BUILD FAILED
C:\apache-ant-1.6.0\bin\failingTarget.xml:3:C:\apache-ant-1.6.0\bin\doesNotExist 
not found.
Total time: 0 seconds


I would have expected that the echos target would have been still been 
executed as it does not depend on the fails target?

Thanks in advance
Darins

Re: Ant 1.6 and -keep-going

Posted by Peter Reilly <pe...@corvil.com>.
This does looks like a bug...
Please enter one in bugzilla.

A work-around is to do the following:

<project default="all">
  <target name="all" depends="fails, echos"/>
  <target name="fails">
      <jar jarfile="jar16.jar" basedir="doesNotExist"/>
  </target>
  <target name="echos">
      <echo>Still echo on failure</echo>
  </target>
</project>


Peter

Darin Swanson wrote:

>I have been playing around with Ant 1.6 and the -keep-going option. It 
>does not work as I would expect and I wanted to find out if I am 
>misinterpreting this new functionality.
>
>My test buildfile:
>
>
><project default="fails">
>        <target name="fails">
>                <jar jarfile="jar16.jar" basedir="doesNotExist"/>
>        </target>
>        <target name="echos">
>                <echo>Still echo on failure</echo>
>        </target>
></project>
>
>
>As stated, the basedir for the jar task does not exist.
>The output from the commandline:
>
>
>
>C:\apache-ant-1.6.0\bin>ant -buildfile failingTarget.xml -keep-going fails 
>echos
>Buildfile: failingTarget.xml
>
>fails:
>Target 'fails' failed with message 'C:\apache-ant-1.6.0\bin\doesNotExist
>not found.'.
>
>BUILD FAILED
>C:\apache-ant-1.6.0\bin\failingTarget.xml:3:C:\apache-ant-1.6.0\bin\doesNotExist 
>not found.
>Total time: 0 seconds
>
>
>I would have expected that the echos target would have been still been 
>executed as it does not depend on the fails target?
>
>Thanks in advance
>Darins
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant 1.6 and -keep-going

Posted by Peter Reilly <pe...@corvil.com>.
Snap....
Fix is now in cvs, should be ready for ant 1.6.1..
Peter

Matt Benson wrote:

>And that time my stupid browser got me.  ha.  Anyway,
>I'm looking at this bug by means of apology for my
>premature post.  If I don't see a bug report before I
>get it fixed I'll file it.
>
>-Matt
>
>--- Matt Benson <gu...@yahoo.com> wrote:
>  
>
>>Doh, the line wrapping got me on the original post. 
>>:(
>>
>>Didn't see the explicitly called tasks; sorry.
>>
>>-Matt
>>
>>--- Matt Benson <gu...@yahoo.com> wrote:
>>    
>>
>>>Change thus:
>>>
>>>      
>>>
>>>><project default="echos">
>>>>        <target name="fails">
>>>>                <jar jarfile="jar16.jar"
>>>>basedir="doesNotExist"/>
>>>>        </target>
>>>>        <target name="echos" depends="fails">
>>>>                <echo>Still echo on
>>>>        
>>>>
>>failure</echo>
>>    
>>
>>>>        </target>
>>>></project>
>>>>
>>>>
>>>>As stated, the basedir for the jar task does not
>>>>exist.
>>>>The output from the commandline:
>>>>
>>>>
>>>>
>>>>C:\apache-ant-1.6.0\bin>ant -buildfile
>>>>failingTarget.xml -keep-going fails 
>>>>echos
>>>>Buildfile: failingTarget.xml
>>>>
>>>>fails:
>>>>Target 'fails' failed with message
>>>>'C:\apache-ant-1.6.0\bin\doesNotExist
>>>>not found.'.
>>>>
>>>>BUILD FAILED
>>>>
>>>>        
>>>>
>C:\apache-ant-1.6.0\bin\failingTarget.xml:3:C:\apache-ant-1.6.0\bin\doesNotExist
>  
>
>>>>not found.
>>>>Total time: 0 seconds
>>>>
>>>>
>>>>I would have expected that the echos target
>>>>        
>>>>
>>would
>>    
>>
>>>>have been still been 
>>>>executed as it does not depend on the fails
>>>>        
>>>>
>>>target?
>>>      
>>>
>>>>Thanks in advance
>>>>Darins
>>>>
>>>>        
>>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>Yahoo! Hotjobs: Enter the "Signing Bonus"
>>>Sweepstakes
>>>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>>>
>>>
>>>      
>>>
>---------------------------------------------------------------------
>  
>
>>>To unsubscribe, e-mail:
>>>user-unsubscribe@ant.apache.org
>>>For additional commands, e-mail:
>>>user-help@ant.apache.org
>>>
>>>      
>>>
>>__________________________________
>>Do you Yahoo!?
>>Yahoo! Hotjobs: Enter the "Signing Bonus"
>>Sweepstakes
>>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>user-unsubscribe@ant.apache.org
>>For additional commands, e-mail:
>>user-help@ant.apache.org
>>
>>    
>>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant 1.6 and -keep-going

Posted by Matt Benson <gu...@yahoo.com>.
And that time my stupid browser got me.  ha.  Anyway,
I'm looking at this bug by means of apology for my
premature post.  If I don't see a bug report before I
get it fixed I'll file it.

-Matt

--- Matt Benson <gu...@yahoo.com> wrote:
> Doh, the line wrapping got me on the original post. 
> :(
> 
> Didn't see the explicitly called tasks; sorry.
> 
> -Matt
> 
> --- Matt Benson <gu...@yahoo.com> wrote:
> > Change thus:
> > 
> > > <project default="echos">
> > >         <target name="fails">
> > >                 <jar jarfile="jar16.jar"
> > > basedir="doesNotExist"/>
> > >         </target>
> > >         <target name="echos" depends="fails">
> > >                 <echo>Still echo on
> failure</echo>
> > >         </target>
> > > </project>
> > > 
> > > 
> > > As stated, the basedir for the jar task does not
> > > exist.
> > > The output from the commandline:
> > > 
> > > 
> > > 
> > > C:\apache-ant-1.6.0\bin>ant -buildfile
> > > failingTarget.xml -keep-going fails 
> > > echos
> > > Buildfile: failingTarget.xml
> > > 
> > > fails:
> > > Target 'fails' failed with message
> > > 'C:\apache-ant-1.6.0\bin\doesNotExist
> > > not found.'.
> > > 
> > > BUILD FAILED
> > >
> >
>
C:\apache-ant-1.6.0\bin\failingTarget.xml:3:C:\apache-ant-1.6.0\bin\doesNotExist
> > > 
> > > not found.
> > > Total time: 0 seconds
> > > 
> > > 
> > > I would have expected that the echos target
> would
> > > have been still been 
> > > executed as it does not depend on the fails
> > target?
> > > 
> > > Thanks in advance
> > > Darins
> > > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> > Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant 1.6 and -keep-going

Posted by Matt Benson <gu...@yahoo.com>.
Doh, the line wrapping got me on the original post. 
:(

Didn't see the explicitly called tasks; sorry.

-Matt

--- Matt Benson <gu...@yahoo.com> wrote:
> Change thus:
> 
> > <project default="echos">
> >         <target name="fails">
> >                 <jar jarfile="jar16.jar"
> > basedir="doesNotExist"/>
> >         </target>
> >         <target name="echos" depends="fails">
> >                 <echo>Still echo on failure</echo>
> >         </target>
> > </project>
> > 
> > 
> > As stated, the basedir for the jar task does not
> > exist.
> > The output from the commandline:
> > 
> > 
> > 
> > C:\apache-ant-1.6.0\bin>ant -buildfile
> > failingTarget.xml -keep-going fails 
> > echos
> > Buildfile: failingTarget.xml
> > 
> > fails:
> > Target 'fails' failed with message
> > 'C:\apache-ant-1.6.0\bin\doesNotExist
> > not found.'.
> > 
> > BUILD FAILED
> >
>
C:\apache-ant-1.6.0\bin\failingTarget.xml:3:C:\apache-ant-1.6.0\bin\doesNotExist
> > 
> > not found.
> > Total time: 0 seconds
> > 
> > 
> > I would have expected that the echos target would
> > have been still been 
> > executed as it does not depend on the fails
> target?
> > 
> > Thanks in advance
> > Darins
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant 1.6 and -keep-going

Posted by Matt Benson <gu...@yahoo.com>.
Doh, the line wrapping got me on the original post. 
:(

Didn't see the explicitly called tasks; sorry.

-Matt

--- Matt Benson <gu...@yahoo.com> wrote:
> Change thus:
> 
> > <project default="echos">
> >         <target name="fails">
> >                 <jar jarfile="jar16.jar"
> > basedir="doesNotExist"/>
> >         </target>
> >         <target name="echos" depends="fails">
> >                 <echo>Still echo on failure</echo>
> >         </target>
> > </project>
> > 
> > 
> > As stated, the basedir for the jar task does not
> > exist.
> > The output from the commandline:
> > 
> > 
> > 
> > C:\apache-ant-1.6.0\bin>ant -buildfile
> > failingTarget.xml -keep-going fails 
> > echos
> > Buildfile: failingTarget.xml
> > 
> > fails:
> > Target 'fails' failed with message
> > 'C:\apache-ant-1.6.0\bin\doesNotExist
> > not found.'.
> > 
> > BUILD FAILED
> >
>
C:\apache-ant-1.6.0\bin\failingTarget.xml:3:C:\apache-ant-1.6.0\bin\doesNotExist
> > 
> > not found.
> > Total time: 0 seconds
> > 
> > 
> > I would have expected that the echos target would
> > have been still been 
> > executed as it does not depend on the fails
> target?
> > 
> > Thanks in advance
> > Darins
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant 1.6 and -keep-going

Posted by Matt Benson <gu...@yahoo.com>.
Change thus:

> <project default="echos">
>         <target name="fails">
>                 <jar jarfile="jar16.jar"
> basedir="doesNotExist"/>
>         </target>
>         <target name="echos" depends="fails">
>                 <echo>Still echo on failure</echo>
>         </target>
> </project>
> 
> 
> As stated, the basedir for the jar task does not
> exist.
> The output from the commandline:
> 
> 
> 
> C:\apache-ant-1.6.0\bin>ant -buildfile
> failingTarget.xml -keep-going fails 
> echos
> Buildfile: failingTarget.xml
> 
> fails:
> Target 'fails' failed with message
> 'C:\apache-ant-1.6.0\bin\doesNotExist
> not found.'.
> 
> BUILD FAILED
>
C:\apache-ant-1.6.0\bin\failingTarget.xml:3:C:\apache-ant-1.6.0\bin\doesNotExist
> 
> not found.
> Total time: 0 seconds
> 
> 
> I would have expected that the echos target would
> have been still been 
> executed as it does not depend on the fails target?
> 
> Thanks in advance
> Darins
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org