简体   繁体   中英

Maven OSGI unresolved dependencies

I have converted my pom project to bundle Project. I wrote <packaging>bundle</packaging> in pom.xml. and I have added in pom.xml, which is in parent project these maven tag allows.

<pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.4.0</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle</id>
                        <phase>process-classes</phase>
                        <goals>    
                            <goal>manifest</goal>
                        </goals>   
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </pluginManagement> 

and Manifest.mf was generated automatically at META-INF in module pom.xml. Manifest.MF is as follow

`Bundle-SymbolicName: at.ac.ait.dockingframes-ext
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: at.ac.ait.dockingframes.theme;version="1.0.0.SNAPSHOT";u
ses:="bibliothek.extension.gui.dock.theme,bibliothek.extension.gui.dock
.theme.eclipse,bibliothek.extension.gui.dock.theme.eclipse.stack,biblio
thek.extension.gui.dock.theme.eclipse.stack.tab,bibliothek.gui,biblioth
ek.gui.dock.action,bibliothek.gui.dock.action.view,bibliothek.gui.dock.
common,bibliothek.gui.dock.common.theme,bibliothek.gui.dock.themes,bibl
iothek.gui.dock.themes.basic,bibliothek.gui.dock.themes.basic.action,bi
bliothek.gui.dock.title",at.ac.ait.dockingframes.theme.stack.tab;versio
n="1.0.0.SNAPSHOT";uses:="bibliothek.extension.gui.dock.theme.eclipse.s
tack,bibliothek.extension.gui.dock.theme.eclipse.stack.tab,bibliothek.g
ui",test;version="1.0.0.SNAPSHOT";uses:="bibliothek.extension.gui.dock.
theme.eclipse,bibliothek.gui,bibliothek.gui.dock.action,bibliothek.gui.
dock.action.view,bibliothek.gui.dock.common,bibliothek.gui.dock.common.
action,bibliothek.gui.dock.themes.basic.action"
Import-Package: bibliothek.gui.dock.util,bibliothek.gui.dock.common.acti
on.core,bibliothek.util,bibliothek.gui.dock.util.font,bibliothek.gui.do
ck.util.color,bibliothek.gui.dock.common.action,bibliothek.gui.dock.com
mon.intern,bibliothek.gui.dock.themes.basic.action,bibliothek.gui.dock.
title,bibliothek.gui.dock.action,bibliothek.gui.dock.support.util,bibli
othek.gui,bibliothek.gui.dock.station.stack.tab,bibliothek.gui.dock.com
mon.menu,bibliothek.util.xml,bibliothek.gui.dock.facile.menu,bibliothek
.gui.dock.action.actions,bibliothek.gui.dock.themes.color,bibliothek.gu
i.dock.themes,bibliothek.extension.gui.dock.theme.eclipse,bibliothek.gu
i.dock.support.menu,bibliothek.extension.gui.dock.theme.eclipse.stack.t
ab,bibliothek.gui.dock.themes.basic,bibliothek.gui.dock.common.location
,bibliothek.gui.dock.action.view,bibliothek.gui.dock.common.theme,bibli
othek.gui.dock.common,bibliothek.gui.dock.station.split,bibliothek.exte
nsion.gui.dock.theme,bibliothek.extension.gui.dock.theme.eclipse.stack,
bibliothek.gui.dock.layout,bibliothek.gui.dock.event,bibliothek.gui.doc
k.util.property,bibliothek.gui.dock.station.screen.layer,bibliothek.gui
.dock.util.extension,bibliothek.gui.dock.perspective,bibliothek.gui.doc
k.station.split.layer,bibliothek.gui.dock.station,bibliothek.gui.dock.s
tation.support,bibliothek.gui.dock.station.layer,bibliothek.gui.dock.st
ation.screen,bibliothek.gui.dock.control.focus,bibliothek.gui.dock.cont
rol.relocator,bibliothek.gui.dock.common.event,bibliothek.gui.dock.stat
ion.flap.button,bibliothek.gui.dock.station.screen.window,bibliothek.gu
i.dock.station.stack,bibliothek.gui.dock.util.icon,bibliothek.gui.dock.
station.flap.layer,bibliothek.gui.dock.dockable,bibliothek.gui.dock.sta
tion.stack.tab.layouting,bibliothek.gui.dock.security,bibliothek.gui.do
ck.station.flap,bibliothek.gui.dock.control,bibliothek.gui.dock.accept,
bibliothek.gui.dock.disable,bibliothek.gui.dock.displayer,bibliothek.gu
i.dock.station.screen.magnet
Tool: Bnd-2.1.0.20130426-122213`

and if I want my project to export as clean and build, I get the following error message

Bundle : at.ac.ait:dockingframes-ext:jar:1.0-SNAPSHOT has unresolved package dependencies:        
bibliothek.gui.dock.action.actions
bibliothek.gui.dock.disable
bibliothek.gui.dock.action
bibliothek.gui.dock.control.relocator    
bibliothek.gui.dock.station.stack.tab
bibliothek.gui.dock.station.stack.tab.layout
bibliothek.gui.dock.support.util
bibliothek.gui.dock.support.menu
bibliothek.gui.dock.station.flap
bibliothek.gui.dock.util.color
bibliothek.gui.dock.util.property
bibliothek.gui.dock.accept
bibliothek.gui.dock.control.focus
bibliothek.gui.dock.station.split
bibliothek.gui.dock.displayer
bibliothek.extension.gui.dock.theme
bibliothek.gui.dock.themes.basic
bibliothek.gui.dock.station.screen
bibliothek.gui.dock.util
bibliothek.gui.dock.station.layer
bibliothek.gui.dock.control
bibliothek.gui.dock.title
bibliothek.gui.dock.station.screen.magnet
bibliothek.gui.dock.station.flap.layer
bibliothek.extension.gui.dock.theme.eclipse
bibliothek.gui.dock.security
bibliothek.gui.dock.util.font
bibliothek.gui.dock.util.icon
bibliothek.gui.dock.common.location
bibliothek.gui.dock.station
bibliothek.extension.gui.dock.theme.eclipse.stack.tab
bibliothek.util.xml
bibliothek.util
bibliothek.gui.dock.station.screen.layer
bibliothek.gui.dock.common.action
bibliothek.gui.dock.action.view
bibliothek.gui.dock.common.event
bibliothek.gui.dock.common
bibliothek.gui.dock.layout
bibliothek.gui.dock.common.intern
bibliothek.gui.dock.facile.menu
bibliothek.gui.dock.themes.color
bibliothek.gui.dock.common.theme
bibliothek.gui.dock.dockable
bibliothek.gui.dock.station.support
bibliothek.gui
bibliothek.gui.dock.common.action.core
bibliothek.gui.dock.themes.basic.action
bibliothek.extension.gui.dock.theme.eclipse.stack
bibliothek.gui.dock.event
bibliothek.gui.dock.common.menu
bibliothek.gui.dock.util.extension
bibliothek.gui.dock.station.split.layer
bibliothek.gui.dock.station.flap.button
bibliothek.gui.dock.station.screen.window
bibliothek.gui.dock.perspective
bibliothek.gui.dock.station.stack
bibliothek.gui.dock.themes

What can I do ? Please help me !!!

edited code sample block

The error message is correct and describes the problem perfect: You miss packages in your environment to import them to the bundle classloader.

So you have to deploy the Bundle which provides bibliothek.* first. You should also check the manifests in your "bibliothek"-bundles.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM