2

I am trying to port an existing EclipsePDE application to BNDTools, but I am running into a problem.

I have a project with multiple sub bundles. One of them uses org.jscience, which I get from a non-indexed Nexus repository. This is the bnd.bnd file:

-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

I added the dependency to org.jscience by hand.

This is the .bnd file for the sub bundle in question:

Export-Package:  \
    com.mycompany.commons.util.encryption,\
    com.mycompany.commons.util.osgi,\
    com.mycompany.commons.util

The dependency to org.jscience.physics.amount is visible in the "Calculated Imports" for the sub bundle. There are no compilation errors (or any other errors on the project for that matter).

This is the .bndrun file I am having trouble with:

-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)'

(I know the naming of the package and bundles is weird but that's not the problem right now)

Using this run config, I tried using the "Resolve" button to resolve the run bundles required for the run config, but I get the following message:

requires com.mycompany.commons.commons.util
com.mycompany.commons.commons.util 0.0.0 requires Import-Package: javax.measure.quantity

I tried creating the run bundles myself, like this:

-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

But if I try to run the run config I just get the message that org.jscience could not be found.

Surely I'm doing something wrong, but what? Any help is greatly appreciated.

David ten Hove
  • 2,748
  • 18
  • 33

0 Answers0