search

Home  >  Q&A  >  body text

eclipse - eclispe 的maven依赖缺失问题

在eclipse中 我maven项目依赖了其他项目某个jar A, 但A所依赖的其他包都没被依赖进来,导致项目飘红。咋弄呢?反复删掉重新svn,maven更新啥的都没变化,求解~

说得不够详细,eclipse中依赖树是可视化的,有子依赖的话 会自动折叠成一个小三角形,但是很奇怪A的依赖旁边没有这个小三角形.......但是在其他机器上又是好的...

天蓬老师天蓬老师2799 days ago764

reply all(4)I'll reply

  • PHPz

    PHPz2017-04-21 11:17:46

    If you are using a public server instead of a private server, you should consider whether the package that a certain jar A depends on exists on the public server. If it is a private server, upload a copy if it does not exist

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-21 11:17:46

    1. Make sure A.jar is installed to the private repo using mvn install
    2. Is it okay for you to compile directly with maven? You can use mvn dependency:tree -Dverbose to look at the dependency tree
    3. Does m2e report any error messages

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:17:46

    Looking at the poster’s problem, it seems that the local project depends on the local project.
    Check if there are any errors in the pom.xml of project A. As long as there is an error, other dependencies will be red.
    Usually eclipse has prompts.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-21 11:17:46

    That’s because the transitivity of other dependencies in the jar A you depend on is not set up properly

    reply
    0
  • Cancelreply