To make Maven use the ecj compiler you need to use the plexus-compiler-eclipse plugin and nothing else. I hope this helps to set things straight. To use the Eclipse Compiler inside Maven is not too hard, but there is a lot of misinformation and old information on the Internets which causes a lot of confusion. When applied rigorously this teaches you to code way more safe (by preventing null values) and it prevents NPE exceptions during testing or production. One of the most interesting things in the compiler is the addition of null types inside the compiler: by annotating your code with and annotations you can force the Eclipse compiler to check null accesses at compile time instead of runtime. It is fast, and it has way more warnings and errors that can be configured, improving code quality. The Eclipse Java Compiler (ecj) has a lot of advantages over the standard javac compiler.
0 Comments
Leave a Reply. |