Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] How do I Generate p2 metadata w/ Category info from command-line??

The metadata generator is nearing end of life.  In p2 we have moved over to the publisher.  I am slowly assembling documentation on this, but you can see the start of this at [1]. 

[1] http://wiki.eclipse.org/Equinox/p2/Publisher

One of the problems with your script is you might be specifying both a source and a site.  A source points to a directory filed with bundles and features (which is what an update site it).  -site points to an update site.  I wonder if the generator gets confused and just treats your directory as a list of bundles and features, and forgets about the actual site.xml.

cheers,
ian

On Thu, May 21, 2009 at 7:14 PM, David M Williams <david_williams@xxxxxxxxxx> wrote:
I was going to say to be sure to delete the artifacts.jar and content.jar
... but, appears you are in your ant script.

I did notice in your site.xml file you have
version="1.1.2.v20090515-r4235.jar"
instead of
version="1.1.2.v20090515-r4235"
I'm surprised there wouldn't be some error messages about that, but
I guess ".jar" is a permissible in a qualifier!?






From:
To:
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
Date:
05/21/2009 09:29 PM
Subject:
[cross-project-issues-dev] How do I Generate p2 metadata w/     Category
info from command-line??
Hi,

I thought I'd seen this topic before, but now cannot seem to find it.
I'm hoping someone out there can help. I'm trying to generate some
category info for our project P2 repositories with no luck.
I've tried just about every combination of parameters I can think of
with the metadata generator, and it generates the P2 fine, but no
category info.
I am building directly from ANT. I've tried having the site.url point to
a local file (not in repository) - no luck. I've also tried copying the
site file to the repos and using that location as the site url - again
no luck.
At this point I'm wondering if I'm using the right tool, or if the M6/M7
generator has a bug, or I'm missing something else big. Is anyone out
there manually generating categories for P2, if so what tools are you
using?

Below is the latest metadata command-line I'm using, and the Site.xml
file.
Any help would be appreciated.

Thanks

-Eric

ANT Snippet:

   <!-- Tool definitions -->
   <property name="p2.SDK.install.dir" value="C:\eclipseSDK\eclipse"/>
   <property name="p2.SDK.plugin.dir"
value="${p2.SDK.install.dir}\plugins"/>
   <property name="p2.generator.jar"
value="org.eclipse.equinox.p2.metadata.generator_*.jar"/>
   <property name="p2.launcher.jar"
value="org.eclipse.equinox.launcher_*.jar"/>
   <!-- Input definitions -->
   <property name="p2.base.dir"         value="C:\__AA_TestRepos"/>
   <property name="p2.feature.dir"      value="${p2.base.dir}/features"/>
   <property name="p2.bundle.dir"       value="${p2.base.dir}/plugins"/>
   <property name="site.dir"
value="${feature.build.location}/${classes.dir}"/>
   <property name="site.url"            value="file:$
{site.dir}/site.xml"/>
   <!-- Output definitions -->
   <property name="p2.repository.url" value="file:/${p2.base.dir}"/>
   <property name="P2.release.repos.name"   value="EclipseLink
Repository"/>
   <property name="metadata.repos.name"
value="&quot;${P2.release.repos.name}&quot;"/>
   <property name="artifact.repos.name"     value="&quot;EclipseLink
Artifacts&quot;"/>

   <target name="generate-p2-repos">
       <echo message="Site url="">        <!-- Metadata generator apparently doesn't rebuild the artifact
and content xml files if they already exist -->
       <delete  failonerror="false">
           <fileset dir="${p2.base.dir}" includes="artifact*.*,
content*.*"/>
       </delete>
       <java classname="org.eclipse.equinox.launcher.Main" fork="true"
timeout="10800000" taskname="p2"
           jvm="${java.home}/bin/java" failonerror="false"
maxmemory="256m">
           <classpath>
               <fileset dir="${p2.SDK.plugin.dir}"
                   includes="${p2.launcher.jar},
                             ${p2.generator.jar}"/>
               <pathelement location="${p2.SDK.plugin.dir}" />
           </classpath>
           <arg line=" -application
org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" />
           <arg line=" -updateSite ${p2.base.dir}/ -site ${site.url}" />
           <arg line=" -source ${p2.base.dir}/ -features
${p2.feature.dir}/ -bundles ${p2.bundle.dir}/" />
           <arg line=" -metadataRepository ${p2.repository.url}/
-metadataRepositoryName ${metadata.repos.name}" />
           <arg line=" -artifactRepository ${p2.repository.url}/
-artifactRepositoryName ${artifact.repos.name}" />
           <arg line=" -compress -reusePack200Files" />
       </java>
   </target>

Site.xml:

<?xml version="1.0" encoding="UTF-8"?>
<site pack200="true">
  <description
     url="">      EclipseLink Milestones: contains runtime and source features for
JPA, MOXy and SDO components
  </description>
  <feature
url=""> id="org.eclipse.persistence.jpa" version="1.1.2.v20090515-r4235.jar">
     <category name="EclipseLink 1.1.2-M1"/>
  </feature>
  <feature
url="">
id="org.eclipse.persistence.jpa.source"
version="1.1.2.v20090515-r4235.jar">
     <category name="EclipseLink 1.1.2-M1"/>
  </feature>
  <feature
url=""> id="org.eclipse.persistence.moxy" version="1.1.2.v20090515-r4235.jar">
     <category name="EclipseLink 1.1.2-M1"/>
  </feature>
  <feature
url="">
id="org.eclipse.persistence.moxy.source"
version="1.1.2.v20090515-r4235.jar">
     <category name="EclipseLink 1.1.2-M1"/>
  </feature>
  <feature
url=""> id="org.eclipse.persistence.sdo" version="1.1.2.v20090515-r4235.jar">
     <category name="EclipseLink 1.1.2-M1"/>
  </feature>
  <feature
url="">
id="org.eclipse.persistence.sdo.source"
version="1.1.2.v20090515-r4235.jar">
     <category name="EclipseLink 1.1.2-M1"/>
  </feature>
  <category-def name="EclipseLink 1.1.2-M1" label="EclipseLink
1.1.2-M1"/>
</site>


_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev



_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev



--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource

Back to the top