5

I want to publish a small open source project on GitHub. I'd like to release it with either MIT or Apache license.

The project has unit tests that use JUnit library. JUnit is released with the Eclipse Public License v1.0. JUnit is not distributed in the project - it is downloaded and used at build time by Maven, the build tool.

Am I bound by the license of a library that is used in the project but is not distributed with it? If I am, can I use a library released with the Eclipse Public License in MIT or Apache licensed projects?

My own thoughts (the most pessimistic scenario)

As the unit tests use JUnit, the project is a derivative work of JUnit, even though JUnit is not distributed with it. Distributing the project automatically means distributing JUnit.

The Eclipse Public License (the JUnit's license) says:

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that … its license agreement:

There is a list of four requirements here that sound trivial but which, perhaps, are not fully addressed in the MIT and Apache licenses (disclaiming all warranties, excluding any liability, a statement about additional provisions, a statement about availability of the source code).

So, the Eclipse Public License may not be compatible with the MIT and Apache licenses, and I may not be able to use JUnit.

3

As a general rule, if you don't distribute someone else's code you are not obliged by any of its licence terms when you distribute your own. The liability comes at the point where the code is actually merged.

Assume that A writes and distributes code for B to use, and that A's program uses code written by C but A does not distribute any of it. Then the liability for compliance with C's licence falls with B, the user, at the point where A's code is merged with C's. B would need to be warned of this liability.

Sorry if that's complicated, but it's not easy to explain clearly. The point is that copyright law is mostly about copying (distribution) and not so much about using (consuming).

As I tell people repeatedly, if you make no money out of it and harm no-one then just do your best and don't worry too much. If you make money out of your product or services and/or if you may cause damage to someone, you must take competent legal advice. That won't protect you, but it will warn you of the risks and perhaps how to mitigate them.

Re your other question, it seems to me that Apache and MIT would be compatible with a work released under EPL but not necessarily vice versa. Neither of them fits with GPL but may fit with LGPL in some circumstances. Mixed licences are indeed a royal pain.

  • Thanks for the explanation! It sounds reasonable to me. I'll wait a bit longer, and then will accept the answer if nobody offers a different opinion. – Alexey Mar 31 '14 at 22:08
  • There is a thing that I don't understand here. Let's say the code distributed by C is a library released with GPL or any other copyleft license (hypothetically). Flowing the logic of your example, A can develop a commercially-licensed piece of software which uses this GPL library provided B will download the library and build the software themselves. Downloading libraries and building an application can be an easy task with dependency management/build tools like Maven. Is it a flow in copyleft licenses? Or is there something else that I do not understand? – Alexey Apr 1 '14 at 0:05
  • @Alexey: Downloading and building applications is typically not restricted by OSS licences. As I said the main restrictions are on distribution, not usage. – david.pfx Apr 1 '14 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.