eclipse maven 項目報
Description Resource Path Location Type
Dynamic Web Module 3.0 requires Java 1.6 or newer. bdp line 1 Maven Java EE Configuration Problem
Description Resource Path Location Type
One or more constraints have not been satisfied. bdp line 1 Maven Java EE Configuration Problem
這個錯誤是很常見的。
而且設置了 java compiler 為 1.6 以上了還是無效。
解決方法:
在maven的pom.xml里添加依賴
<build><plugins><!-- define the project compile level --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.7.0</version><configuration><source>1.8</source><target>1.8</target></configuration></plugin></plugins></build>