- Description Resource Path Location Type
Build path specifies execution environment JavaSE-1.7. There are no JREs installed in the workspace that are strictly compatible with this environment. oto Build path JRE System Library Problem
新建maven webapp項(xiàng)目后出現(xiàn)胖烛,目前的編譯環(huán)境需要的是javase 1.7,而我電腦上的是1.8,因而需要配置運(yùn)行環(huán)境為1.8
解決辦法:找到pom.xml中maven-compiler-plugin配置
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
</plugin>
修改如下:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF8</encoding>
</configuration>
</plugin>
- Classpath entry org.maven.eclipse.MAVEN2_CLASSPATH_CONTAINER will not be exported or published
需要將navigator視圖下.classpath文件中砖顷,添加
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
添加元素如下
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
然后右擊項(xiàng)目 -> propertier -> java build path -> order and export 下選中 Maven,點(diǎn)擊確定莺债,最后clean項(xiàng)目即可紧憾。
mvn插件庫(kù):https://mvnrepository.com/