| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html lang="en"> |
| <head> |
| <meta name="copyright" |
| content="Copyright (c) IBM Corporation and others 2009. 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>Ant tasks for publishing p2 metadata</title> |
| </head> |
| <body> |
| <h1>Ant tasks for publishing p2 metadata</h1> |
| <p>p2 ships with two publisher ant tasks. The ant tasks are contained |
| in <code>org.eclipse.equinox.p2.publisher</code>. This bundles is |
| part of the Eclipse SDK.</p> |
| |
| <table cellspacing="1" cellpadding="2" width="95%" align="center"> |
| <tr><td><b><tt>Default Attributes</tt></b></td></tr> |
| <tr><td><p>The <tt>p2.publish.*</tt> ant tasks outlined below all support the following attributes:</p> |
| <table border="5" cellspacing="0" cellpadding="1" width="95%" align="center"> |
| <tr><td><tt>metadataRepository</tt></td><td>A URL specifying the metadata repository to publish to.</td></tr> |
| <tr><td><tt>artifactRepository</tt></td><td>A URL specifying the artifact repository to publish to.</td></tr> |
| <tr><td><tt>repository</tt></td><td>Sets both metadataRepository and artifactRepository.</td></tr> |
| <tr><td><tt>metadataRepositoryName</tt></td><td>When creating a new metadata repository, sets the name.</td></tr> |
| <tr><td><tt>artifactRepositoryName</tt></td><td>When creating a new artifact repository, sets the name.</td></tr> |
| <tr><td><tt>repositoryName</tt></td><td>Sets both metadataRepositoryName and artifactRepositoryName.</td></tr> |
| <tr><td><tt>append</tt></td><td>Whether to append to the repository. (Default is "true")</td></tr> |
| <tr><td><tt>compress</tt></td><td>When creating a new repository, whether or not to compress the metadata. (Default is "false")</td></tr> |
| <tr><td><tt>publishArtifacts</tt></td><td>Whether or not to publish the artifacts. (Default is "true")</td></tr> |
| <tr><td><tt>reusePackedFiles</tt></td><td>Whether or not to include discovered Pack200 files in the repository. (Default is "false")</td></tr> |
| <tr><td><tt><contextRepository></tt></td> |
| <td>Nested elements specifying context repositories, supports the following attributes: |
| <table cellspacing="0" cellpadding="2" border="1" width="100%"> |
| <tr><td><tt>location</tt></td><td>A URL specifying the location of the repository.</td></tr> |
| <tr><td><tt>artifact</tt></td><td>"true" or "false": whether or not there is an artifact repository at this location.</td></tr> |
| <tr><td><tt>metadata</tt></td><td>"true" or "false": whether or not there is a metadata repository at this location.</td></tr> |
| </table> |
| <p>If a given context repository contains metadata for one of the features or bundles that are being published, then that metadata |
| will be re-used instead of generating new metadata.</p> |
| </td></tr> |
| </table> |
| </td></tr> |
| </table> |
| <br> |
| <table cellspacing="1" cellpadding="2" width="95%" align="center"> |
| <tr><td><b><tt>p2.publish.featuresAndBundles</tt></b></td></tr> |
| <tr><td><p>This task will publish metadata for pre-existing binary features and plug-ins.</p></td></tr> |
| <tr><td><p>This task supports the following attributes and elements:</p> |
| <table border="5" cellspacing="0" cellpadding="1" width="95%" align="center"> |
| <tr><td><tt>source</tt></td><td>A folder containing plugins and features subfolders to publish.</td></tr> |
| <tr><td><tt><features></tt></td><td>A nested fileset element specifying the locations of binary features to publish.</td></tr> |
| <tr><td><tt><bundles></tt></td><td>A nested fileset element specifying the locations of binary plug-ins to publish.</td></tr> |
| </table> |
| </td></tr> |
| </table> |
| <br> |
| <table cellspacing="1" cellpadding="2" width="95%" align="center"> |
| <tr><td><b><tt>p2.publish.product</tt></b></td></tr> |
| <tr><td><p>Publish a .product file. This task assumes everything included in the product already exists in the repository. (That is, all features and bundles have been previously published.)</p> |
| </td></tr> |
| <tr><td><p>This task supports the following attributes:</p> |
| <table border="5" cellspacing="0" cellpadding="1" width="95%" align="center"> |
| <tr><td><tt>flavor</tt></td><td>Set the flavor for the p2 metadata, default is "tooling". Products should consider using a unique flavor if they have special requirements for bundle start levels.</td></tr> |
| <tr><td><tt>productFile</tt></td><td>The location of the .product file describing the product.</td></tr> |
| <tr><td><tt>executables</tt></td><td>The location of the executables feature. This is the feature that is used for branding and publishing the executables.</td></tr> |
| <tr><td><tt><config></tt></td><td>Nested elements specifying configurations supported by this product. Config elements specify ws, os and arch: |
| <div align="center"><tt><config ws="gtk" os="linux" arch="x86"/></tt></div> |
| Use <tt><config ws="ANY" os="ANY" arch="ANY"/></tt> if the product can support any platform. |
| </td></tr> |
| <tr><td><tt><advice></tt></td><td>Nested elements specifying specifying additional advice to use when creating the product. Currently the accepted kinds of advice are "featureVersions" and "pluginVersions". |
| <div align="center"><tt><advice kind="featureVersions" file="finalFeaturesVersions.properties" /><br><advice kind="pluginVersions" file="finalPluginsVersions.properties" /></tt></div> |
| PDE/Build will generate these version properties files when the builder sets the property <a href="../../org.eclipse.pde.doc.user/tasks/pde_version_qualifiers.htm#final_versions"><tt>generateVersionsLists</tt>"</a>. |
| </td></tr> |
| </table> |
| </td></tr> |
| </table> |
| <br> |
| |
| <p> |
| In addition to the publisher tasks, metadata can be generated as |
| <a href="../../org.eclipse.pde.doc.user/tasks/pde_p2_buildtasks.htm">part of PDE Build</a>. |
| </p> |
| |
| </body> |
| </html> |