maven 编译错误

maven这个东西是很不错,不仅仅是一个编译工具,还能帮你做一些自动的项目管理工作,很值得推荐,当然缺点也是有的,就是不如ant那样容易上手,而且你自己控制classpath很麻烦。今天在使用ant的时候出现了一个错误,错误如下: 

have occasion to build at locations where I don't have internet access but I do have access to a cvs repository where I have added
my local maven repository. So I build a local repository with a check out from cvs and then I build my project with 'mvn -o clean install'.
However I get the following error:
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-site-plugin' does not exist or no valid version could be found
[INFO] ----------------------------------------------------------------------------

but it's there!

ls ~/.m2/repository/org/apache/maven/plugins/maven-site-plugin/2.0-beta-4/
CVS maven-site-plugin-2.0-beta-4.jar maven-site-plugin-2.0-beta-4.pom

While testing this build process I have internet access and if I remove ~/.m2/repository/org/apache/maven/plugins/maven-site-plugin/2.0-beta-4 and build 'online' the same files (maven-site-plugin-2.0-beta-4.jar,maven-site-plugin-2.0-beta-4.pom)
end up in the same place (~/.m2/repository/org/apache/maven/plugins/maven-site-plugin/2.0-beta-4/) and the build works.

使用maven的多个办法也是如此,找了n久,终于发现应该是网络的问题,在maven的config下配置setting里面总价一个代理配置,一切ok。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值