You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Michael Saunders <mi...@amtec.com> on 2000/09/06 16:12:27 UTC

Factory method needed for Javac taskdef?

To all:

I was noticing that the Javac taskdef is slowly expanding to include more and
more popular compiler types. Is it possible that this indicates the need for a
factory method responsible for fetching the compiler of choice and then sending
messages to it through a simple interface containing a method like doCompile()?

Does anyone have any ideas how one might load a factory for a taskdef such as
Javac? I wonder if some kind of general Factory taskdef could be developed to
install a factory for the Javac taskdef and possibly others that had similar
needs but different interfaces. Or maybe it should simply be a fully qualified
class name given as an attribute to the Javac taskdef where Sun's implementation
is the default if one is not specified.

Michael

Re: Factory method needed for Javac taskdef?

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "MS" == Michael Saunders <mi...@amtec.com> writes:

 MS> I was noticing that the Javac taskdef is slowly expanding to
 MS> include more and more popular compiler types.

You are not the only one 8^).

There are other tasks that would need handling like this (jar has an
alternative named fastjar, rmic has jiffy, some idljava task would
probably have several vendor specific implementations).

Building separate classes for the special compilers (like XSLTProcess
does with XSLTLiaison) might be a starting point. One issue you won't
catch with this is the one of options that are only present in single
implementations (take the various build.compiler.* properties for
jikes as an example).

This problem should be solved at the same time - and I'm very open to
suggestions.

Stefan