I had to discover I have Java code in my project, which compiles and runs fine in Eclipse, but throws a compilation error in javac.
A self-contained snippet:
Add the next plugin to your pom.xml:
maven-compiler-plugin 2.3.2 1.6 1.6