I am building a java project using maven. I have appointed the compiler source and target to 11 in the pom.xml.
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
However, when I execute mvn package
, I got an error message indicating class AccessControlException
in java.security
is deprecated and will be removed.
I'm really confused, since the AccessControlException
class is deprecated after JDK 17 while I am using JDK 11. Can anyone tell me what's wrong?
I've tried to compile my project both in IDEA and using command line, but getting this error all the time. When using IDEA, I've set the SDK and the language level of the project and all its modules to 11. I also set the maven runner JRE to use the prokect JDK.