加载maven install 报错时报错求助

导入maven项目总报错,Eclipse中Maven工程缺少Maven Dependencies - 博客频道 - CSDN.NET
为梦想而飞
心多大!梦就多大!
分类:java
原因如果是:&Eclipse在引入Maven工程后,找不到Maven Dependencies。使得代码报错,具体如下图所示:
而正常的maven项目是这样的
要解决这样的问题,就是重新加载,使maven的jar导入即可。有多种方法。
而这里介绍一超强的方法。如图
具体步骤:右击 Maven project --& Macven --& Enable Dependency Management,原因是Maven project的Maven选项未开启或启动无效。
这样问题就解决了!
排名:第17791名
[ 职业 ]: java工程师
[ 总述 ]: 一个曾经以为可以改变世界的年轻人
[ 致自己 ]
世界有多残酷,
我们就该有多坚强!
[ 联系 ]: zhoudong_
(3)(1)(9)(3)(1)(14)(2)(35)(1)(6)(1)(5)(2)(5)(3)(4)(0)(2)(1)maven新建项目时报错 - ITeye问答
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
[ERROR] Failed to parse plugin descriptor for org.apache.maven.plugins:maven-re
ources-plugin:2.5 (C:\Users\Administrator.DADI\.m2\repository\org\apache\maven\
lugins\maven-resources-plugin\2.5\maven-resources-plugin-2.5.jar): error in ope
ing zip file -& [Help 1]
这个谷歌一下就出来了
可以尝试删除maven本地库里面的org.apache.maven.plugins:maven-resources-plugin所在目录,让mavan重新下载这个包就行了。
I fixed it by deleting all the files under de .m2 repository folder. The next time I built the project I had to download all the dependencies again but it was worth it - 0 errors!!
/questions//could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources
已解决问题
未解决问题maven依赖本地非repository中的jar包-依赖jar包放在WEB-INF/lib等目录下的情况客户端编译出错的处理
时间: 13:56:42
&&&& 阅读:37773
&&&& 评论:
&&&& 收藏:0
标签:&&&&&&&&&&&&&&&&&&&&&&&&maven依赖本地非repository中的jar包&
/piaolingxue/archive//2208871.html
博客分类:&MAVEN&今天在使用maven编译打包一个web应用的时候,碰到一个问题:&项目在开发是引入了依赖jar包,放在了WEB-INF/lib目录下,并通过buildpath中将web libariary导入。&在eclipse中开发没有问题,但是使用maven编译插件开始便宜总是报找不到WEB-INF/lib这个jar包中的类。&显然实在编译的时候WEB-INF/lib并没有配置到maven-complier-plugin插件src目录中去,&于是将这个目录添加进去,还是不好使。无赖,先把这个jar包安装到本地库中,然后添加dependency。&后来google了下,发现maven提供了scope为system的依赖,文档的原文如下:&system&This scope is similar to provided except that you have to provide the JAR which contains it explicitly.&The artifact is always available and is not looked up in a repository.&这样就可以添加dependency而不需要再将WEB-INF/lib目录下的jar包安装到本地库中了。&具体配置录下:&Xml代码&&dependency&&&groupId&org.apache&/groupId&&&artifactId&test&/artifactId&&&version&1.0&/version&&&scope&system&/scope&&&systemPath&${basedir}/src/main/webapp/WEB-INF/lib/paypal_base.jar&/systemPath&&&/dependency&&
!更好的方式是配置编译参数&compilerArguments&,添加extdirs将jar包相对路径添加到配置中,如下:
&build&&&&&&&& &plugins&&&&&&&&&&&& &plugin&&&&&&&&&&&&&& &artifactId&maven-compiler-plugin&/artifactId&&&&&&&&&&&&&& &configuration&&&&&&&&&&&&&&&&&& &source&1.6&/source&&&&&&&&&&&&&&&&&& &target&1.6&/target&&&&&&&&&&&&&&&&&& &encoding&UTF-8&/encoding&&&&&&&&&&&&&&&&&& &compilerArguments&&&&&&&&&&&&&&&&&&& &extdirs&src\main\webapp\WEB-INF\lib&/extdirs&&&&&&&&&&&&&&&&& &/compilerArguments&&&&&&&&&&&&&& &/configuration&&&&&&&&&&&& &/plugin&&&&&&&& &/plugins&&&& &/build&标签:&&&&&&&&&&&&&&&&&&&&&&&&
&&国之画&&&& &&&&chrome插件
版权所有 京ICP备号-2
迷上了代码!安装与配置windows版maven与常见错误_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
安装与配置windows版maven与常见错误
上传于|0|0|文档简介
&&安装与配置windows版maven
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩7页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢

我要回帖

更多关于 maven install 报错 的文章

 

随机推荐