After working for around an year in Flex, I moved back to Java platform again. While building the project I am working on, I saw the following error:
[INFO] ————————————————————————
[ERROR] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.6
Usage: javac
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
Logically I changed my PATH environment variable to make JDK bin folder point to JDK version 1.6. Even after making changes, it still didn’t work. It took me a quite a lot of time to figure out that maven uses JAVA_HOME variable for executing the build which was pointing to the obvious, i.e. JDK 1.5. I changed it and it worked like a glove.