Install local jar dependency as part of the lifecycle, before Maven attempts to resolve it

后端 未结 3 2083
Happy的楠姐
Happy的楠姐 2020-12-28 17:04

Because of some incompatibilities between two dependencies, I was forced to make a shaded version of one of my dependencies. This means my project now depends on a local .ja

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-28 17:09

    Do the shade execution in one subproject (call it S), it eats version (a) of your problem dependency, and produces your own G/A/V'd result. Configure shade to produce the main output of the subproject. In other words, S produces group:artifact:version which are all completely different from the coordinates of the thing you are starting from that you need two version of.

    In your other subprojects, just declare (S) as the dependency to get the shaded version, and then you can also declare the unshaded other version.

    This is all assuming that you renamed the packages when you shaded.

    There's no need for install:anything.

提交回复
热议问题