我特林创建Maven的web应用程序,我遵循这个指南:http://www.youtube.com/watch?v=YeC7XQho-O0创建的Tomcat - 用在Ubuntu日食Maven项目
当我创建这个项目它说,这样的警告:
There are no JREs installed in the workspace that are strictly compatible with this environment. testM6 Build path JRE System Library Problem
我.pom文件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ac.web.test</groupId>
<artifactId>testM6</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>testM6</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
,当我尝试切换到这个版本标签:
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</build>
我得到这样的警告:
Description Resource Path Location Type
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.
testM6 Build path JRE System Library Problem
我错过了什么?
谢谢了所有
我解决这个Warning - Build path specifies execution environment J2SE-1.4
,但我不明白为什么它不会自动
您是否安装了Java? – FazoM
只是出于兴趣 - 是否有一个原因,你为什么使用旧的2.4 servlet api而不是3.x? – 1615903
不,它只是Eclipse所做的,我会尽快用新的api替换,但是感谢您的通知 –