ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Pearson <Al...@paramark.com>
Subject RE: Start/Restart
Date Thu, 17 Jan 2002 21:39:35 GMT
I don't believe there is any such automatic capability in ant.  You could
build it yourself if you were willing to do a (small) bit of work.

Here's my first idea how to do it. For each target that you want to not
rerun again or future runs of the build file, you put a <propertyfile> task
at the end that sets a property in a file which lets you know that the task
was run.  The target then uses the "unless" attribute to say it wont run if
the property is set.  Also you load the properties file at the beginning of
the project.  

Essentially:

<project name="test" default="main" basedir=".">
   <property file="incremental.properties" />

   <target name="main" depends="a,b" />

   <target name="reset">
	<delete file="incremental.properties"/>
   </target>

   <target name="a" unless="a-run" >
	<echo>running a</echo>
	<propertyfile file="incremental.properties">
	   <entry key="a-run" value="true"/>
	</propertyfile>
   </target>

   <target name="b" unless="b-run" >
	<echo>running b</echo>
	<propertyfile file="incremental.properties">
	   <entry key="b-run" value="true"/>
	</propertyfile>
   </target>

   <!-- do the same with other targets -->
</project>

> -----Original Message-----
> From: Krueger, Tom [mailto:Tom_Krueger@jeffersonwells.com]
> Sent: Thursday, January 17, 2002 1:10 PM
> To: Ant Users List
> Subject: RE: Start/Restart
> 
> 
> Yes, I believe that is how it does work.
> 
> I am looking to have it work a little differently.
> 
> if Target C depends on B and A and A and B succeed but C failes..
> Then the next time it is started I would like it to run C.
> 
> Basically, if some thing fails, I would like it to skip all 
> the targets
> that have already run successfully.
> 
> 
> Thanks for the help!
> 
> 
> 
> 
> -----Original Message-----
> From: T Master [mailto:tmaster@iknowledgeinc.com]
> Sent: Thursday, January 17, 2002 3:08 PM
> To: Ant Users List
> Subject: Re: Start/Restart
> 
> 
> incremental building.
> 
> The depends attribute of a target.  Read up on it.
> 
> if  Target C depends on B and A,  and A fails, then build fails..
> Then
> the next time ant is started for target C,  it will attempt A again.
> 
> 
> Of course I could be wrong :)
> 
> 
> ----- Original Message -----
> From: "Krueger, Tom" <Tom_Krueger@jeffersonwells.com>
> To: <ant-user@jakarta.apache.org>
> Sent: Thursday, January 17, 2002 2:02 PM
> Subject: Start/Restart
> 
> 
> >
> > Hello,
> >
> > Could someone tell me if ANT has any start/restart capabilities.
> >
> > I am looking for a way to kick off multiple steps, but if any step
> > fails, the next time the build.xml is run it will startup after the
> last
> > completed step.
> >
> > If ANT does not doe this, I would appreciate any 
> suggestions on other
> > tools.
> >
> >
> > Thanks for the help
> >
> >
> > Tom Krueger
> > Senior Software Developer
> > Jefferson Wells International
> > 414-615-1441 Phone
> > Tom_Krueger@JeffersonWells.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> >
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

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


Mime
View raw message