Eclipse 异常处理记录

xiaoxiao2021-02-28  76

1.one or more constraints have not been satisfied

解决办法:

maven项目倒入后problem提示:one or more constraints have not been satisfied。

(1)、有可能是你的jdk版的过低了。如下

      <plugin>    <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin>

 你的pom.xml文件里的maven-compiler-plugin设置编译是1.6 ,但项目中的编译可能是1.7的,所有统一一下。

(2)、在你的pom.xml文件下没有添加:

    <plugin>     <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin>

     这句话所导致的,添加即可。

2.cannot change version of project facet Dynamic web module to 2.5

解决办法: 在工程目录下有一个.settings文件夹,打开org.eclipse.wst.common.project.facet.core.xml做如下修改:<installed facet="jst.web" version="2.5"/>(可以根据jdk的版本修改为相对性的jst.web版本)
转载请注明原文地址: https://www.6miu.com/read-53747.html

最新回复(0)