dallinski dallinski - 1 month ago 6x
Java Question

IntelliJ target bytecode reverting

For a project that I'm currently working on, IntelliJ gave me the compile error

Error:java: javacTask: source release 8 requires target release 1.8
. I went into Settings>Build, Execution, Deployment>Compiler>Java and saw that the target bytecode version for one of my modules was set to 1.5, so I changed it to 1.8, compiled, and it worked. But then the next day, I got the same error. I went into settings and the target bytecode for that one module was back at 1.5. I changed it to 1.8 and it compiled/ran just fine. This has now happened multiple times and I am frustrated by the number of times I have to go into settings to manually change the target bytecode version.

Why does the target bytecode version keep reverting? I don't have 1.5 specified in the pom or anywhere else, so I am baffled as to why the bytecode version keeps getting set to 1.5.


You need to dd this to your POM: