Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
scroll top