Cannot change Dynamic web module to 3.0

导入旧的maven时出现以下错误:

Type Dynamic Web Module 3.0 requires Java 1.6 or newer

Cannot change version of project facet Dynamic web module to 3.0;

解决路径

1、pom里首先指定build相关的代码。

<build>
		<plugins>
			<!-- compile tasks -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<inherited>true</inherited>
				<version>3.3</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<skipTests>true</skipTests>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>2.6</version>
			</plugin>
		</plugins>
	</build>



2、web.xml是看version是否为3.0.另外.setting目录下“org.eclipse.wst.common.project.facet.core.xml”里的“jst.web”为3.0;


草木全
分享到:
共 0 条  此列表为空  当前1/1页

© 2014 究问社区 copyRight 豫ICP备13003319号-1