Java中的依赖管理 [英] Dependency management in java

查看:37
本文介绍了Java中的依赖管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现了一个工具,并且希望将其开源.

I implemented a tool and I want to make it open source.

问题是我的工具具有某些依赖项(二进制文件/.jar文件).

The problem is that my tool has some dependencies (binaries/. jar files).

如何解决此问题,以便下载我的源代码的人(例如将其扩展到新功能的人)不必关心依赖项?

How can solve this problem, so that the person who downloads my source code, for example to extend it to a new feature, doesn't have to care of the dependencies?

我应该将清单中的依赖项写为相对于我的源代码或类似内容的相对路径吗?

Should i write the dependencies in the MANIFEST as relative path, relative to my source code or something like that?

推荐答案

您可以将项目转换为maven项目,然后将源代码放入githup或类似的文件中.如果依赖项在网络上不可用,而在其他项目上可用,则还应将其放在网络上,以便maven可以将其下载给任何想要使用的人.

You can convert your project into a maven project and then put your source code to githup or something similar. If your dependencies are not available on the web but instead your other projects, you should also place them on the web so maven can download them for anyone who wants to use.

这篇关于Java中的依赖管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆