创建maven web工程,报如下错误:
Cannot detect Web Project version. Please specify version of Web Project through <version> configuration property of war plugin. E.g.: <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <version>3.0</version> </configuration> </plugin>
解决方案:
在pom.xml添加如下代码
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<version>3.0</version>
</configuration>
</plugin>
</plugins>
</build>
由于项目未指定maven war编译插件,添加以上代码后Run Maven4MyEclipse->Update Project or use Quick