Every JBoss project/component needs to specify license information in its pom.xml. This promotes re-usability because it provides an easy and standard way to find out the license for a particular library and as long as a project's dependencies provide this information, too, it allows us to automatically assemble reports with the collective set of licenses included within a product.
Getting License Info
The maven-jboss-license-plugin can be used to generate this type of report. For example, to get the collective set of licenses bundled with JBoss Application Server, move to the source thirdparty dir and try:
mvn org.jboss.maven.plugins:maven-jboss-license-plugin:1.0.3:download-licenses
This will
a) create target/licenses.xml listing all project dependencies coupled with license info
b) download all referenced licenses in the target/licenses dir
c) emit warnings for all components not specifying a license
Adding License Info
A module inherits the parent's module license information so if the parent contains the info, you don't have to duplicate it, it can be derived by the tools. However, if the parent doesn't not provide license info or if you want to add it yourself, it should look like:
<!-- Describes the licenses for this project. This is used to generate
the license page of the project's web site, as well as being taken into
consideration in other reporting and validation. The licenses listed for
the project are that of the project itself, and not of dependencies.
-->
<licenses>
<license>
<!-- The full legal name of the license. -->
<name>Apache 2</name>
<!--The official url for the license text. -->
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<!-- The primary method by which this project may be distributed.
'repo' - may be downloaded from the Maven repository
'manual' - user must manually download and install the dependency. -->
<distribution>repo</distribution>
<!-- Addendum information pertaining to this license. -->
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
As a minimum, you need to specify the 'name' and 'url' information. For example, see:
http://repository.jboss.org/maven2/apache-bsf/bsf/2.4.0/bsf-2.4.0.pom
Components inheriting from a jboss-parent will automatically get:
<licenses>
<license>
<name>lgpl</name>
<url>http://repository.jboss.org/licenses/lgpl-2.1.txt</url>
</license>
</licenses>
JBoss License Repository
For licenses which do not have an accessible permanent URL, the license file can be made available in the jboss repository.
http://repository.jboss.org/licenses
These license files should be added to the following svn location:
Comments