Time for action – adding Java version properties in pom.xml
We successfully added all the required jars to our project, but we need to perform one small configuration in our pom.xml
file, that is, telling Maven to use Java Version 7 while building our project. How do we tell Maven to do this? Simply add two property entries in pom.xml
. Let's do this.
- Open
pom.xml
. You will see some tabs at the bottom ofpom.xml
; select the Overview tab from the bottom ofpom.xml
, expand the properties accordion, and click on the Create button. - Now, an Add property window will appear; enter Name as
maven.compiler.source
and Value as1.7
.
Get Spring MVC Beginner’s Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.