Edit below, forgot the target in the eclipse command, and clarified wording.
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx]
On Behalf Of Justin Georgeson
Sent: Wednesday, December 19, 2012 9:38 AM
To: Tycho user list
Subject: Re: [tycho-user] Repository with no category
You could define a category and a core.antRunner build file like this
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="p2.tasks">
<target name="p2.remove.iu">
<p2.remove.iu>
<repository location="${srcDir}"/>
<iu id="${iuName}"/>
</p2.remove.iu>
</target>
</project>
then after the maven
build
is done
run
eclipse -nosplash -application org.eclipse.ant.core.antRunner -buildfile p2_remove.xml \
p2.remove.iu
-DsrcDir=repo/target/repository -DiuName=categoryName
You would then need update the content.xml in the repo jar file.
Thx Mickeal,
I open my repository with p2-browser and I see :
“201212181413.Default 1.0.0.08--cLY8zh7UEMUMUNDMkMc”
It seems this is the “uncategorized” category
.
When I open my content.xml I found :
<unit id='201212181410.Default' version='1.0.0.08--cLYCXh7UEMUMUNDMkME'>
<properties size='3'>
<property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
<property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
<property name='org.eclipse.equinox.p2.type.category' value='true'/>
</properties>
This confirms that the category is present.
p2 allow to have IU which is not in category, so I doubt p2 create it automatically.
On 12/18/2012 06:08 PM, Simon Bernard wrote:
I use Tycho to build an eclipse repository which contains several features.
I would like those features were not in a category. (to be not visible in the eclipse UI by default)
I found no way to do that :/.
If I create a category.xml without category, it seems that Tycho create a category "Uncategorized" for me. (but I don't want it)
If I don't use category.xml, I don't know how I can list the feature I want in my repository (anyway, in this case the build failed : No content specified for p2 repository)
I'm not 100% sure, but i think if you don't create a category, then you don't have categories.
It's just that Eclipse installation UI decides to show an Uncategorized.
You should have a look at the generated repo with Igor's p2-browser to see whether a category is defined for your site. If there is no, then it means the culprit is the Eclipse installation UI; else it probably means it's automatically generated by p2.
HTH