[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] category of features in update site

Categories currently come out of a site.xml file.  Unfortunately the existing build integration doesn't pass the site to the metadata generator, and in fact it seems the generator ant task does not even expose a site attribute.

You can probably add category IUs to your metadata with a customAssembly.xml and the pre.archive target.  You need to manually exec java again (since the ant task doesn't support -site) with something like:
        -application org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication
          -source ${eclipse.base}
        -flavor tooling
        -metadataRepository ${p2.metadata.repo}
        -artifactRepository ${p2.artifact.repo}
        -site site.xml


Edoardo Comar <ECOMAR@xxxxxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

10/30/2008 12:24 PM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>

[p2-dev] category of features in update site

we are building some features in headless mode using an ANT script like the snippet below.

When installing from that repo they end up as being "Uncategorized" in the software update UI

I could not find how to name categories.

<macrodef name="build.feature">

       <attribute name="feature" />

       <attribute name="build" default="${basedir}/build" />

       <attribute name="eclipse" default="${basedir}/eclipse" />

       <attribute name="base" default="@{eclipse}" />

       <attribute name="repository" default="${basedir}/repository" />

       <attribute name="repositoryName" default="@{repository}" />


               <mkdir dir="@{build}" />

               <copy todir="@{build}" overwrite="true">

                       <fileset dir="@{eclipse}">

                               <include name="plugins/org.eclipse.pde.build*/templates/headless-build/*" />


                       <mapper type="flatten" />


               <replace file="@{build}/allElements.xml" token="element.id[.config.spec]" value="@{feature}" />

               <pathconvert property="featureBuild.xml">

                       <fileset dir="@{eclipse}/plugins" includes="org.eclipse.pde.build*/scripts/build.xml" />


               <java jar="${launcher.jar}" fork="true" failonerror="true">

                       <jvmarg value="-Xms256m" />

                       <jvmarg value="-Xmx768m" />

                       <arg line="-clean" />

                       <arg line="-application org.eclipse.ant.core.antRunner" />

                       <arg line="-buildfile ${featureBuild.xml}" />

                       <arg line="-DtopLevelElementId=@{feature}" />

                       <arg line="-Dbaseos=${baseos}" />

                       <arg line="-Dbasews=${basews}" />

                       <arg line="-Dbasearch=${basearch}" />

                       <arg line="-DbuildDirectory=@{build}" />

                       <arg line="-Dbuilder=@{build}" />

                       <arg line="-DbaseLocation=@{base}" />

                       <arg line="-DbuildType=${buildType}" />

                       <arg line="-DbuildId=${buildId}" />

                       <arg line="-DforceContextQualifier=${qualifier}" />

                       <arg line="-DjavacDebugInfo=true" />

                       <arg line="-DjavacVerbose=false" />

                       <arg line="-DjavacSource='1.5'" />

                       <arg line="-DjavacTarget='1.5'" />

                       <arg line="-Dgenerate.p2.metadata=true" />

                       <arg line="-Dp2.metadata.repo=file:@{repository}" />

                       <arg line="-Dp2.artifact.repo=file:@{repository}" />

                       <arg value="-Dp2.metadata.repo.name=@{repositoryName}" />

                       <arg value="-Dp2.artifact.repo.name=@{repositoryName}" />

                       <arg line="-Dp2.flavor=tooling" />

                       <arg line="-Dp2.publish.artifacts=true" />


               <echo>Built @{feature}</echo>



Edoardo Comar
IBM United Kingdom Ltd.
Tel +44 (0)1962 81 5576 (external)  245576  (internal)


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

p2-dev mailing list