我试图构建一个依赖于< code > org . Apache . UIMA . runtime 的插件,它是托管在UIMA Eclipse更新站点上的UIMA Eclipse插件的一部分。这个更新站点是一个旧式的(p2之前的)更新站点,所以我知道Tycho不会解决这些依赖性。所以我试图制作UIMA Eclipse更新站点的本地副本,将其升级到p2,然后从那里获得依赖项。以下是我的尝试:
$ svn co http://svn.apache.org/repos/asf/uima/uimaj/trunk/uimaj-eclipse-update-site/
...
Checked out revision 1395335.
$ java -jar /.../eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar \
-application org.eclipse.equinox.p2.publisher.UpdateSitePublisher \
-metadataRepository file:/.../uimaj-eclipse-update-site \
-artifactRepository file:/.../uimaj-eclipse-update-site \
-source /.../uimaj-eclipse-update-site
Generating metadata for ..
Generation completed with success [0 seconds].
如果我查看< code > ui maj-eclipse-update-site 目录,我现在会看到一个< code>artifacts.xml和一个< code>content.xml,所以看起来是正确的。我还用p2存储库浏览器检查了它,没有任何东西显示为“部分”,我可以看到一个< code > org . Apache . UIMA . runtime . feature . jar 2 . 4 . 0 和一个< code > org . Apache . UIMA . runtime . feature . group 2 . 4 . 0 。
现在,我将这个本地站点添加到Eclipse插件的pom.xml中:
<repository>
<id>uima</id>
<layout>p2</layout>
<url>file:/.../uimaj-eclipse-update-site</url>
</repository>
当我在更新的项目中运行mvn-compile
时,Tycho找到了本地更新站点,但仍然找不到org.apache.uima.runtime
:
...
[INFO] Adding repository file:/.../uimaj-eclipse-update-site
[INFO] Adding repository file:/.../uimaj-eclipse-update-site
[INFO] Resolving dependencies of MavenProject: org.cleartk:org.cleartk.plugin.jcasgen.m2e:0.9.1.qualifier @ /.../jcasgen-m2e-connector/org.cleartk.plugin.jcasgen.m2e/pom.xml
[INFO] Cannot complete the request. Generating details.
[INFO] Cannot complete the request. Generating details.
[INFO] {osgi.ws=cocoa, osgi.os=macosx, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.cleartk.plugin.jcasgen.m2e 0.9.1.qualifier
[ERROR] Missing requirement: org.cleartk.plugin.jcasgen.m2e 0.9.1.qualifier requires 'bundle org.apache.uima.runtime [2.4.0,3.0.0)' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable."
...
我做错了什么?
如果要复制错误,我正在从该目录运行mvn compile
(如上修改pom. xml后):
http://cleartk.googlecode.com/git/jcasgen-m2e-connector/
编辑:我确实在生成的artifacts.xml
中看到了org.apache.uima.runtime
:
<artifact classifier='org.eclipse.update.feature' id='org.apache.uima.runtime' version='2.4.0'>
<properties size='4'>
<property name='artifact.size' value='9466'/>
<property name='download.size' value='9466'/>
<property name='download.md5' value='f9d4f1f8dc54f0a99379dcede2fc2700'/>
<property name='download.contentType' value='application/zip'/>
</properties>
</artifact>
浏览svn repo链接,看起来插件目录是空的,只有特性。您可能只需要首先运行maven来“构建”它并填充插件目录。
如果您拥有所有内容,您可以运行p2功能和捆绑发布器应用程序以直接生成p2存储库。如果要在Tycho构建中使用它,则不需要生成更新站点的类别端。
我迟到了,但Apache UIMA现在有一个p2存储库。
在您的pom. xml中添加uima存储库:
<repositories>
<repository>
<id>uima</id>
<url>http://www.apache.org/dist/uima/eclipse-update-site</url>
<layout>p2</layout>
</repository>
</repositories>