You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sahoo <Sa...@Sun.COM> on 2007/11/29 15:04:52 UTC
Message from my annotation processor don't appear in console
Hi,
Recently I was writing an annotation processor [1] which gets called
from javac. JDK 6 javac exposes an API called Messager to be used to
report warnings or errors or diagnostic information. I noticed that if I
launch javac from command line, my messages appear in the output, but
when javac is invcoked by maven-compiler-plugin, my messages don't
appear. While debugging I found that maven passes StringWriter to javac
to write the messages to and javac is also writing to that object, so I
suspect maven is not subsequently printing the information available in
the StringWriter object. More information is available at [2].
Thanks,
Sahoo
[1]
http://weblogs.java.net/blog/ss141213/archive/2007/11/a_javac_plugin_1.html
[2] http://forum.java.sun.com/thread.jspa?threadID=5241006&tstart=0
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Message from my annotation processor don't appear in console
Posted by kristoffer <st...@gmail.com>.
Hi,
I do not have an answer to your question, sorry. But I wonder if you can
help me with a small problem i have?
Im trying to invoke the annotation processor from Maven, and i cannot get
Maven to invoke my processors during 'compile'..
It works fine with straight javac...
I have configured maven-compiler-plugin like so:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
<compilerArgument>-proc:only</compilerArgument>
</configuration>
</plugin>
Is there anything more that i have to do trigger my processor?
thanks,
-Kristoffer
Sahoo wrote:
>
> Hi,
>
> Recently I was writing an annotation processor [1] which gets called
> from javac. JDK 6 javac exposes an API called Messager to be used to
> report warnings or errors or diagnostic information. I noticed that if I
> launch javac from command line, my messages appear in the output, but
> when javac is invcoked by maven-compiler-plugin, my messages don't
> appear. While debugging I found that maven passes StringWriter to javac
> to write the messages to and javac is also writing to that object, so I
> suspect maven is not subsequently printing the information available in
> the StringWriter object. More information is available at [2].
>
> Thanks,
> Sahoo
>
> [1]
> http://weblogs.java.net/blog/ss141213/archive/2007/11/a_javac_plugin_1.html
> [2] http://forum.java.sun.com/thread.jspa?threadID=5241006&tstart=0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Message-from-my-annotation-processor-don%27t-appear-in-console-tp14026435s177p15480785.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org