Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 将Apache Thrift添加到OSGi Bndtools项目_Java_Eclipse_Osgi_Thrift_Bndtools - Fatal编程技术网

Java 将Apache Thrift添加到OSGi Bndtools项目

Java 将Apache Thrift添加到OSGi Bndtools项目,java,eclipse,osgi,thrift,bndtools,Java,Eclipse,Osgi,Thrift,Bndtools,我正在Eclipse中使用Bndtools。我试图将Apache Thrift作为依赖项添加到项目中。My build.bnd有以下代码用于添加Maven Central和Nexus存储库: -plugin.5.Nexus = \ aQute.bnd.repository.maven.pom.provider.BndPomRepository; \ releaseUrls=https://<NEXUS_URL>:8081/content/groups/publ

我正在Eclipse中使用Bndtools。我试图将Apache Thrift作为依赖项添加到项目中。My build.bnd有以下代码用于添加Maven Central和Nexus存储库:

-plugin.5.Nexus = \
    aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
        releaseUrls=https://<NEXUS_URL>:8081/content/groups/public/    ; \
        snapshotUrls=https://<NEXUS_URL>:8081/content/groups/public/    ; \
        index=${.}/release.maven; \
        pom = ${workspace}/cnf/maven-nexus.xml; \
        name="Nexus"

-plugin.6.MavenCentral: \
    aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
        releaseUrls = https://repo1.maven.org/maven2/; \
        pom = ${workspace}/cnf/maven-central.xml; \
        name = Maven Central
-plugin.7.MavenCentralAlternative = \
    aQute.bnd.repository.maven.provider.MavenBndRepository; \
        releaseUrl=https://repo.maven.apache.org/maven2/; \
        index=${.}/central.maven; \
        name="Maven Central Alternative"
我还尝试了org.apache.libthrift,但我发现这应该是正确的OSGi捆绑包名称。我总是很紧张

找不到/error/org.apache.thrift;找不到版本=0

我是不是遗漏了什么?我是OSGi的新手,所以我可能会错过一些非常明显的东西。我也不确定我的存储库配置是否正确。不过,其他依赖项也可以正常工作。谢谢你的建议

编辑: 可能作为附加信息:在Eclipse中,build.bnd文件在GUI视图中显示为空。这是否意味着,我的项目在某种程度上被破坏了,或者这是正常的?

EDIT2:为了进行测试(没有帮助),我还使用mavenndrepository插件将Maven Central添加到BndPomRepository中:

-plugin.5.Nexus = \
    aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
        releaseUrls=https://<NEXUS_URL>:8081/content/groups/public/    ; \
        snapshotUrls=https://<NEXUS_URL>:8081/content/groups/public/    ; \
        index=${.}/release.maven; \
        pom = ${workspace}/cnf/maven-nexus.xml; \
        name="Nexus"

-plugin.6.MavenCentral: \
    aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
        releaseUrls = https://repo1.maven.org/maven2/; \
        pom = ${workspace}/cnf/maven-central.xml; \
        name = Maven Central
-plugin.7.MavenCentralAlternative = \
    aQute.bnd.repository.maven.provider.MavenBndRepository; \
        releaseUrl=https://repo.maven.apache.org/maven2/; \
        index=${.}/central.maven; \
        name="Maven Central Alternative"
编辑3:这个问题必须与节俭有关。所有其他软件包都很好用,只是没有找到节俭。我目前的解决方法是手动将Thrift jar添加到项目中,并将其依赖项引用为OSGi包,就像我第一次尝试添加Thrift一样。显然,我现在得到了这个警告:

Bndtools:.classpath包含一个不可用的库 在持续集成期间


你是否“踢”了build.bnd文件?只需用空格修改文件并保存即可。有时候bndtools需要一个kick来获取更改。是的,我在build.bnd和bnd.bnd文件中都尝试过。我还多次尝试刷新存储库。一旦我也关闭了Eclipse,就删除了“.bnd/”中的缓存文件夹并再次启动它。那么libthrift在你的nexus中吗?(您可以尝试使用central来测试其余部分)起初情况并非如此。起初,我试图使用我的Maven Central规范获得它。如果在Nexus上找不到它,它会自动使用中央处理器,这难道不是这样吗?无论如何,为了测试,我也将它添加到了Nexus中,但不幸的是,这并没有改变任何东西?