My code contain class such as Postconstruct and PreDestroy. When I run mvn compile command using java 11 and Java 8 compilation is getting failed. What could be the possible causes for this issue.
Note: I cannot use Java 11 in my code since my code has dependency on Java 8
I can’t tell you why compilation with Java 11 is getting failed. And, if you must compile with Java 8, you can change the JVM before running mvn sonar:sonar. See the documentation on Scanner Environment.