ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: hotswap via ant
Date Thu, 01 Apr 2004 17:59:50 GMT
http://ant.apache.org/manual/CoreTypes/selectors.html#dateselect

You would have to use a nested <format> element in
your <tstamp> to create the date in the right format
for the date selector, but aside from that I can't see
any problems...

-Matt

--- dak@dotech.com wrote:
> This sounds good to me! The less grunt work I have
> to do in my task, the better!
> I grabbed teh 1.6.1 source release and built it. If
> you could point me to the
> <date> file selector you mention, it would help me a
> lot. I just poked around
> and it didn't jump out at me. I would like it if my
> task could just deal with a
> list of class files provided via some built-in
> filtering means.
> 
> Thanks,
> David
> 
> Quoting Matt Benson <gudnabrsam@yahoo.com>:
> 
> > Basically you should make any task as atomic as
> > possible.  So all your task would need to know
> about
> > is a <fileset>.  Then it becomes the user's
> problem
> > how to select which files to include.  One way
> might
> > be to use a <tstamp>
> > to set a baseline time, then compile, then use a
> > <date> file selector to get the updated classes. 
> > Another way might use ant-contrib's <outofdate> to
> > determine which sources should be recompiled.  You
> > could then compile only those sources to some
> > temporary build area, then hotswap only those
> classes.
> >  The point is that others have designed ways in
> which
> > the files can be selected, so you gain maximum
> > flexibility (and minimum RESPONSIBILITY) the less
> your
> > Task is expected to do.
> > 
> > -Matt
> > 
> > --- dak@dotech.com wrote:
> > > When I was toying with a separate task, I
> wondered
> > > if <uptodate> could be use
> > > somehow to create a <fileset>. I don't see now,
> but
> > > that would sure be a nice
> > > feature. Then, if I could assign an ID so I
> could
> > > make a <fileset> of files
> > > that aren't uptodate, run the compile, then take
> > > that same <fileset> as input
> > > to the <hotswap> target.
> > > The idea of a timestamp file could work. The
> > > sequence might be something like.
> > > <touch file="timestamp"/>
> > > <javac .../>
> > > <hotswap classesdir="foo" host="localhost"
> > > port="9000" timefile="timestamp">
> > >   <patternset>
> > >      ... some pattern to apply to the classes
> dir
> > > ...
> > >   </patternset>
> > > </hotswap>
> > > 
> > > That way, the hotswap task would check the files
> in
> > > the classes dir based on the
> > > patternset and/or the timestamp.
> > > 
> > > Seriously, I'm open to feedback. I might as well
> do
> > > it right the first time!
> > > 
> > > David
> > > 
> > > Quoting Steve Loughran <steve_l@iseran.com>:


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


Mime
View raw message