Sounds good to me, provided that the -always switch works as expected.
About the -sourcebase attribute: what if a user sets the sourcebase to the
source base of the rest of the project (so that the generated source files
wind up in the same place as the other sources)?
It would mean that they might be re-compiled when doing a build. This may
be what you want (i.e. you want to do a full, clean build, and it's
quicker to compile the kept sources than to rmic again), but how will this
affect the determination of whether or not the _Stub and _Tie classes are
up to date, when omitting the -always switch?
If there's a possible conflict here, maybe we should at least document the
behavior carefully (i.e. a warning that they should either set the
sourcebase to a separate directory, or exclude all _Stub and _Tie files
from compilation) to help people avoid this kind of mess.
grtz
Rob
Stefan Bodewig wrote:
> Let's take a step back here and think about why we need the name of
> the _Stub and _Tie files.
>
> There are two reasons:
>
> (1) Avoid running rmic on classes that are up to date - seems as if
> rmic would take care of this itself in the -iiop and -idl cases,
> that's why it supports the -always switch. Performing a test based on
> reflection in Ant to avoid invoking rmic (which will run the same test
> again if Ant determines it has to run) may create more overhead and
> take more time than running rmic in the -iiop and -idl cases
> unconditionally (which we have to do for -idl anyway).
>
> (2) Supporting the -keep switch - Ant copies the generated .java files
> back to the directory given in the sourcebase attribute. Here we
> really need this feature. Funny nobody has complained that
> soourcebase and iiop don't work in combination for Ant 1.3's rmic
> task, guess nobody is using it.
>
> For (2) we need to implement the reflection version - no other
> solution here. And we need to note that Ant doesn't support -keep for
> -idl without -iiop (where it doesn't make sense anyway).
>
> For (1) I'm rather leaning towards invoking rmic unconditionally,
> especially since we'll be getting bug reports that iiopopts="-always"
> doesn't work as expected otherwise.
>
> Stefan