Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Plugins IU directly in category.xml
Plugins IU directly in category.xml [message #868734] Wed, 02 May 2012 13:14 Go to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi all,

I want to put directly plugins in my category.xml (I don't want to use
features for those plugins, that I don't own, I just want to mirror
them, they are available in Orbit without feature).
I know p2 can publish directly plugins. I noticed category.xml editor
does not provide entry for Plugins,

So, simple question:
Is there a way (independently of category editor) to add plugins in
category.xml ?
The goal, ultimately, would be to support it also in Tycho.

Thanks in advance.
Mickael
Re: Plugins IU directly in category.xml [message #868756 is a reply to message #868734] Wed, 02 May 2012 13:45 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Am 02.05.2012 15:14, schrieb Mickael Istria:
> So, simple question:
> Is there a way (independently of category editor) to add plugins in
> category.xml ?
> The goal, ultimately, would be to support it also in Tycho.

Have you looked at the category.xml we use in Orbit? It's possible to
define categories using queries.

http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.orbit/org.eclipse.orbit.releng/maps/category.xml?view=markup&revision=1.5&root=Tools_Project

I think it's also possible to list units directly. But I'm not sure
if/where it's documented properly. I discovered the query feature by
looking at the source code.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: Plugins IU directly in category.xml [message #868768 is a reply to message #868756] Wed, 02 May 2012 14:10 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 05/02/2012 03:45 PM, Gunnar Wagenknecht wrote:
> Am 02.05.2012 15:14, schrieb Mickael Istria:
>> So, simple question:
>> Is there a way (independently of category editor) to add plugins in
>> category.xml ?
>> The goal, ultimately, would be to support it also in Tycho.
>
> Have you looked at the category.xml we use in Orbit? It's possible to
> define categories using queries.
>
> http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.orbit/org.eclipse.orbit.releng/maps/category.xml?view=markup&revision=1.5&root=Tools_Project

I did have a look at it. But queries are too complex for my use-case.

> I think it's also possible to list units directly. But I'm not sure
> if/where it's documented properly. I discovered the query feature by
> looking at the source code.

Will have a look at source then.
Re: Plugins IU directly in category.xml [message #868787 is a reply to message #868768] Wed, 02 May 2012 14:35 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

>> I think it's also possible to list units directly. But I'm not sure
>> if/where it's documented properly. I discovered the query feature by
>> looking at the source code.
>
> Will have a look at source then.

I found the UI part in org.eclipse.pde.internal.core.idite, but nothing
related to Queries or bundles as IU.
Which class gave you hints for queries?
Re: Plugins IU directly in category.xml [message #868843 is a reply to message #868787] Wed, 02 May 2012 16:09 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Found org.eclipse.equinox.internal.p2.updatesite package.

The <iu id="bundle.name"> element looks promising, but it looks like
CategoryPublisher application only works on existing repository and is
only good at organizing an already existing repo.
What I want is to create a repo and publish some plugins in it, without
making them part of a feature.

But I also found that Tycho seems to use its own implementation, based
on ContextValue "TychoConstants.CTX_PUBLISHED_ROOT_IUS", use by
AssembleRepositoryMojo, to invoke MirrorAppicaiton and
MirrorApplicationServiceImpl....

Both Headless command and Tycho Mojo rely on the CategoryXMLAction and
SiteXMLAction for that. SiteXMLAction seems to perform some cool stuff
for <iu> but I can't get it to work.
Any help on its usage would be very welcome.
Re: Plugins IU directly in category.xml [message #869378 is a reply to message #868843] Thu, 03 May 2012 10:02 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

If I understand correctly, <iu> are more aimed to categorize stuff that
is already part of the site. So not good for my use-case.

Then I opened this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=378338

--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Plugins IU directly in category.xml [message #869420 is a reply to message #868843] Thu, 03 May 2012 11:24 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Hi Mickael,

Am 02.05.2012 18:09, schrieb Mickael Istria:
> The <iu id="bundle.name"> element looks promising, but it looks like
> CategoryPublisher application only works on existing repository and is
> only good at organizing an already existing repo.

That's how it works. The p2 category Ant task (and application) takes
any existing p2 repository and adds categories to it (depending on a
given category.xml).

> What I want is to create a repo and publish some plugins in it, without
> making them part of a feature.

So you don't need categories for this. You can simply mirror or publish
any plug-in to any repository. Features are really just a way to group
bundles. My understanding was that you wanted to have categories as a
way to use "groups" of bundles in a Target Platform (or so).

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: Plugins IU directly in category.xml [message #870771 is a reply to message #869420] Wed, 09 May 2012 15:15 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 05/03/2012 01:24 PM, Gunnar Wagenknecht wrote:
>> What I want is to create a repo and publish some plugins in it, without
>> making them part of a feature.
>
> So you don't need categories for this. You can simply mirror or publish
> any plug-in to any repository. Features are really just a way to group
> bundles.

But there is no way to do it by editing a category.xml file, isn't
there? I'll need to use p2 tasks or scripts (which I tried to avoid as
much as possible in our Tycho-based build process).

> My understanding was that you wanted to have categories as a
> way to use "groups" of bundles in a Target Platform (or so).

Sorry if I was not clear. What I want is to give a category.xml
containing a bundle that is not part of a feature to Tycho and get as
result a repository which contain the IU for this bundle.
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Plugins IU directly in category.xml [message #870869 is a reply to message #870771] Thu, 10 May 2012 06:10 Go to previous message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Am 09.05.2012 17:15, schrieb Mickael Istria:
> Sorry if I was not clear. What I want is to give a category.xml
> containing a bundle that is not part of a feature to Tycho and get as
> result a repository which contain the IU for this bundle.

I'm not sure category.xml is the right thing for this job. From my
understanding, category.xml is only used to modify repo meta data. None
of the existing scripts/tasks use it for publishing bundles into a repo.

A Google search brought up this for publish bundles in Tycho:
https://docs.sonatype.org/display/TYCHO/Tycho-extras+-+FeaturesAndBundlesPublisher

There is also some discussion here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=347303

Have you tried this?

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Previous Topic:ServletBridge Enterprise Ready?
Next Topic:Problem when updating bundle programmatically
Goto Forum:
  


Current Time: Thu Mar 28 22:59:58 GMT 2024

Powered by FUDForum. Page generated in 0.03679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top