Without seeing a wider picture of what you're doing it seems you may have a
couple too many dependencies.

First of all you can likely remove any of the bnd things because those are
typically plugin dependencies rather than project dependencies.

Second, I would lower the dependency of
`org.osgi.service.component.annotations`
to 1.3 just for sanity because the RIs for all the 1.4 features aren't yet
complete and to save yourself the pain of bleeding edge.

Third, use the correct core dep (the one you have is old and wrong and for
maintainability you want the right one).

What are you using osgi.annotations for? You probably want the individual
parts rather than the aggregate.

Do you really need the SCR annotations?

In the end I would start with just these:

    <dependencies>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
            <version>6.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.annotation</artifactId>
            <version>6.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.component.annotations</artifactId>
            <version>1.3.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.metatype.annotations</artifactId>
            <version>1.4.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

Then I'd create a separate project to hold the runtime dependencies and
build your application assembly.

Would be possible to share your project via something like github so that
we can make more concrete suggestions?

- Ray


On Tue, May 29, 2018 at 9:30 AM, Peter Nabbefeld <peter.nabbef...@gmx.de>
wrote:

>
> Hello,
>
> I tried to use/update an example I found for Declarative Services (using
> Eclipse, i.e. equinox instead of NetBeans and Felix).
>
> When starting my bundle in Felix I get:
> Unresolved requirements: [[org.example.SampleExporter [15](R 15.0)]
> osgi.extender; (&(osgi.extender=osgi.componen
> t)(version>=1.3.0)(!(version>=2.0.0)))]
>
> The dependencies part in my POM are:
>     <dependencies>
>         <dependency>
>             <groupId>org.osgi</groupId>
>             <artifactId>org.osgi.core</artifactId>
>             <version>6.0.0</version>
>             <scope>provided</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.osgi</groupId>
> <artifactId>org.osgi.annotation</artifactId>
>             <version>6.0.0</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>org.osgi</groupId>
> <artifactId>org.osgi.service.component.annotations</artifactId>
>             <version>1.4.0</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>org.osgi</groupId>
> <artifactId>org.osgi.service.metatype.annotations</artifactId>
>             <version>1.4.0</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.felix</groupId>
> <artifactId>org.apache.felix.scr</artifactId>
>             <version>2.1.0</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.felix</groupId>
> <artifactId>org.apache.felix.scr.annotations</artifactId>
>             <version>1.12.0</version>
>         </dependency>
>         <dependency>
>             <groupId>biz.aQute</groupId>
>             <artifactId>bndlib</artifactId>
>             <version>2.0.0.20130123-133441</version>
>         </dependency>
>     </dependencies>
>
> The last 3 dependencies are not "original" ones, they've been added after
> I alredy got the error message, but they don't help either.
>
> As I'm new to OSGi, I don't know, yet, how to find out what I have to do.
> Do I need to install some bundles first?
>
> Kind regards
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Reply via email to