blob: fd69c82fc01970952f45991c443efb93a2b57c64 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright"
content="Copyright (c) 2009, 2015 IBM Corporation and others. 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="../book.css" charset="ISO-8859-1" type="text/css">
<title>Configuring p2 Products</title>
</head>
<body>
<h1>Configuring p2 Products</h1>
<p>By default, PDE/Build will automatically generate start levels and other configuration information for you. It does this by generating properties into the <a href="../../org.eclipse.platform.doc.isv/guide/p2_customizing_metadata.html">p2.inf</a> file.
If your product provides its own p2.inf file, then PDE/Build will append to a copy of that file. It is possible to suppress this behaviour by defining some properties in your p2.inf:</p>
<table border="5" cellspacing="0" cellpadding="2" align="center">
<tr><td><tt>org.eclipse.pde.build.append</tt></td><td>Set to <b><tt>false</tt></b> to disable appending any defaults to the p2.inf file.</td></tr>
<tr><td><tt>org.eclipse.pde.build.append.startlevels</tt></td><td>Set to <b><tt>false</tt></b> to disable appending start level information to the p2.inf file.</td></tr>
<tr><td><tt>org.eclipse.pde.build.append.launchers</tt></td><td>Set to <b><tt>false</tt></b> to disable including launchers in the p2.inf file.</td></tr>
</table>
<h3>Start Levels</h3>
<p>Start level information can be set manually on the configuration tab of the product editor. <b>If any start level information is set in the .product file, then PDE/Build will not generate any defaults.</b>
This means that if you decide to set any custom start levels, then you must set start levels for all bundles that will require them. The default start levels generated by PDE/Build for p2 products are:</p>
<table border="5" cellspacing="0" cellpadding="2" align="center">
<tr><td align="center">Bundle</td><td>Start Level</td><td align="center">Auto-Start</td></tr>
<tr><td>org.eclipse.equinox.simpleconfigurator</td><td align="center">1</td><td align="center">true</td></tr>
<tr><td>org.eclipse.equinox.common</td><td align="center">2</td><td align="center">true</td></tr>
<tr><td>org.eclipse.update.configurator</td><td align="center">4 (default)</td><td align="center">true</td></tr>
<tr><td>org.eclipse.core.runtime</td><td align="center">4 (default)</td><td align="center">true</td></tr>
<tr><td>org.eclipse.equinox.ds</td><td align="center">2</td><td align="center">true</td></tr>
</table>
<p>When setting the start level for org.eclipse.update.configurator, PDE/Build will also automatically set In addition to these properties, <b><tt>org.eclipse.update.reconcile=false</tt></b>.</p>
<h3>Config.ini properties</h3>
<p>The <a href="../../org.eclipse.platform.doc.isv/guide/p2_publisher.html">p2 product publisher</a> used by PDE/Build will automatically set a number of config.ini properties based on settings in your .product file:</p>
<table border="5" cellspacing="0" cellpadding="2" align="center">
<tr><td>Property</td><td>Based On</td></tr>
<tr><td><tt>eclipse.product</tt></td><td>The product set on the overview tab of the product editor.</td></tr>
<tr><td><tt>eclipse.application</tt></td><td>The application set on the overview tab of the product editor.</td></tr>
<tr><td><tt>osgi.splashPath</tt></td><td>The plug-in set on the Splash tab of the product editor.</td></tr>
</table>
<p>It is also possibly to add arbitrary config.ini properties to your .product file, however there is no tab the editor for this, so it must be done manually by editing the .product file as xml.</p>
<p>An example of setting properties this way would look like this:</p>
<pre>
...
&lt;configurations&gt;
<i>&lt;-- The product editor will generate start level information like this:
&lt;plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" /&gt;
--&gt;</i>
&lt;property name="osgi.bundles.defaultStartLevel" value="4" /&gt;
&lt;property name="osgi.requiredJavaVersion" value="1.5.0"/&gt;
&lt;/configurations&gt;
...
</pre>
<h3>Launchers</h3>
<p>PDE/Build will automatically <a href="pde_p2_buildtasks.htm#brand_p2_artifacts">brand launchers</a> (which it gets from the org.eclipse.equinox.executable feature). These launchers will be automatically included in the
product along with generated metadata that will set the appropriate <a href="../../org.eclipse.platform.doc.isv/reference/misc/runtime-options.html"><i>-startup</i> and <i>--launcher.library</i></a> arguments in the product ini file.</p>
<p>Because of changes to the structure of <a href="pde_p2_featuremetadata.htm">feature metadata</a> with respect to root files, the org.eclipse.equinox.executable feature should not be included directly in your product.</p>
</body>
</html>