使用eclipse 导入maven项目spring-mvc-showcase出现如下错误
在使用eclipse导入maven项目spring-mvc-showcase的时候出现了错误:
Multiple annotations found at this line: - Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3:test- compile (execution: default, phase: test-compile) - Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin: 1.3:compile (execution: default, phase: compile)
在eclipse运行 maven install的时候出现了如下错误log:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project spring-mvc-showcase: Error occurred in starting fork, check output in log -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
后来发现是pom.xml文件aspectj-maven-plugin插件的问题
然后把关于aspectj-maven-plugin的标签替换成下面的就解决了
<plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <versionRange>[1.0.0,)</versionRange> <goals> <goal>some-goal</goal> </goals> </pluginExecutionFilter> <action> <ignore /> or <execute /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin>
可能是插件的版本不对应
As for Maven/M2E, you need to familiarize yourself with http://wiki.eclipse.org/M2E_plugin_execution_not_covered. Then you need to add something like this to your pom.xml
参考http://stackoverflow.com/questions/20181731/cannot-run-spring-mvc-example
来源://作者:/更新时间:2014-01-18
顶
踩
相关文章:
- java 参数传list多个对象数据的方法
- 解决Error querying database. Cause: java.lang.Ill
- 解决org.springframework.beans.factory.BeanCreation
- org.apache.ibatis.builder.BuilderException: Error
- java.util.concurrent.ExecutionException: Failed to
- HttpHostConnectException: Connection to http://jsj
- java 通过batik 把svg格式的矢量图生成png图片
- linux debian安装java jdk开发环境
- java 跳出多从循环,跳到指定的循环处
- java.net.SocketException: No buffer space availabl