ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: hotswap via ant
Date Thu, 01 Apr 2004 14:46:20 GMT
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">
     ... some pattern to apply to the classes dir ...

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!


Quoting Steve Loughran <>:

> wrote:
> > I'd like to not only build (using Ant) when I'm using VIM, but hotdeploy
> the
> > class changes to a running app. I use ant.vim and it works very nicely.
> Then, I
> > wrote a hotswap client using JDI. Now, I can run that via the commandline,
> but
> > I'd rather integrate it into Ant.
> > I toyed with doing a separate task, but I thought I'd just end up redoing
> some
> > code that was already in <javac>. So, for a proof of concept, I've added
> some
> > attributes to the <javac> task and am in the process of finishing the
> > connections to the hot swap code. Basicly, once the compile is done, if
> hotswap
> > was enabled, it would connect to the VM and push those class files over.
> > 
> > First, does anyone have any better idea of how I could integrate the
> hotswap
> > feature into Ant?
> > Second, is there a good way to get a list of the actual fully qualified
> class
> > names that were compiled? I have the list of files, but I'd have to try to
> > parse out the class name, which I don't have a good solution for yet. I
> just
> > really need the classes dir (destDir) and the names of all the classes to
> be
> > replaced in the VM.
> > 
> Better to make it a separate task, if possible.
> One problem with getting a list of compiled classes is that the compiler 
> (be it javac, jikes, etc), makes its own mind up. So not even javac knows.
> A separate <hotswap> task could take a fileset of classes, and maybe 
> some timestamp file; all files after the timestamp file are deployed & 
> the timestamp file is touched.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message