On Mon Feb 23 2015 at 09:53:24 Sébastien Lesaint <
[email protected]> wrote:

> Hello,
>
> Thanks Thomas for your extensive answer. But you seemed to focus only on
> the first problem (which I had identified as potentially _not_ a bug).
>
> What about the fact that m-compiler-p ignores the error returned by Javac
> and allows the build to continue ?
>
> Right now, I have a successful build (it's a demo, there is no test
> defined) and there is just nothing working. I would be far more
> comprehensive if the javac error was reported, the build failed and a quick
> google search would pop the workaround (either proc:none or use
> @AutoService) for that specific error.
>
> WDYT ?
>

This is rather strange.

When using OpenJDK 7, the build "succeeds" without actually compiling
anything; and if I run javac manually with the options taken from "mvn -X"
output, it also "succeeds", without any warning about the missing processor
(even when also passing -Xprefer:source -XprintProcessorInfo -XprintRounds
and/or -verbose; with -XprintRounds we clearly see there's a problem
though: only one round, with "last round: false").

When using OpenJDK 8 however, the build fails with a clear error:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project test: Compilation failure
[ERROR] Bad service configuration file, or exception thrown while
constructing Processor object: javax.annotation.processing.Processor:
Provider foo.bar.BazProcessor not found

So it looks like it could be a Javac bug that's been fixed in Java 8.

I don't reproduce the same behavior as the one you describe though (build
passing with warning). Tests conducted with Maven 3.0.5 and Maven 3.2.3 on
Ubuntu 14.10 with the Ubuntu-provided OpenJDK versions, and default
m-compiler-p version from the Maven super-pom.

Reply via email to