开发者

Maven simply replace 1 dependency in a remote repository

First of all I want to say that I'm completely new to maven. So here is my question:

I just forked an open-source project which uses maven(let's call it project A). In the pom.xml there is a remote repository defined(maintained by the original authors of project A) and it grabs a couple of .jar files from there because they are dependencies. I adjusted something in the project I forked, and everything work开发者_运维百科s fine, I can compile it and run it.

My problem is though that I just discovered I have to change something in one of the dependencies, luckily that dependency is also open-source, so I forked that too and made the needed adjustments(project B, also a maven project) and compiled it, everything worked fine so far. The problem I have now is: how do I tell maven that it has to grab my adjusted "project B", but still grab the rest of the dependencies from the remote repository when building project A?

I tried to use the "system" scope for the dependency, but that didn't work since it just doesn't include "project B" in the .jar anymore.


Cut a new release of the changed library with a new version. Then it will automatically pick it up whereever it can find it.

If you can not cut an official release you can build it locally and as a bonus install it in a repository manager.

And do NOT use system scope.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜