You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Rebhan, Gilbert" <Gi...@huk-coburg.de> on 2005/08/17 09:06:11 UTC

Build failed, but target executed partly nevertheless

Hi,

posting here, as i think that is an ant problem

i have a problem with my publisher, with a
CruiseControl workflow like that =

bootstrapper = get the latest Buildfiles for the project

build = starting a wrapper antscript that calls the buildscript

publisher = sending mails, moving/copying from several files after build
(created jar's, txtfiles...)

Problem in short terms :

1. the buildfile called from my wrapper fails because of 
compile errors, my publisher fails also, because the jar's
he should copy are not created. 

2. the move of txtfiles happens in the same target
of my publisher antscript as the copy of the jar's

<target name="publish">
     
     <fileset id="jarsfolder" dir="./temp/dist/lib/bla"
includes="**/*"/>
     <fileset id="jarsonly"   dir="./temp/dist/lib/bla"
includes="**/*.jar"/>
     
        <copy todir="${bla.jar.deploy}project" overwrite="true">
            <fileset refid="jarsfolder"/>
        </copy>      
        
        <move todir="./jars" flatten="true">
            <fileset refid="jarsonly"/>
        </move>
               
     <!-- Move*.txt and *.doc -->    
        <move file="${bla.txtquelle}${wordfile_move}"
todir="${bla.txtziel}/temp"/>   
        <move file="${auftragtxt}" todir="${bla.txtziel}"/>
    
    </target>

Question =

if i get a publisher failed the move for my txtfiles should
not execute but it does ?! How to ensure that the move of
txtfiles does not happen ?

Before i'll try on my own (because there have to altered
many parts in several scripts) :

Would it be sufficient moving the move of *.txt and *.doc in an extra
target ?
And do i have to create an additional 'success property' in the copyjars
target,
and ask for in the movetxt target with <target ... if="jarsuccess"> ?

Regards, Gilbert

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


Re: Build failed, but target executed partly nevertheless

Posted by Steve Loughran <st...@apache.org>.
Rebhan, Gilbert wrote:
> Hi,
> 
> posting here, as i think that is an ant problem
> 
> i have a problem with my publisher, with a
> CruiseControl workflow like that =
> 
> bootstrapper = get the latest Buildfiles for the project
> 
> build = starting a wrapper antscript that calls the buildscript
> 
> publisher = sending mails, moving/copying from several files after build
> (created jar's, txtfiles...)
> 
> Problem in short terms :
> 
> 1. the buildfile called from my wrapper fails because of 
> compile errors, my publisher fails also, because the jar's
> he should copy are not created. 
> 
> 2. the move of txtfiles happens in the same target
> of my publisher antscript as the copy of the jar's
> 
> <target name="publish">
>      
>      <fileset id="jarsfolder" dir="./temp/dist/lib/bla"
> includes="**/*"/>
>      <fileset id="jarsonly"   dir="./temp/dist/lib/bla"
> includes="**/*.jar"/>
>      
>         <copy todir="${bla.jar.deploy}project" overwrite="true">
>             <fileset refid="jarsfolder"/>
>         </copy>      
>         
>         <move todir="./jars" flatten="true">
>             <fileset refid="jarsonly"/>
>         </move>
>                
>      <!-- Move*.txt and *.doc -->    
>         <move file="${bla.txtquelle}${wordfile_move}"
> todir="${bla.txtziel}/temp"/>   
>         <move file="${auftragtxt}" todir="${bla.txtziel}"/>
>     
>     </target>
> 
> Question =
> 
> if i get a publisher failed the move for my txtfiles should
> not execute but it does ?! How to ensure that the move of
> txtfiles does not happen ?
> 
> Before i'll try on my own (because there have to altered
> many parts in several scripts) :
> 
> Would it be sufficient moving the move of *.txt and *.doc in an extra
> target ?
> And do i have to create an additional 'success property' in the copyjars
> target,
> and ask for in the movetxt target with <target ... if="jarsuccess"> ?

I dont understand what is failing here. If it is compilation/packaging, 
then publish should declare a dependency on the compile/package targets.

If it is <copy>, then it should already have stopped because copy should 
fail automatically when it encounters problems.

-steve

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