[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] How to define p2 sub-categories using category.xml

This can't be achieved through the editor, however you can do some metadata trickery to have it be supported. See http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata#Nested_categories

On 2012-12-04, at 3:31 AM, Dileepa Jayakody wrote:

> Hi All,
> 
> We use P2 Category Publisher tool to publish category metadata to our p2-repo.  And now the features are categorized based on our Products. 
> Now we have a requirement to list sub-level categories based on functionality of features under main feature categories. Is there a way to define sub-categories using category.xml or a work-around to achieve this?
> 
> For example in the following sample category.xml [1] how can I define category c2.1 as a subcategory under c2?
> Also Can I give version IDs for my category-defs?
> 
> 
> Thanks in advance,
> Dileepa
> 
> [1]
> <site>
>    <feature url="features/a_1.0.0.
> SNAPSHOT.jar" id="a" version="1.0.0.SNAPSHOT">
>       <category name="c1"/>
>    </feature>
>    <feature url="features/b_1.0.0.SNAPSHOT.jar" id="b" version="1.0.0.SNAPSHOT">
>       <category name="c1"/>
>    </feature>
>    <feature url="features/c_1.0.0.SNAPSHOT.jar" id="c" version="1.0.0.SNAPSHOT">
>       <category name="c2"/>
>    </feature>
>    <feature url="features/d_1.0.0.SNAPSHOT.jar" id="d" version="1.0.0.SNAPSHOT">
>       <category name="c2.1"/>
>    </feature>
> 
>    <category-def name="c1" label="Category-A"/>
>    <category-def name="c2" label="Category-B"/>
>    <category-def name="c2.1" label="Category-B-II"/>
> </site>
> 
> _______________________________________________
> p2-dev mailing list
> p2-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/p2-dev