zoukankan      html  css  js  c++  java
  • 解决:Could not resolve dependencies for project xxx: Could not find artifact xxx

    引言

    运行A module,找不到B module的依赖报错。A、B module都在project中。

    • 报错信息
    [INFO] Scanning for projects...
    [INFO] 
    [INFO] -----------------< com.totainfo.schedulingsystem:aps >------------------
    [INFO] Building aps 0.0.1-SNAPSHOT
    [INFO] --------------------------------[ jar ]---------------------------------
    [WARNING] The POM for com.totainfo.schedulingsystem.strategy:aps-strategy-schedule-wip:jar:0.0.1-SNAPSHOT is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  1.872 s
    [INFO] Finished at: 2021-12-30T20:55:47+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project aps: Could not resolve dependencies for project com.totainfo.schedulingsystem:aps:jar:0.0.1-SNAPSHOT: Could not find artifact com.totainfo.schedulingsystem.strategy:aps-strategy-schedule-wip:jar:0.0.1-SNAPSHOT -> [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.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
    
    Process finished with exit code 1
    

    原因分析

    我之前通过设置,将代码的build工作委托给了maven。

    所以我点击运行的时候,idea不会使用自带的build功能进行build,而是使用maven进行build。

    而点开看运行配置会发现,启动前的行为Build

    查看log可知maven只会build当前module,所以其它module的依赖找不到。

    解决方法

    修改运行配置,运行前Build Project

    点击运行,可以从log中看到maven将其它module也build了,问题解决。

  • 相关阅读:
    转换数值
    ASCII十进制字符集
    Metropolis-Hastings算法
    python + django 搭建网页(2)
    写一个脚本,循环运行 Projected-Hartree-Fock程序,然后提取结果
    写一个脚本,循环运行壳模型程序 bigstick.x,收集结果
    python画点线图
    python制作叠起来的柱状图,并且加上error bar
    python画散点图、大箭头
    python画柱状图,并且返回统计数据
  • 原文地址:https://www.cnblogs.com/daheww/p/15750662.html
Copyright © 2011-2022 走看看