Hi Thomas,

Apparently, I failed a couple of times to make myself clear and did not run
my tests thoroughly enough.

1. Yes, you're right, from the command line, only javac 1.8 displays the
error message. Javac 1.7 does not display anything (being OpenJDK's or
Oracle's).
2. No, I have never seen a build with a warning. I was describing what I
was expecting from Maven. Also, turns out I had messed my env variables up
and was always running Maven with java 1.7. When running Maven with Java
1.8, the build does fail as you describe.

So, for the second bug, the conclusion is: run maven with Java 1.8 to get a
nice failing build and if a problem there was, it really was between the
chair and the keyboard.

Sorry for the bother, but I did learn quite a lot.

Thanks

Sébastien Lesaint

2015-02-23 10:28 GMT+01:00 Thomas Broyer <t.bro...@gmail.com>:

> On Mon Feb 23 2015 at 09:53:24 Sébastien Lesaint <
> sebastien.lesa...@gmail.com> 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