bug宝典PYTHON篇 maven install问题

在jenkins中参数化构建,使用python执行命令mvn install -Dmaven.test.skip=true,提示如下异常

result is :[INFO] BUILD FAILUR
result is :[INFO] -----------------------------------------------------------------------
result is :[INFO] Total time: 5.237 
result is :[INFO] Finished at: 2016-12-03T19:45:36+08:0
result is :[INFO] Final Memory: 16M/168
result is :[INFO] -----------------------------------------------------------------------
result is :[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project monitor-api: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile failed: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.2 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-core:jar:2.0.9, org.apache.maven:maven-settings:jar:2.0.9, org.apache.maven:maven-plugin-parameter-documenter: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-repository-metadata:jar:2.0.9, org.apache.maven:maven-error-diagnostics:jar:2.0.9, org.apache.maven:maven-project:jar:2.0.9, org.apache.maven:maven-plugin-registry:jar:2.0.9, org.apache.maven:maven-plugin-descriptor:jar:2.0.9, org.apache.maven:maven-artifact-manager:jar:2.0.9, org.apache.maven:maven-monitor:jar:2.0.9, org.apache.maven:maven-toolchain:jar:1.0, org.codehaus.plexus:plexus-container-default:jar:1.5.5, org.codehaus.plexus:plexus-classworlds:jar:2.2.2: Could not transfer artifact org.apache.maven:maven-plugin-api:jar:2.0.9 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [Help 1
result is :[ERROR]
result is :[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch
result is :[ERROR] Re-run Maven using the -X switch to enable full debug logging
result is :[ERROR]
result is :[ERROR] For more information about the errors and possible solutions, please read the following articles
result is :[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionExceptio
maven fail

但是我使用此命令在windows的cmd窗口直接执行却有这样的问题
1
如何分析这个问题呢?于是我进入linux中monitor-api的目录,执行mvn install -Dmaven.test.skip=true,结果:
2
那么为什么使用python执行maven的命令却不行呢,困惑,继续排查。
这个时候再次执行jenkins自动化编译,居然通过了。
3
继续猜想,很有肯能跟下面的jar下载有关系。通过命令行执行很容易实现下载,但是python去执行反而不好下载对应的jar了
4

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

warrah

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值