【发布时间】:2014-03-11 11:35:47
【问题描述】:
我已将我的 pom 项目转换为捆绑项目。我写
<packaging>bundle</packaging> 在 pom.xml 中。我在 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
我能做什么?请帮帮我!!!
编辑的代码示例块
【问题讨论】:
-
容器中是否有一个包含并导出这些包的包?你用这些包吗?如果没有,您可以在 Import-Package 指令中使用“bibliotek.*;resolution:=optional”,这样它们在运行时就不是强制性的。但是,如果您需要这么多包或可选包,请考虑制作更多更小的包,而不是这么大的包。
-
我没有在import export-package标签里写东西。只有两个依赖。
org.dockingframes docking-frames-common 1.1.1 com.miglayout groupId> miglayout-core 4.2