maven有关笔记

来源:互联网 发布:手机摄影后期制作软件 编辑:程序博客网 时间:2024/05/20 19:48

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>

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

原创粉丝点击