1、 maven错误提示及解决方法:
maven install 出现错误提示: Build errors for carmall-manager; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3:enforce (enforce-banned-dependencies) on project carmall-manager: Execution enforce-banned-dependencies of goal org.apache.maven.plugins:maven-enforcer-plugin:1.3:enforce failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-enforcer-plugin:1.3:enforce: java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.getProjectBuilderConfiguration()Lorg/apache/maven/project/ProjectBuilderConfiguration; 可能的原因: 有可能你在使用的版本是maven3.X,其执行maven-ant-plugin的行为和maven2.x有一定的不同,需要引入pluginManagement 解决方法:在pom.xml中引入:<pluginManagement></pluginManagement> 之前的内容: <build> <plugins> <plugin></plugin> ... <plugin></plugin> </plugins> </build> 修改后的内容: <build> <pluginManagement> <plugins> <plugin></plugin> ... <plugin></plugin> </plugins> </pluginManagement> </build>