Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Tycho/category.xml"
< Tycho
(Added dynamic category example) |
(→Format overview) |
||
Line 6: | Line 6: | ||
Stub category.xml file: | Stub category.xml file: | ||
− | < | + | <source lang="xml"> |
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<site> | <site> | ||
+ | <!-- Include features --> | ||
<feature id="feature.id" version="1.4.100.v2009"/> | <feature id="feature.id" version="1.4.100.v2009"/> | ||
+ | <!-- Since Tycho 1.1.0 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=407273#c18), features can declare platform-specific compatibility for multi-platform builds --> | ||
+ | <!-- Examples: https://github.com/mickaelistria/org.eclipse.simrel.build/blob/master/categories/category.xml#L581 --> | ||
+ | <feature id="linux.specific.feature.id" version="0.0.0" os="linux"/> | ||
+ | |||
+ | <!-- Directly include bundles, without a feature --> | ||
<bundle id="bundle.id" version="1.3.1.v2013"/> | <bundle id="bundle.id" version="1.3.1.v2013"/> | ||
+ | <!-- Directly include any iu --> | ||
<iu id="unit.id"/> | <iu id="unit.id"/> | ||
+ | <!-- Include all IUs matching an expression --> | ||
<iu> | <iu> | ||
<query> | <query> | ||
Line 23: | Line 31: | ||
</iu> | </iu> | ||
+ | <!-- Categories --> | ||
<feature id="feature.in.category"> | <feature id="feature.in.category"> | ||
<category name="category.id"/> | <category name="category.id"/> | ||
Line 37: | Line 46: | ||
</iu> | </iu> | ||
</site> | </site> | ||
− | </ | + | </source> |
== Including artifacts == | == Including artifacts == |
Latest revision as of 04:35, 12 July 2018
A category.xml file can be used to include content into a p2 repository and to specify how to display the content in the p2 installation dialog. For it to be used by a Tycho build, it needs to be placed into the root of an eclipse-repository project.
The category.xml format was originally defined by the Eclipse PDE project. There are extensions to the format only supported by p2 and Tycho.
Format overview
Stub category.xml file:
<?xml version="1.0" encoding="UTF-8"?> <site> <!-- Include features --> <feature id="feature.id" version="1.4.100.v2009"/> <!-- Since Tycho 1.1.0 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=407273#c18), features can declare platform-specific compatibility for multi-platform builds --> <!-- Examples: https://github.com/mickaelistria/org.eclipse.simrel.build/blob/master/categories/category.xml#L581 --> <feature id="linux.specific.feature.id" version="0.0.0" os="linux"/> <!-- Directly include bundles, without a feature --> <bundle id="bundle.id" version="1.3.1.v2013"/> <!-- Directly include any iu --> <iu id="unit.id"/> <!-- Include all IUs matching an expression --> <iu> <query> <expression type="match"> <![CDATA[ id == $0 ]]> </expression> <param>another.unit.id</param> </query> </iu> <!-- Categories --> <feature id="feature.in.category"> <category name="category.id"/> </feature> <category-def name="category.id" label="Category Label"> <description>Details on the category</description> </category-def> <!-- example for a dynamic category --> <category-def name="javax" label="Bundles starting with javax."/> <iu> <category name="javax"/> <query><expression type="match">id ~= /javax.*/</expression></query> </iu> </site>
Including artifacts
TODO details on feature, bundle, and iu (since Tycho 0.23.0) elements
Categorizing content
TODO details on category-def and category elements