Thanks, So, as far as I understand, in the current code, I would have to add an ajc.java file in the compilers package which would extend DefaultCompilerAdaptor. Basicallly I can copy paste the code from the Javac12 or Javac13 adaptors with a few changes if the command line options supported by ajc and javac are different. Did I get it right ?
The <javac> task uses the build.compiler property to get a CompilerAdaptor and that property is set for the whole project file, there is no way to reset it to another value for the scope of a certain target. So that means that I am "stuck" with the same compiler for all the java files in my tree ? If I want, for some wierd reason, to compiler part of some tree with a different compiler than the rest, then I have to do it in 2 steps, with two different project files: In the first project I compile some files with javac then I change the build.compiler property in .ant.properties and then I run thesecond project in which i define another fileset attribute for the javac target and i use ajc as loaded from build.compiler/ Does this make sense, or I just have to get 2 separate complete trees , one compiled with javac and one witj ajc ? Ioan Diane Holt wrote: > > --- Ioan Mitrea <[EMAIL PROTECTED]> wrote: > > Should I write a task which extends the <javac> task with an attribute > > which can point to ajc or javac? > > Or should the javac task itself be modified to support this ? > > Depends on whether you're running Ant 1.2 or latest CVS. In Ant 1.2, you'd > add the 'ajc' support to Javac.java (see the 'jikes' and 'jvc' compilers > for examples). For latest CVS, the <javac> task has been reworked to allow > other compiler support in a different way -- see both Javac.java and the > "compilers" subdirectory, in: > http://jakarta.apache.org/cvsweb/index.cgi/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ > > Diane > > ===== > ([EMAIL PROTECTED]) > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
