Maven fails to find local artifact

后端 未结 14 1610
Happy的楠姐
Happy的楠姐 2020-12-04 11:40

Occasionally maven complains that a particular dependency, which is built and packaged locally, cannot be found in the local repository while building another project that h

14条回答
  •  萌比男神i
    2020-12-04 12:09

    When this happened to me, it was because I'd blindly copied my settings.xml from a template and it still had the blank element. This means that there's no local repository used when resolving dependencies (though your installed artifacts do still get put in the default location). When I'd replaced that with ${user.home}\.m2\repository it started working.

    For *nix, that would be ${user.home}/.m2/repository, I suppose.

提交回复
热议问题