ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Resuming the build process
Date Wed, 21 Apr 2004 14:44:59 GMT
That kind of comes back to the idea of "manufacturing"
a target file.  You might do something like this:

<target name="-checklabels">
  <available property="label.done" file="label.done"
/>
</target>

<target name="applylabels" depends="-checklabels"
        unless="label.done">
  <!-- apply the label -->
  <touch file="label.done" />
</target>

<target name="clean">
  <delete file="label.done" />
</target>

There are variations, but maybe this will get you
started.

-Matt

--- "Stratton, Jason" <Jason.Stratton@us.ing.com>
wrote:
> Matt,
> 
> Thank you. Yes, that makes sense.
> 
> But for instance, we are using the ant build to
> label and get the source tree from PVCS. I suppose
> we could perform some test to discover whether a
> file has the label, but if an error occurred in the
> labeling process, would every file need to be
> checked? If so, then it might be simpler (and less
> time consuming?) to just re-label the whole tree.
> 
> I was hoping that there might be a reasonably
> generic solution within ant to just continue with a
> particular target.
> 
> Jason
> 
> -----Original Message-----
> From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
> Sent: Wednesday, April 21, 2004 10:04 AM
> To: Ant Users List
> Subject: Re: Resuming the build process
> 
> 
> Normally this is accomplished by making each target
> contain enough dependency analysis to avoid
> processing
> any "source files" for which the "target files" are
> up-to-date.  This way, all targets run, but don't do
> anything unless they need to.  In some cases, you
> might manufacture (touch) a target file if the
> source-target paradigm doesn't quite fit what you
> are
> trying to do.  But for the most part, in a build,
> you
> start processing one or more files with the intent
> of
> creating or updating one or more other files, right?
> 
> -Matt
> 
> 
> --- "Stratton, Jason" <Jason.Stratton@us.ing.com>
> wrote:
> > Hi All,
> > 
> > We have a significantly long build process for our
> weekly/quarterly 
> > build. If an error occurs in any stage of the
> build, we currently have 
> > to re-run the whole build, which is probably what
> we want to do in
> > most cases anyway, but when we are working on the
> > build process itself for example, we would like to
> > resume the build at the stage where the error
> > occurred.
> > 
> > Like most ant build files (that I've encountered
> > anyway), we have a series of targets that depend
> on
> > other targets, more or less like the following:
> > 
> >   <target name="first">
> > ...
> >   <target name="second" depends="first">
> > ...
> >   <target name="third" depends="second">
> > ...
> > Etc.
> > 
> > Now suppose an error occurs during the execution
> of
> > the target "second". How would one resume the
> > process with the "second" target, skipping the
> > "first"?
> > 
> > I can think of some brute force ways of doing.
> Such
> > as creating a parallel series of targets that
> > eliminate the depends attribute at the key stages.
> > Or adding an if attribute to each target and
> adding
> > an entry into the build.properties for each stage
> to
> > skip. What I was hoping to get out of this enquiry
> > is some elegant solutions that may have been
> > developed.
> > 
> > Thank you.
> > Jason
> > 
> >
>
------------------------------------------------------------------------------
> > NOTICE: The information contained in this
> electronic
> > mail message is confidential and intended only for
> > certain recipients.  If you are not an intended
> > recipient, you are hereby notified that any
> > disclosure, reproduction, distribution or other
> use
> > of this communication and any attachments is
> > strictly prohibited.  If you have received this
> > communication in error, please notify the sender
> by
> > reply transmission and delete the message without
> > copying or disclosing it.
> >
>
==============================================================================
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25 http://photos.yahoo.com/ph/print_splash
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
------------------------------------------------------------------------------
> NOTICE: The information contained in this electronic
> mail message is confidential and intended only for
> certain recipients.  If you are not an intended
> recipient, you are hereby notified that any
> disclosure, reproduction, distribution or other use
> of this communication and any attachments is
> strictly prohibited.  If you have received this
> communication in error, please notify the sender by
> reply transmission and delete the message without
> copying or disclosing it.
>
==============================================================================
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25
http://photos.yahoo.com/ph/print_splash

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


Mime
View raw message