Typical practice for redistributing third party source code with your source code [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this questionI'm releasing an application I wrote as an open-source project by creating a public source-code repository. I use a third-party library which is also open-source and freely redistributable. I'm not versioning the third-party library, but should I include it in my repository for the convenience of those cloning the repository or should I expect them to download the third-party library on their own? To be clear, I'm not asking if I should version the third-party code or if I can redistribute it, but whether it is standard practice to include third-party source code as a convenience.
Usually you don't distribute third party libraries with your source code.
Try to download some free software package and you'll see it's common practice to tell in the INSTALL or README file the dependecies, so the user can download them from their original source.
You have to read the license for the code in question. If it's GPL, you have to make it available, but you don't have put it into the repository. If it's BSD, you just have to give credit in your released code. In any case, including it in a repository separate from your project is a nice thing to do, simply for the sake of furthering the goal of open source, although that's far from standard practice.
If both use the vcs git then you could make the external library a git submodule. This is usually handled by package managers though.
One solution is to publish yours as Maven artifacts, synced to central, and simply depend on their artifacts. Then the source issue takes care of itself. That, of course, assumes that they publish maven artifacts.
Many projects indeed do well by simply linking the artifacts published in (various) Maven repositories.
精彩评论