我正在使用Eclipse 3.5开发Eclipse RCP应用程序。
我的问题是,当我在两个插件之间添加依赖关系时,另一个插件的类似乎会被忽略并显示编译错误。这是设置:
当我从M2添加依赖关系到M1时,每个类来自"核心"在M2中显示为编译错误。
当我删除这个依赖项时,一切都恢复正常:M2中使用的核心类现在可以正确编译。
以前有人见过这个吗? : - )
感谢您的帮助!
根据要求:
核心清单:
清单 - 版本:1.0
Bundle-ManifestVersion:2
捆绑名称:mysoftware核心
Bundle-SymbolicName:com.mycompany.mysoftware.core; singleton:= true
Bundle-Version:2.7.2.qualifier
Require-Bundle:org.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.repository,
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:。,
库/ JAXB-API-2.1.jar,
库/ JAXB-IMPL-2.1.8.jar,
库/活化-1.1.jar,
库/持久-API-1.0.jar,
库/ STAX-API-1.0-2.jar,
库/ jcalendar-1.3.2.jar,
库/ log4j的-1.2.13.jar,
库/ miglayout-3.7.jar,
库/的Xalan-2.6.0.jar,
库/ xercesImpl-2.4.0.jar,
库/ glazedlists-1.7.0_java15.jar,
库/ jcommon-1.0.16.jar,
库/ jfreechart的-1.0.13-experimental.jar,
库/ jfreechart的-1.0.13-SWT.JAR,
库/ jfreechart的-1.0.13.jar,
库/ swtgraphics2d.jar,
库/ org.sf.feeling.swt.win32.extension_1.0.5.v20081205.jar,
库/的junit-4.5.jar,
库/ dsn.jar,
库/ imap.jar,
库/ mailapi.jar和
库/ smtp.jar,
库/ jnotify-0.93.jar,
库/ Groovy的全1.7.6.jar,
库/乔达 - 时间 - 2.0.jar,
库/公地IO-2.0.1.jar
Bundle-Activator: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
Bundle-Localization:插件
Bundle-Vendor:mycompany
Module1清单
清单 - 版本:1.0
Bundle-ManifestVersion:2
Bundle-Name:mysoftware mycompany Module1插件
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:。,
库/公地集合-3.2.jar,
库/ Groovy的全1.7.6.jar,
库/速度-1.7.jar,
库/公地郎2.4.jar,
库/轴-1.4.jar,
库/公地发现-0.2.jar
捆绑供应商:mycompany
Export-Package: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
清单 - 版本: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
捆绑供应商: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:懒惰的
Export-Package:com.mycompany.mysoftware.mycompanyModule2
Bundle-ClassPath:。,
libs / junit-4.5.jar
添加依赖项只会在" Require-Bundle"中添加。 Module2清单的一部分,符号名称为Module1。
答案 0 :(得分:0)
您是否尝试将核心的依赖关系从m1重新导出到m2? 您可以为m1打开清单编辑器,然后在依赖项选项卡中选择核心并单击属性按钮。然后有一个选项可以重新导出插件的代码。
,例如,如果你有m2 <- m1 <- core
,那么通过'm1重新导出核心依赖关系应该使它们在m2中可见。
希望这有帮助