I have seen similar questions asked, but their answers are not suitable for my question.
I have JDK 11 installed on my system(JAVA_HOME etc.) and configured in the Eclipse Java compiler option as well.
Now in my pom file, I am setting like...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>
Some other examples mention like..

Are these two things going to achieve the same thing ? If so, which one is a better method ?