License should be a Package Annotation


Whenever you make a software system that needs to be widely distributed, you need to know information like distribution terms…can the software be distributed freely? Is the software component covered by a reciprocal copy-left license? Is the license OSI-certified, etc? At the ASF, developers are already required to put code comments to the effect of “This code is covered under ASL 2.0”. wouldn’t it be interesting if we could have some sort of runtime insight into the kind of license that applies to a package or class. AFAIK, annotations can apply at the package and class level. It is time for someone to start a project that contains an Annotation “License” with a set of properties and some Enums to capture all of the recognized OSI licenses.