Maven OSGI未解析的依赖项

时间:2014-03-11 11:35:47

标签: java maven osgi

我已将我的pom项目转换为捆绑项目。我写 pom.xml中的<packaging>bundle</packaging>。我已经在pom.xml中添加了这个maven标签允许的父项目。

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

和Manifest.mf是在模块pom.xml中的META-INF自动生成的。 Manifest.MF如下

`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`

如果我希望我的项目导出为干净和构建,我收到以下错误消息

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

我该怎么办?请帮帮我!!!

已编辑的代码示例块

1 个答案:

答案 0 :(得分:0)

错误消息是正确的并且描述了完美的问题:您错过了环境中的包以将它们导入到bundle类加载器中。

所以你必须首先部署提供图书馆的Bundle。*您还应该检查“bibliothek” - 捆绑中的清单。