改maven下创建的动态网站依赖的jre版本

问题描述

通过maven创建一个动态网站后,eclipse会提示一个提醒

Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.

解决办法

  1. 更改项目的pom.xml文件
    在根标签下新增:
	<plugins>  
   	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-compiler-plugin</artifactId>
		<version>3.1</version>
		<configuration>
	        <source>1.8</source>
	        <target>1.8</target>
	    </configuration>
    	</plugin>
    </plugins>
  </build>
posted @ 2018-07-11 19:04  donfaquir  阅读(236)  评论(0编辑  收藏  举报