maven遇到的错误 -----更新中
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了maven遇到的错误 -----更新中相关的知识,希望对你有一定的参考价值。
1.根据本地仓库中的jar包判断需要配置成哪个版本的,在pom.xml相应版本的配置
2.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project cboss-utility: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.5 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-api:jar:2.0.9, org.apache.maven:maven-artifact:jar:2.0.9, org.apache.maven:maven-project:jar:2.0.9, org.apache.maven:maven-settings:jar:2.0.9, org.apache.maven:maven-profile:jar:2.0.9, org.apache.maven:maven-model:jar:2.0.9, org.apache.maven:maven-artifact-manager:jar:2.0.9, org.apache.maven:maven-plugin-registry:jar:2.0.9, org.apache.maven:maven-core:jar:2.0.9, org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9, org.apache.maven:maven-repository-metadata:jar:2.0.9, org.apache.maven:maven-error-diagnostics:jar:2.0.9, org.apache.maven:maven-plugin-descriptor:jar:2.0.9, org.apache.maven:maven-monitor:jar:2.0.9, org.apache.maven:maven-toolchain:jar:2.0.9: Failure to find org.apache.maven:maven-plugin-api:jar:2.0.9 in http://20.26.11.22:7007/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
解决:有可能是版本过高,导致的插件不能使用,可以换一个合适的版本
3.maven找不到build path和maven dependencies library
因为.classpath和.project更改了
从别的maven项目中复制.classpath和.project ,吧.project中的项目名称换成你自己的项目名即可
4. maven编译的编码要跟代码编码一致才不会乱码
以上是关于maven遇到的错误 -----更新中的主要内容,如果未能解决你的问题,请参考以下文章
Maven学习总结一:安装Maven,以及myeclipse添加maven插件
阿里云Maven配置,Maven仓库配置,Maven镜像配置
Maven 实战-手动创建Maven项目,使用Maven编译