tycho发布具有安装功能历史的p2站点

时间:2018-03-27 21:36:55

标签: tycho p2

我想询问如何使用tycho保存可下载的插件的历史记录。

以下是该方案:

  1. 我有一些使用Eclipse“Build Site”功能构建的功能版本(feature.1.0.0,feature.2.0.0等)。
  2. 通过阅读site.xml,从Eclipse创建了元数据,content.jar和artifacts.jar。
  3. 现在我有maven tycho来自动创建p2存储库。
  4. 我看到tycho如何使用category.xml生成p2 repo。
  5. 但我不明白如何包含历史记录,因为tycho(或实际上由tycho调用的库,internal.p2.director.Projector)不喜欢category.xml中的功能历史。
  6. 当我运行mvn包时:

        at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:120)
        at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
        at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
        at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
        at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke (Method.java:483)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
    Caused by: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from com.myfeature.releng.p2 raw:0.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.0-SNAPSHOT to com.myfeature.plugin.feature.feature.group [13.7.0,13.7.1).; Unable to satisfy dependency from com.myfeature.releng.p2 raw:0.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.0-SNAPSHOT to com.myfeature.plugin.feature.feature.group [13.8.0,13.8.1).; Unable to satisfy dependency from com.myfeature.releng.p2 raw:0.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.0-SNAPSHOT to com.myfeature.feature.group [13.8.1,13.8.2).; Unable to satisfy dependency from com.myfeature.releng.p2 raw:0.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.0-SNAPSHOT to com.myfeature.feature.group [13.8.2,13.8.3).; ]
        at org.eclipse.tycho.p2.util.resolution.AbstractResolutionStrategy.newResolutionException (AbstractResolutionStrategy.java:98)
        at org.eclipse.tycho.p2.util.resolution.ProjectorResolutionStrategy.resolve (ProjectorResolutionStrategy.java:88)
        at org.eclipse.tycho.p2.util.resolution.AbstractResolutionStrategy.resolve (AbstractResolutionStrategy.java:63)
        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:166)
        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:103)
    

    如何使用tycho构建生产p2站点(具有功能历史记录)?

    我的包结构基于this fabulous blog

    谢谢!

1 个答案:

答案 0 :(得分:-1)

我终于想通了......

将所有东西投入生产......

  1. https://eclipse.org/package-drone/
  2. 要安装https://wiki.eclipse.org/PackageDrone/Installation
  3. 现在它已经启动并运行了。创建一个您可以在admin以外登录的用户名。
  4. 登录以创建频道,说频道名称为" my_payload"
  5. 在渠道内,分配部署组和部署密钥
  6. (最重要)频道必须具备以下几个方面:
    • 的OSGi
    • P2存储库
    • P2 Unzip
    • 散列器
  7. (必须在#8之前)上传category.xml

    <site>
        <description name="my update site" url="http://your-p2-repo/my_channel/">
         My update site
        </description>
        <category-def name="my company's extensions for you" label="my company extension"/>
    </site>
    
  8. 使用REST调用上传tycho生成的p2 repo zip。

  9. 请注意,当您从&#34;安装新软件&#34;在您的应用中,该类别将合并版本的历史记录。 p2 repo将为您生成元数据。
  10. 希望你明白!我会在某些方面写一篇关于细节的博客!