JB--

  The goal of the APT compiler wasn't to replace the patch at
Codehaus; rather it was to make it possible to use "apt.exe" in place
of "javac.exe" during the compilation phase.  Since apt.exe is just a
superset of javac.exe, it seemed to make sense to have the Plexus
compiler implementations reflect that relationship in order to have
the most reuse / symmetry between the two.

  I noticed that the patch at Codehaus works during the
"generate-sources" phase of the build lifecycle, but apt can also be
used in instead of javac.  So, it seems like APT should work in both
places.  In order to use it in the generate-sources phase, how about
just re-hosting the APT compiler in a new plugin that works there.  In
looking at the plugin supporting Javac during the "compile" phase:

http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/

it doesn't seem like it would be difficult to do that.  Then, we can
support both use cases with the same APT compiler implementation.  How
would that sound?

  Mike, thanks for taking a look at apt.  If there's consensus in the
Maven community, I'll be happy to bundle the compiler up and attach it
to a JIRA issue.

Eddie




On 2/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> We have ready APT (and AspectJ) plugin prototypes. see:
> http://jira.codehaus.org/browse/MNG-2089
>
> By my opinion it is better if APT plugin acts before compilation or
> compilation is optional. Reason is, that Java compiler can be
> substituted with e.g. AspectJ compiler (in this mode have AspectJ
> better performance (incremental build)).
>
> best regards
> J.B.
>
> > Eddie, I just looked into apt and it looks really useful in the
> > long
> > term.  Obviously we haven't heard a lot of demand for it so far
> > but as
> > more and more packages start to require Java 5 (like JUnit 4) I
> > think we
> > will see an increasing number of packages wanting to use this
> > infrastructure in their build.
> >
> > This is my +1 to move it into either codehaus mojos or maven's
> > sandbox.
> >
> > -----Original Message-----
> > From: Eddie O'Neil [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, February 19, 2006 8:39 AM
> > To: dev@maven.apache.org
> > Subject: [m2] java 5's apt.exe as a compiler option?
> >
> > All--
> >
> > I'm interested in the status of Java 5 support in Maven,
> > particularly
> > around supporting the JDK's new tool bin/apt.exe which is Sun's
> > extension of javac.exe.  I've written an extension of
> > "plexus-compiler-javac" that adds support for "apt.exe" so that
> > annotation processors can be hosted at build-time to run
> > validation, do
> > code generation, etc.  An example of configuring this in a
> > project is
> > below.  This supports setting the APT options as well as the
> > javac
> > options; the code is here:
> >
> >
> >
> http://svn.apache.org/repos/asf/beehive/sandbox/maven2/maven-apt-compile
> > r/
> >
> > There's also this patch in Codehaus:
> >
> > http://jira.codehaus.org/browse/MNG-1672
> >
> > that adds a standalone plugin for apt.exe (not a new compiler)
> > but does
> > not support forked execution or the Javac options.
> >
> > Any thoughts on / status of support for apt.exe in M2?  I'm
> > happy to
> > contribute the M2 + apt compiler extension if that's
> > appropriate.
> >
> > Cheers,
> > Eddie
> >
> > :::
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-compiler-plugin</artifactId>
> > <configuration>
> > <compilerId>apt</compilerId>
> > <source>1.5</source>
> > <target>1.5</target>
> > <fork>true</fork>
> > <verbose>true</verbose>
> > <compilerArguments>
> >
> > <sourcepath>src/main/java;src/test/java</sourcepath>
> > <s>target/srcgen</s>
> >
> > <APTweb.content.root>src/main/webapp</APTweb.content.root>
> > </compilerArguments>
> > </configuration>
> > </plugin>
> > :::
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED] For
> > additional
> > commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to