package aQute.bnd.annotation.headers; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * The {@code Bundle-License} header provides an optional machine readable form * of license information. The purpose of this header is to automate some of the * license processing required by many organizations like for example license * acceptance before a bundle is used. The header is structured to provide the * use of unique license naming to merge acceptance requests, as well as links * to human readable information about the included licenses. This header is * purely informational for management agents and must not be processed by the * OSGi Framework. *
* The syntax for this header is as follows: * *
* Bundle-License ::= ’<<EXTERNAL>>’ | ( license ( ’,’ license ) * ) * license ::= name ( ’;’ license-attr ) * license-attr ::= description | link * description ::= ’description’ ’=’ string * link ::= ’link’ ’=’ <url> ** * This header has the following attributes: *
* http://<domain-name>/licenses/<license-name>-<version>.<extension> ** *
* A number of license annotations have been predefined. For example: * {@link aQute.bnd.annotation.licenses.Apache_2_0 Apache_2_0}, * {@link aQute.bnd.annotation.licenses.BSD_2_Clause BSD_2_Clause}, * {@link aQute.bnd.annotation.licenses.BSD_3_Clause BSD_3_Clause}, * {@link aQute.bnd.annotation.licenses.CDDL_1_0 CDDL_1_0}, * {@link aQute.bnd.annotation.licenses.EPL_1_0 EPL_1_0} , * {@link aQute.bnd.annotation.licenses.EPL_2_0 EPL_2_0} , * {@link aQute.bnd.annotation.licenses.GPL_2_0 GPL_2_0}, * {@link aQute.bnd.annotation.licenses.GPL_3_0 GPL_3_0}, * {@link aQute.bnd.annotation.licenses.LGPL_2_1 LGPL_2_1}, * {@link aQute.bnd.annotation.licenses.MIT MIT}, and * {@link aQute.bnd.annotation.licenses.MPL_2_0 MPL_2_0}. */ @Documented @Retention(RetentionPolicy.CLASS) @Target({ ElementType.PACKAGE, ElementType.TYPE }) public @interface BundleLicense { /** * The name of the license, should refer to * Software Package Data Exchange * (SPDX) License List */ String name(); /** * A short description of the license */ String description() default ""; /** * A URI to the license text. This maybe relative, in that case it is from * the corresponding bundle. */ String link() default ""; }