Licentious mess

I'm working on a rather sophisticated program in Java, where I ended up building on lots of libraries and other programs. Java is never my first language choice, but with the new features in 5.0 (or 1.5 or Java 2 or whatever the hell they're calling it) – generics, for-each loop, auto-boxing, enums, assertions, variadic methods – I find it almost usable. And it is fairly easy to bring in external libraries: download the jar file, set your class path, browse the javadoc site, and you're on your way.

The system is not ready for release yet, but I did start contemplating the licensing terms today. Because of all the libraries I'm depending on, it's kind of complicated. I'm a big advocate of free software. For end users, the license doesn't matter very much; any of the ‘open source’ ones will do. For lone developers, you just choose one that matches your goals. For me, that's GNU GPL or LGPL, depending on the situation.

Unfortunately, if you're building a system that incorporates the work of many other people, it gets complicated. Here are the libraries and programs I'm embedding… so far:

  • org.kohsuke.bali — BSD-new
  • com.colloquial.arithcode — BSD-new
  • org.apache.tools.bzip2 — Apache 1.1
  • xerces — Apache 1.1
  • junit — Common Public License 1.0
  • gnu.bytecode — GPL 2
  • gnu.getopt — LGPL 2
So, under what license can I distribute my own code, which is combined with all of these systems? The main complication seems to be that the Apache and Common licenses are not strictly compatible with the GPL, even though they are meant to be, “in spirit.”

Some people would blame this on the GPL. It does seem to be the odd man out; if gnu.bytecode were released under Apache/BSD or even LGPL, then I could distribute the whole thing under Apache/BSD and be done with it. But I'm a big supporter of the GPL, and I can't blame Per Bothner for selecting it for the bytecode library (part of Kawa, a Scheme-to-Java system, by the way).

I see a few options here:

1. Remove dependencies on the Apache/Common components, making them optional at build time, then release under GPL. End users can still grab and link those libraries, but I don't have to redistribute them for a basic configuration.

2. Remove dependence on gnu.bytecode, perhaps using Byte-Code Engineering Library instead (it has an Apache license). Then release everything under Apache or BSD. Regardless of the relative merits of the two libraries, I'd hate to reject one just because it's GPL.

3. Perhaps it's possible to redistribute Apache/BSD-licensed software under the GPL, even though I'm not the copyright holder? That seems to be the opinion of Roy T. Fielding, of the Apache Software Foundation:

Whether or not [Apache and GPL] are considered compatible by the FSF is an opinion only they can make, but given that a derivative work consisting of both Apache Licensed code and GPL code can be distributed under the GPL (according to our opinion), there really isn't anything to be discussed.  — 24 Jan 2004
Option 3 would be ideal, if it turns out to be legal. I usually assume that I'm bound to redistribute under the same license the author used, but really it's just the GPL requires that… ?

©20022015 Christopher League