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??

Cannot generate *TO* an http:// address? Of course not; p2 metadata generator works locally, and doesn't POST the results via a CGI form.

http://wiki.eclipse.org/Equinox_p2_Metadata_Generator#Generating_metadata_from_an_update_manager_site

Once you have the jars, the site.xml, and the metadata, you can copy it, rsync it, or scp it where it needs to go.

Eric Gwin wrote:
All,

As the below email states, I have gotten past the generation of categories locally. I thought I had resolved all the issues, and I may have if I was generating the repositories locally and and copying them to the net.

However, there appears to be some difference when generating from the build machine. It appears that the repository URL must match exactly between site.xml and the generator command-line. I cannot generate to http://download.eclipse.org/... - I get a Java 13 error unless I use file:///home/data/httpd/download.eclipse.org..

I've tried also setting that as the site url in site.xml, but it still won't generate categories.

Anyone have any insight, or an idea how I could circumvent the issue?

-Eric

Eric Gwin wrote:
Thanks all!!

Turns out it was the syntax error(s) in the site.xml that was causing my problem.

For posterity:
Once I got rid of the extraneous ".jar" in the version strings everything was fine. Since that was a manual typo, it appears that the header is vital (I added it yesterday after an exhaustive comparison with other P2 sites - see header below). My site.xml did not work previously without it, with the jar names and versions programmatically generated(My guess is that the URL is most vital), but it probably needs to match the actual repos properly (pak200 is probably vital too). I also rearranged the order of some feature and category attributes but doubt that made much difference (but who knows):
<site pack200="true">
  <description
     url="file:/C:/__AA_TestRepos">
EclipseLink Milestones: contains runtime and source features for JPA, MOXy and SDO components
  </description>

- removing the -source -features and -bundles arguments to the metadata generator made no difference - having the site.xml actually in the repository didn't matter either (but it did need to exist where -site <url> argument pointed).

Basically, no errors or warnings being reported was causing me to go astray - an invalid site.xml wasn't reported, nor was a missing one. Now that I've got this issue licked I'll implement it, and then see about adopting the new tools and techniques.

Thanks again.

-Eric

Ian Bull wrote:
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 <mailto: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:
    Eric Gwin <eric.gwin@xxxxxxxxxx <mailto:eric.gwin@xxxxxxxxxx>>
    To:
    Cross project issues <cross-project-issues-dev@xxxxxxxxxxx
    <mailto: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??
    Sent by:
    cross-project-issues-dev-bounces@xxxxxxxxxxx
    <mailto:cross-project-issues-dev-bounces@xxxxxxxxxxx>



    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
    <http://P2.release.repos.name>"   value="EclipseLink
    Repository"/>
       <property name="metadata.repos.name <http://metadata.repos.name>"
    value="&quot;${P2.release.repos.name
    <http://P2.release.repos.name>}&quot;"/>
       <property name="artifact.repos.name
    <http://artifact.repos.name>"     value="&quot;EclipseLink
    Artifacts&quot;"/>

       <target name="generate-p2-repos">
           <echo message="Site url='${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
    <http://metadata.repos.name>}" />
               <arg line=" -artifactRepository ${p2.repository.url}/
    -artifactRepositoryName ${artifact.repos.name
    <http://artifact.repos.name>}" />
               <arg line=" -compress -reusePack200Files" />
           </java>
       </target>

    Site.xml:

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

    id="org.eclipse.persistence.jpa.source"
    version="1.1.2.v20090515-r4235.jar">
         <category name="EclipseLink 1.1.2-M1"/>
      </feature>
      <feature
url="features/org.eclipse.persistence.moxy_1.1.2.v20090515-r4235.jar" id="org.eclipse.persistence.moxy" version="1.1.2.v20090515-r4235.jar">
         <category name="EclipseLink 1.1.2-M1"/>
      </feature>
      <feature
url="features/org.eclipse.persistence.moxy.source_1.1.2.v20090515-r4235.jar"

    id="org.eclipse.persistence.moxy.source"
    version="1.1.2.v20090515-r4235.jar">
         <category name="EclipseLink 1.1.2-M1"/>
      </feature>
      <feature
    url="features/org.eclipse.persistence.sdo_1.1.2.v20090515-r4235.jar"
id="org.eclipse.persistence.sdo" version="1.1.2.v20090515-r4235.jar">
         <category name="EclipseLink 1.1.2-M1"/>
      </feature>
      <feature
url="features/org.eclipse.persistence.sdo.source_1.1.2.v20090515-r4235.jar"

    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
    <mailto: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
    <mailto: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
------------------------------------------------------------------------

_______________________________________________
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

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

--
Nick Boldt :: http://wiki.eclipse.org/User:Nickb
Release Engineer :: Eclipse Modeling & Dash Athena


Back to the top