Java 包含来自非索引存储库的依赖项时出现问题
我试图将现有的EclipsePDE应用程序移植到BNDTools,但遇到了一个问题 我有一个有多个子包的项目。其中一个使用org.jscience,这是我从一个非索引的Nexus存储库获得的。这是bnd.bnd文件:Java 包含来自非索引存储库的依赖项时出现问题,java,eclipse,bndtools,Java,Eclipse,Bndtools,我试图将现有的EclipsePDE应用程序移植到BNDTools,但遇到了一个问题 我有一个有多个子包的项目。其中一个使用org.jscience,这是我从一个非索引的Nexus存储库获得的。这是bnd.bnd文件: -sub: \ *.bnd -runee: JavaSE-1.8 -runfw: org.apache.felix.framework;version='[4.2.1,4.2.1]' -buildpath: \ osgi.core,\ osgi.cmp
-sub: \
*.bnd
-runee: JavaSE-1.8
-runfw: org.apache.felix.framework;version='[4.2.1,4.2.1]'
-buildpath: \
osgi.core,\
osgi.cmpn,\
biz.aQute.bnd.annotation,\
org.apache.felix.http.jetty,\
org.apache.felix.http.whiteboard,\
org.eclipse.jdt:org.eclipse.jdt.annotation;version=2.0.0,\
slf4j.api,\
org.apache.commons.collections,\
org.apache.commons.lang3,\
biz.aQute.junit,\
org.apache.commons.io,\
org.jscience:jscience;version=4.3.1,\
com.vaadin:vaadin-server;version=7.3.6
我手动将依赖项添加到org.jscience
这是有关子捆绑包的.bnd文件:
Export-Package: \
com.mycompany.commons.util.encryption,\
com.mycompany.commons.util.osgi,\
com.mycompany.commons.util
对org.jscience.physics.amount的依赖关系在子包的“计算导入”中可见。没有编译错误(或项目中的任何其他错误)
这是我遇到问题的.bndrun文件:
-runfw: org.apache.felix.framework;version='[4.4.1,4.4.1]'
-runee: JavaSE-1.8
-runsystemcapabilities: ${native_capability}
-resolve.effective: active;skip:="osgi.service"
-runrequires: \
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
osgi.identity;filter:='(osgi.identity=com.mycompany.commons.commons.util)'
(我知道包和捆绑包的命名很奇怪,但这不是现在的问题)
使用此运行配置,我尝试使用“Resolve”按钮解析运行配置所需的运行包,但收到以下消息:
requires com.mycompany.commons.commons.util
com.mycompany.commons.commons.util 0.0.0 requires Import-Package: javax.measure.quantity
我尝试自己创建跑步包,如下所示:
-runfw: org.apache.felix.framework;version='[4.4.1,4.4.1]'
-runee: JavaSE-1.8
-runsystemcapabilities: ${native_capability}
-resolve.effective: active;skip:="osgi.service"
-runrequires: \
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
osgi.identity;filter:='(osgi.identity=com.mycompany.commons.commons.util)'
-runbundles: \
ch.qos.logback.classic;version='[1.1.2,1.1.3)',\
ch.qos.logback.core;version='[1.1.2,1.1.3)',\
com.mycompany.commons.commons.util;version=latest,\
org.apache.commons.collections;version='[3.2.1,3.2.2)',\
org.apache.commons.lang3;version='[3.1.0,3.1.1)',\
org.apache.felix.gogo.command;version='[0.14.0,0.14.1)',\
org.apache.felix.gogo.runtime;version='[0.12.1,0.12.2)',\
org.apache.felix.gogo.shell;version='[0.10.0,0.10.1)',\
slf4j.api;version='[1.7.7,1.7.8)',\
org.jscience;version=latest
但是,如果我尝试运行run配置,我只会得到一条消息:org.jscience找不到
我肯定做错了什么,但是什么?非常感谢您的帮助