blob: c088d31a49ac4f5c9859b188eaae09b9e9673370 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2013. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../guide/book.css" type="text/css">
<title>Using Shared Licenses</title>
<script type="text/javaScript" language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
</head>
<body>
<h1>Using Shared Licenses</h1>
<p>
Many Eclipse features use the same license. For example, all features in the Eclipse SDK use the Eclipse
Foundation Software User Agreement. If individual licenses are added to each feature built with PDE, updating
them will be very tedious. Using the shared license support allows multiple features to reference license text
and files from a single location. This makes updating licenses across multiple features easier and less error prone.
</p>
<p>
To create a license feature, create a feature that does not include any bundles or features. Add the necessary
license files and ensure they are included in your build.properties. The feature.properties should have two
properties, <code>licenseURL</code> and <code>license</code>.
</p>
<p>
To make use of the shared license facility, simply open your feature.xml file in the feature editor. Select the
<b>Information</b> tab and then the <b>License Agreement</b> section. Selecting <b>Shared license</b> will allow
you to specify the feature and version that contains your license text and optional license files. The
<code>license-feature</code> and <code>license-feature-version</code> attributes will be added to the feature
element of your feature.xml. If you are converting a single license to a shared license, you should remove the license
files from the individual features. The license information should be removed from feature.properties and
build.properties.
</p>
<p><img src="../guide/images/tasks/shared-license.png" alt="Setting a shared license in your feature" border="0"></p>
<p><img src="../guide/images/tasks/shared-license-feature.png" alt="Contents of feature using a shared license" border="0"></p>
<p>
The new shared license feature will have to be included in the build, so update your map files appropriately. You do not
need to nest the feature in another feature to fetch it, it happens automatically. An IU will not be created in the p2
repository for the license feature, but the license text will be included in the p2 metadata.
</p>
</body>
</html>