You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jason Sando <js...@think1up.com> on 2000/05/25 18:39:16 UTC

How to tell what Javac did?

Is there any way/plans to conditionally do tasks depending on whether javac
did anything or not?

I have some class post-processing and some reflection/source code generation
after the compile step, it would be ideal if it only invoked this step if
javac actually did anything.

Thanks,

-j


Re: How to tell what Javac did?

Posted by Ernst de Haan <er...@c187104187.telekabel.chello.nl>.
Stefan wrote:
>  JS> I have some class post-processing and some reflection/source code
>  JS> generation after the compile step, it would be ideal if it only
>  JS> invoked this step if javac actually did anything.
> 
> Wouldn't it be better to code your post processing so that it can
> determine whether it has some work to do itself? Maybe you could just
> compare the creation dates of the class files with the dates of your
> generated output?

+1


Ernst

RE: How to tell what Javac did?

Posted by Jason Sando <js...@think1up.com>.
> From: Stefan Bodewig [mailto:bodewig@bost.de]
>
> >>>>> "JS" == Jason Sando <js...@think1up.com> writes:
>
>  JS> I have some class post-processing and some reflection/source code
>  JS> generation after the compile step, it would be ideal if it only
>  JS> invoked this step if javac actually did anything.
>
> Wouldn't it be better to code your post processing so that it can
> determine whether it has some work to do itself? Maybe you could just
> compare the creation dates of the class files with the dates of your
> generated output?
>

You are correct, its the only option.  I'm generating source and exec'ing
javac/jikes, so the "targets" may not even be present in the file system.
Knowing what the javac task did incrementally doesn't ensure that all my
generated classes are up to date.

thanks,

-j


Re: How to tell what Javac did?

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "JS" == Jason Sando <js...@think1up.com> writes:

 JS> I have some class post-processing and some reflection/source code
 JS> generation after the compile step, it would be ideal if it only
 JS> invoked this step if javac actually did anything.

Wouldn't it be better to code your post processing so that it can
determine whether it has some work to do itself? Maybe you could just
compare the creation dates of the class files with the dates of your
generated output?

Stefan