缺少Eclipse 4 RCP部署applicationXMI参数

时间:2014-02-17 16:25:03

标签: java eclipse eclipse-rcp e4

我正在尝试导出Eclipse 4 RCP应用程序,该应用程序在我通过Eclipse运行时工作,但在我尝试部署它时会中断。

我找到了问题here的解决方案,但是当我查看build.properties文件时,它没有显示导出中包含的内容。它显示了二进制构建和源构建。我检查了Application.e4xmi文件,但它似乎没有效果。

我的build.properties文件如下所示:

output.. = bin/
bin.includes = META-INF/,\
               .,\
               plugin.xml,\
               Application.e4xmi,\
               icons/,\
               css/default.css
source.. = src/
jars.compile.order = .

这是堆栈跟踪:

!ENTRY org.eclipse.osgi 4 0 2014-02-17 09:08:01.795
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.AssertionFailedException: null argument:applicationXMI argument missing
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:342)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:238)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:144)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

这是我的plugin.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<plugin>

   <extension
         id="product"
         point="org.eclipse.core.runtime.products">
      <product
            name="GraphRCP"
            application="org.eclipse.e4.ui.workbench.swt.E4Application">
         <property
               name="applicationCSS"
               value="platform:/plugin/GraphRCP/css/default.css">
         </property>
         <property
               name="appName"
               value="GraphRCP">
         </property>
         <property
               name="applicationXMI"
               value="GraphRCP/Application.e4xmi">
         </property>
      </product>
   </extension>

</plugin>

我最初的值为graphrcp/Application.e4xmi,这甚至在Eclipse中启动它。我将其修复为GraphRCP/Application.e4xmi但导出后仍无法运行。

GraphRCP.product文件:

<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="GraphRCP" uid="graphrcp" id="GraphRCP.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="0.0.1" useFeatures="false" includeLaunchers="true">

   <configIni use="default">
   </configIni>

   <launcherArgs>
      <programArgs>-clearPersistedState</programArgs>
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
   </launcherArgs>

   <windowImages/>

   <launcher>
      <solaris/>
      <win useIco="false">
         <bmp/>
      </win>
   </launcher>

   <vm>
   </vm>

   <plugins>
      <plugin id="com.ibm.icu"/>
      <plugin id="my.com.jav.allinone"/>
      <plugin id="javax.annotation"/>
      <plugin id="javax.inject"/>
      <plugin id="javax.xml"/>
      <plugin id="org.apache.batik.css"/>
      <plugin id="org.apache.batik.util"/>
      <plugin id="org.apache.batik.util.gui"/>
      <plugin id="org.apache.commons.io"/>
      <plugin id="org.apache.commons.lang"/>
      <plugin id="org.apache.commons.logging"/>
      <plugin id="org.eclipse.birt.jetty.overlay" fragment="true"/>
      <plugin id="org.eclipse.core.commands"/>
      <plugin id="org.eclipse.core.contenttype"/>
      <plugin id="org.eclipse.core.databinding"/>
      <plugin id="org.eclipse.core.databinding.beans"/>
      <plugin id="org.eclipse.core.databinding.observable"/>
      <plugin id="org.eclipse.core.databinding.property"/>
      <plugin id="org.eclipse.core.expressions"/>
      <plugin id="org.eclipse.core.filesystem"/>
      <plugin id="org.eclipse.core.filesystem.aix.ppc" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.hpux.ia64_32" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.linux.ppc" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.solaris.sparc" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
      <plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
      <plugin id="org.eclipse.core.jobs"/>
      <plugin id="org.eclipse.core.resources"/>
      <plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/>
      <plugin id="org.eclipse.core.runtime"/>
      <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
      <plugin id="org.eclipse.e4.core.commands"/>
      <plugin id="org.eclipse.e4.core.contexts"/>
      <plugin id="org.eclipse.e4.core.contexts.source"/>
      <plugin id="org.eclipse.e4.core.di"/>
      <plugin id="org.eclipse.e4.core.di.extensions"/>
      <plugin id="org.eclipse.e4.core.services"/>
      <plugin id="org.eclipse.e4.core.services.source"/>
      <plugin id="org.eclipse.e4.ui.bindings"/>
      <plugin id="org.eclipse.e4.ui.css.core"/>
      <plugin id="org.eclipse.e4.ui.css.swt"/>
      <plugin id="org.eclipse.e4.ui.css.swt.theme"/>
      <plugin id="org.eclipse.e4.ui.di"/>
      <plugin id="org.eclipse.e4.ui.di.source"/>
      <plugin id="org.eclipse.e4.ui.model.workbench"/>
      <plugin id="org.eclipse.e4.ui.services"/>
      <plugin id="org.eclipse.e4.ui.services.source"/>
      <plugin id="org.eclipse.e4.ui.widgets"/>
      <plugin id="org.eclipse.e4.ui.workbench"/>
      <plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
      <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
      <plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa"/>
      <plugin id="org.eclipse.e4.ui.workbench.swt"/>
      <plugin id="org.eclipse.e4.ui.workbench3"/>
      <plugin id="org.eclipse.emf.common"/>
      <plugin id="org.eclipse.emf.databinding"/>
      <plugin id="org.eclipse.emf.ecore"/>
      <plugin id="org.eclipse.emf.ecore.change"/>
      <plugin id="org.eclipse.emf.ecore.xmi"/>
      <plugin id="org.eclipse.equinox.app"/>
      <plugin id="org.eclipse.equinox.common"/>
      <plugin id="org.eclipse.equinox.concurrent"/>
      <plugin id="org.eclipse.equinox.ds"/>
      <plugin id="org.eclipse.equinox.event"/>
      <plugin id="org.eclipse.equinox.preferences"/>
      <plugin id="org.eclipse.equinox.registry"/>
      <plugin id="org.eclipse.equinox.util"/>
      <plugin id="org.eclipse.equinox.weaving.hook" fragment="true"/>
      <plugin id="org.eclipse.jface"/>
      <plugin id="org.eclipse.jface.databinding"/>
      <plugin id="org.eclipse.osgi"/>
      <plugin id="org.eclipse.osgi.compatibility.state"/>
      <plugin id="org.eclipse.osgi.services"/>
      <plugin id="org.eclipse.swt"/>
      <plugin id="org.eclipse.swt.carbon.macosx" fragment="true"/>
      <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
      <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.linux.ppc64" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
      <plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
      <plugin id="org.eclipse.swt.motif.aix.ppc" fragment="true"/>
      <plugin id="org.eclipse.swt.motif.hpux.ia64_32" fragment="true"/>
      <plugin id="org.eclipse.swt.motif.linux.x86" fragment="true"/>
      <plugin id="org.eclipse.swt.motif.solaris.sparc" fragment="true"/>
      <plugin id="org.eclipse.swt.photon.qnx.x86" fragment="true"/>
      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
      <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
      <plugin id="org.w3c.css.sac"/>
      <plugin id="org.w3c.dom.events"/>
      <plugin id="org.w3c.dom.smil"/>
      <plugin id="org.w3c.dom.svg"/>
   </plugins>


</product>

1 个答案:

答案 0 :(得分:1)

二进制构建用于导出。

此错误表示applicationXMI中的org.eclipse.core.runtime.products扩展点中的plugin.xml属性没有值。

类似的东西:

<extension
     id="product"
     point="org.eclipse.core.runtime.products">
  <product
        name="%product.name"
        application="org.eclipse.e4.ui.workbench.swt.E4Application">
     <property
           name="applicationXMI"
           value="your plugin id/Application.e4xmi">
     </property>
     ... other properties
  </product>
</extension>