1

我正在使用 Eclipse 3.5 开发 Eclipse RCP 应用程序。

我的问题是,当我在两个插件之间添加依赖项时,另一个插件的类突然似乎被忽略并显示编译错误。这是设置:

  • 一个核心插件
  • 一个依赖core的插件M1
  • 一个插件 M2 也依赖于核心

当我将依赖项从 M2 添加到 M1 时,来自 M2 中“核心”的每个类都显示为编译错误。

当我删除此依赖项时,一切都会恢复正常:M2 中使用的核心类现在可以正确编译。

有人见过这个吗?:-)

谢谢你的帮助!

按照要求:

核心清单:
清单版本:1.0
捆绑清单版本:2
捆绑名称:mysoftware 核心
捆绑符号名称:com.mycompany.mysoftware.core;singleton:=true
捆绑版本:2.7.2.qualifier
要求捆绑:组织。 eclipse.core.runtime,
org.eclipse.ui,
org.eclipse.gef,
org.eclipse.ui.views.log,
org.eclipse.equinox.p2.artifact.repository,
org.eclipse.equinox.p2.core,
org.eclipse.equinox.p2.director、
org.eclipse.equinox.p2.engine、
org.eclipse.equinox.p2.metadata、
org.eclipse.equinox.p2.metadata.repository、
org.eclipse.equinox.p2。存储库,
org.eclipse.equinox.p2.updatesite,
org.eclipse.equinox.p2.extensionlocation、
org.eclipse.ecf、
org.eclipse.ecf.filetransfer、
org.eclipse.ecf.identity、
org.eclipse.ecf.provider.filetransfer、
org.eclipse.ecf.provider。 filetransfer.httpclient、
org.apache.commons.codec、
org.apache.commons.httpclient、
org.eclipse.equinox.frameworkadmin.equinox、
org.eclipse.equinox.simpleconfigurator.manipulator、
org.eclipse.equinox.p2.touchpoint。 natives,
org.eclipse.equinox.frameworkadmin,
org.eclipse.equinox.p2.touchpoint.eclipse,
org.eclipse.equinox.p2.garbagecollector
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
libs/jaxb-api- 2.1.jar,
libs/jaxb-impl-2.1.8.jar、
libs/activation-1.1.jar、
libs/persistence-api-1.0.jar、
libs/stax-api-1.0-2.jar、
libs/jcalendar-1.3.2。 jar、
libs/log4j-1.2.13.jar、
libs/miglayout-3.7.jar、
libs/xalan-2.6.0.jar、
libs/xercesImpl-2.4.0.jar、
libs/glazedlists-1.7.0_java15.jar、
libs/jcommon-1.0.16.jar、
libs/jfreechart-1.0.13-experimental.jar、
libs/jfreechart-1.0.13-swt.jar、
libs/jfreechart-1.0.13.jar、
libs/swtgraphics2d.jar、
libs/org.sf.feeling.swt.win32.extension_1.0.5.v20081205.jar、
libs/junit-4.5.jar、
libs/dsn.jar、
libs/imap.jar、
libs/mailapi.jar、
libs/smtp。罐,
libs/jnotify-0.93.jar、
libs/groovy-all-1.7.6.jar、
libs/joda-time-2.0.jar、
libs/commons-io-2.0.1.jar
捆绑激活器:com.mycompany.mysoftware .rcp.main.Activator
导出包:ca.odell.glazedlists、
ca.odell.glazedlists.event、
ca.odell.glazedlists.gui、
ca.odell.glazedlists.impl、
ca.odell.glazedlists.impl.adt、
ca.odell.glazedlists.impl.adt.barcode2、
ca.odell.glazedlists.impl.adt.gnutrove、
ca.odell.glazedlists.impl.beans、
ca.odell.glazedlists.impl.ctp、
ca.odell.glazedlists。 impl.filter、
ca.odell.glazedlists.impl.gui、
ca.odell.glazedlists.impl.io、
ca.odell.glazedlists.impl.java15、
ca.odell.glazedlists.impl.matchers、
ca.odell.glazedlists.impl.nio、
ca.odell.glazedlists.impl.pmap、
ca.odell.glazedlists.impl.rbp、
ca.odell.glazedlists.impl.sort、
ca.odell.glazedlists.impl.swing、
ca.odell.glazedlists.impl.swt、
ca.odell.glazedlists.io、
ca.odell.glazedlists.jfreechart、
ca.odell.glazedlists.matchers、
ca.odell.glazedlists。 migrationkit、
ca.odell.glazedlists.migrationkit.swing、
ca.odell.glazedlists.migrationkit.swt、
ca.odell.glazedlists.nachocalendar、
ca.odell.glazedlists.swing、
ca.odell.glazedlists.swt、
ca.odell。 glazedlists.util.concurrent,
com.mycompany.mysoftware.config.common,
com.mycompany.mysoftware.config.extensions,
com.mycompany.mysoftware.config.generators.common,
com.mycompany.mysoftware.core,
com.mycompany.mysoftware.core.configs,
com.mycompany.mysoftware.core.extensions,
com.mycompany.mysoftware.core.jobs、
com.mycompany.mysoftware.core.logging、
com.mycompany.mysoftware.core.preferences、
com.mycompany.mysoftware.exception、
com.mycompany.mysoftware.model、
com.mycompany。 mysoftware.model.common,
com.mycompany.mysoftware.model.extensions,
com.mycompany.mysoftware.model.interfaces,
com.mycompany.mysoftware.model.utils,
com.mycompany.mysoftware.properties,
com.mycompany.mysoftware.rcp.actions.common,
com.mycompany.mysoftware.rcp.common,
com.mycompany.mysoftware.rcp.common.ui,
com.mycompany.mysoftware.rcp.common.ui.actionicons,
com. mycompany.mysoftware.rcp.common.ui.components,
com.mycompany.mysoftware.rcp.dialogs.common,
com.mycompany.mysoftware.rcp.dialogs.components,
com.mycompany.mysoftware.rcp.dialogs.components.validators,
com.mycompany.mysoftware.rcp.dialogs.editors、
com.mycompany.mysoftware.rcp.dialogs.misc、
com.mycompany.mysoftware.rcp.editors.appmap、
com.mycompany.mysoftware.rcp.extensions、
com.mycompany。 mysoftware.rcp.gef.actions,
com.mycompany.mysoftware.rcp.gef.common,
com.mycompany.mysoftware.rcp.gef.editpolicies,
com.mycompany.mysoftware.rcp.gef.extensions,
com.mycompany.mysoftware.rcp.gef.figures.common,
com.mycompany.mysoftware.rcp.gef.parts,
com.mycompany.mysoftware.rcp.gef.parts.common、
com.mycompany.mysoftware.rcp.main、
com.mycompany.mysoftware.rcp.views、
com.mycompany.mysoftware.rcp.views.common、
com.mycompany。 mysoftware.rcp.views.logs,
com.mycompany.mysoftware.security.providers.extensions,
com.mycompany.mysoftware.services.providers.extensions,
com.mycompany.mysoftware.tools,
com.mycompany.mysoftware.tools.compare,
com.mycompany.mysoftware.tools.groovy,
com.mycompany.mysoftware.utils.misc,
com.mycompany.mysoftware.utils.misc.convert、
com.mycompany.mysoftware.utils.misc.xml、
javax.activation、
javax.mail、
javax.xml.bind、
javax.xml.bind.annotation、
javax.xml。 bind.annotation.adapters,
javax.xml.bind.attachment,
javax.xml.bind.helpers,
javax.xml.bind.util,
net.miginfocom.swt,
org.apache.log4j,
org.apache.log4j.spi,
org.apache.xml.serializ
捆绑本地化:插件
捆绑供应商:mycompany

Module1 Manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: mysoftware mycompany Module1 Plug-in
Bundle-SymbolicName: com.mycompany.mysoftware.mycompanyModule1;singleton:=true
Bundle-Version: 2.7.2.qualifier
Eclipse-RegisterBuddy : com.mycompany.mysoftware.deps.mycompany
Bundle-Activator: com.mycompany.mysoftware.mycompanyModule1.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.mycompany.mysoftware.core,
com .mycompany.mysoftware.weblogic,
com.mycompany.mysoftware.shares,
com.mycompany.mysoftware.deps.mycompany,
com.mycompany.mysoftware.jboss,
com.mycompany.mysoftware.jee,
com.mycompany.mysoftware.deps.jboss
Bundle-ActivationPolicy:惰性
Bundle-RequiredExecutionEnvironment:JavaSE-1.6
Bundle-ClassPath:.,
libs/commons-collections-3.2.jar,
libs/groovy-all-1.7.6.jar,
libs /velocity-1.7.jar、libs/commons-lang-2.4.jar、libs/axis-1.4.jar、libs/commons-discovery-0.2.jar 捆绑供应

: mycompany 出口包装:com.mycompany.mysoftware.mycompanyModule1 .cmdb, com.mycompany.mysoftware.mycompanyModule1.jboss, com.mycompany.mysoftware.mycompanyModule1.jboss.deployment, com.mycompany.mysoftware.mycompanyModule1.jmx.engine, com.mycompany.mysoftware.mycompanyModule1.naming,







com.mycompany.mysoftware.mycompanyModule1.network,
org.apache.commons.collections

Module2 Manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: mysoftware mycompany Module2
Bundle-SymbolicName: com.mycompany.mysoftware.mycompanyModule2;singleton:=true
Bundle-Version: 2.7.2.qualifier
Bundle-Activator: com. mycompany.mysoftware.mycompanyModule2.Activator
Bundle-Vendor: mycompany & Cie
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.mycompany.mysoftware.core,
org.eclipse.gef,
com.mycompany。 mysoftware.deps.jboss
Bundle-RequiredExecutionEnvironment:JavaSE-1.6
Bundle-ActivationPolicy:惰性
导出包:com.mycompany.mysoftware.mycompanyModule2
Bundle-ClassPath:.,
库/junit-4.5.jar

添加依赖项只是在 Module2 清单的“Require-Bundle”部分中在线添加,符号名称为 Module1。

4

1 回答 1

0

您是否尝试过将 core 的依赖从 m1 重新导出到 m2?您可以通过打开 m1 的清单编辑器来执行此操作,然后在依赖项选项卡中,选择核心并单击属性按钮。然后可以选择重新导出插件的代码。

例如,如果您有m2 <- m1 <- core,那么“通过”m1 重新导出核心依赖项应该使它们在 m2 中可见。

希望这可以帮助

于 2012-08-03T19:26:44.860 回答