Thanks Pascal for clearing out my doubts.
I also wish to know if it's possible to define sub-categories and
category-versions in category.xml.
In the following sample category.xml [1] how can I define category c2.1 as
a subcategory under c2?
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>

On Sat, Mar 24, 2012 at 9:30 PM, <[email protected]> wrote:

> Send p2-dev mailing list submissions to
>        [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://dev.eclipse.org/mailman/listinfo/p2-dev
> or, via email, send a message with subject or body 'help' to
>        [email protected]
>
> You can reach the person managing the list at
>        [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of p2-dev digest..."
>
>
> Today's Topics:
>
>   1. Re: Categorising IUs in an existing p2 repo using
>      category.xml (Pascal Rapicault)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 23 Mar 2012 13:26:19 -0400
> From: Pascal Rapicault <[email protected]>
> To: P2 developer discussions <[email protected]>
> Subject: Re: [p2-dev] Categorising IUs in an existing p2 repo using
>        category.xml
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=iso-8859-1
>
> On 2012-03-18, at 3:04 PM, Dileepa Jayakody wrote:
>
> > Hi Devs,
> >
> > I have a requirement of categorising IUs in an existing P2 Repo so that
> when the available features of the repo are queried, they are shown  in
> groups under categories (like the 'Grouped by' feature in Eclipse). I came
> across the concept of category.xml to explicitly define IUs under
> categories.
> > My question is how can I retrieve this category metadata when I query
> the available IUs from the repo?
> > Can I use IRepository.getProperties() method to read the category
> metadata from the category.xml in the p2 repo?
> > Or do I have to run 'Category Publisher' application to encode the
> category data into content.xml of the p2 repo; is there any other
> alternative method to categorise IUs in an existing repo?
>        The category.xml is only an authoring format. In the end, the
> categories are represented by IUs (InstallableUnit) that are part of the
> metadata repository (content.xml). Theses IUs are generated by the
> 'Category Publisher'. Like any IU those can be access by querying the
> repository. The query can be created using the following:
> QueryUtil#createIUCategoryQuery.
>
> HTH
>
> Pascal
> =-=-=
> Consulting, training, bug fixing - pascal (at) rapicault.net
>
> >
> > Thanks,
> > Dileepa
> > _______________________________________________
> > p2-dev mailing list
> > [email protected]
> > https://dev.eclipse.org/mailman/listinfo/p2-dev
>
>
>
> ------------------------------
>
> _______________________________________________
> p2-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/p2-dev
>
>
> End of p2-dev Digest, Vol 45, Issue 19
> **************************************
>



-- 
Dileepa Jayakody,
Software Engineer, WSO2 Inc.
Lean . Enterprise . Middleware

Mobile : +94777-857616
_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to