Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Categorising IUs in an existing p2 repo using category.xml

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="" id="a" version="1.0.0.SNAPSHOT">
      <category name="c1"/>
   </feature>
   <feature url="" id="b" version="1.0.0.SNAPSHOT">
      <category name="c1"/>
   </feature>
   <feature url="" id="c" version="1.0.0.SNAPSHOT">
      <category name="c2"/>
   </feature>
   <feature url="" 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, <p2-dev-request@xxxxxxxxxxx> wrote:
Send p2-dev mailing list submissions to
       p2-dev@xxxxxxxxxxx

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
       p2-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
       p2-dev-owner@xxxxxxxxxxx

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 <pascal@xxxxxxxxxxxxx>
To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
Subject: Re: [p2-dev] Categorising IUs in an existing p2 repo using
       category.xml
Message-ID: <FEFB1ECB-29FC-41BA-9750-AC8788A80094@xxxxxxxxxxxxx>
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
> p2-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/p2-dev



------------------------------

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
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


Back to the top