【问题标题】:Tycho Artifactory local repo; dependency to org.eclipse.jet unsolved?Tycho Artifactory 本地回购;对 org.eclipse.jet 的依赖未解决?
【发布时间】:2014-01-24 20:03:32
【问题描述】:

我正在创建一些 OSGI 模块,其中包含许多需要来自 p2 存储库的依赖项的插件和功能...

  • 我用tycho和artifactory
  • 为了满足这些依赖,我添加了 Kepler repo,(tycho can't resolve dependencies from local repo)...

我的主要 pom.xml:

<repository>
<layout>p2</layout>
<id>kepler</id>
<url>http://download.eclipse.org/releases/kepler</url>
</repository>

和其他神器本地仓库

<repository>
<id>central</id>
<url>{server.addr}/libs-release </url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
.......

一切似乎都很好,除了这个错误:

Caused by: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from xx.xx.xx.xxx.xxx  to bundle org.eclipse.jet 1.1.1.; No solution found because the problem is unsatisfiable.] ???

如何找到这个依赖:org.eclipse.jet ???为什么在 Kepler p2 中找不到第谷?

【问题讨论】:

    标签: eclipse maven tycho


    【解决方案1】:

    org.eclipse.jet 不是 Kepler p2 存储库的一部分,例如,您可以用这个 shell 脚本找出答案:

    eclipse -application org.eclipse.equinox.p2.director \
        -repository http://download.eclipse.org/releases/kepler \
        -list | grep -F 'org.eclipse.jet'
    

    如果您可以找到包含该捆绑包的 p2 存储库,您也可以通过将其添加到 pom.xml 中来引用该 p2 存储库,方法与 Kepler 存储库相同。

    http://www.eclipse.org/modeling/m2t/updates/ 列出了建模项目的一些 p2 存储库。其中一个可能还包括您想要的捆绑包(及其依赖项)。

    【讨论】:

    • 感谢您的重播。链接中的所有站点都不起作用...我每次都收到此错误:未找到存储库...
    • 如果网站上列出的存储库不起作用,您可能应该在项目上open a bug report
    【解决方案2】:

    我解决了问题...这是解决方案,可能对某人有用:

    -首先从(http://www.eclipse.org/modeling/m2t/downloads/?project=jet)下载org.eclipse.jet。

    -在 Artifactory (libs-release-local) 中部署“org.eclipse.jet_1.1.1.v201101311015.jar”

    -Artifactory 将生成包含依赖项的代码:

    <dependency>
    <groupId>org.eclipse.jet</groupId>
    <artifactId>org.eclipse.jet</artifactId>
    <version>1.1.1</version>
    </dependency>
    

    -在我们需要jet的模块的pom.xml文件中添加这个依赖声明(不在main pom.xml中)

    -构建项目(为此我使用 Jenkins)。 -成功...

    注意,jet 也需要这个依赖:

    <dependency>
    <groupId>org.eclipse.jet</groupId>
    <artifactId>org.eclipse.jet.core</artifactId>
    <version>1.2.1</version>
    </dependency>
    

    可能有更好的解决方案,但现在我将使用它。基于某些论坛,JET 已被 Xtend 或 Acceleo 等更新的工具所取代。 所以很快我就会切换到这个新的解决方案......

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-12
      • 2015-07-19
      • 2014-05-04
      • 2012-11-09
      相关资源
      最近更新 更多