修改本地maven,setting.xml,在激活的profile中加入以下代码
<profile> <id>jdk-1.7</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.7</jdk> </activation> <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion> </properties> <repositories> <repository> <id>anyline</id> <url>http://maven.anyline.org/repository/maven-public</url><!--主要是这里--> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled><!--以及这里--> </snapshots> </repository> </repositories> </profile>