2011-09-20 82 views
3

在我的項目中,我使用PDE/Build在Hudson的遠程服務器上構建我的RCP應用程序。 當前版本是基於Eclipse Galileo的軟件包,它既適用於構建器應用程序,也適用於目標平臺。如何使用Indigo設置Eclipse PDE/Build?

現在我想升級到Indigo,我需要一些幫助。

首先,解壓縮數個拉鍊形成目標平臺的舊方法不起作用。 (我使用了Platform Runtime Binary,Delta pack,PDE Runtime Binary和JDT Runtime Binary - 我提出的一套既可以用作構建器又可以用作目標平臺)。

好的,有一個新的目標定義。 我該如何配置它,以便它符合我的伽利略設置? (當然,我不介意它是否更簡單/更清潔)。

我試過如下:

  1. 加入Eclipse RCP的,Eclipse RCP的插件開發人員資源(源),PDE/API工具環境從download.eclipse.org/eclipse/updates/3.7
  2. 從download.eclipse.org/releases/indigo添加了Eclipse Java開發
  3. 從download.eclipse.org/eclipse/downloads/drops/R-3.7-201106131736/download.php?dropFile=eclipse-3.7手動下載了delta pack -delta-pack.zip,解壓縮並將生成的目錄(作爲目錄)添加到目標定義。 順便說一下,有沒有Indigo delta pack的更新網站?
  4. 添加從Eclipse的軌道P2現場一對夫婦的第三方插件:download.eclipse.org/tools/orbit/downloads/drops/R20110523182458/repository

然後我用定義的「設置爲目標平臺「 - 而且我的項目在我的工作空間中可以很好地工作 - 這很好! 然後我將平臺導出到。 現在,如果我嘗試執行我的生成是這樣的:

java -jar <target-platform>\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar -application org.eclipse.ant.core.antRunner -buildfile <target-platform>/plugins/org.eclipse.pde.build_3.7.0.v20110512-1320/scripts/productBuild/productBuild.xml -Dbuilder=<pdebuild-folder> 

甚至

java -jar <target-platform>\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar 

我收到以下錯誤:

An error has occurred. See the log file \configuration\1316517334675.log

日誌包含以下內容:

!SESSION 2011-09-20 15:15:34.269 eclipse.buildId=unknown java.version=1.7.0 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

!ENTRY org.eclipse.osgi 4 0 2011-09-20 15:15:35.175 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

+0

有點相關:https://bugs.eclipse.org/bugs/show_bug.cgi?id=266311 – vitaly

回答

1

結束了基於Maven的構建,針對「Eclipse for RCP和RAP開發人員」以及delta pack plus SWTBot。 兩者都部署到我的Maven存儲庫,並在構建過程中解壓縮(如果需要)。因此,我不再關心目標平臺的規模。

<build> 

    <plugins> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-dependency-plugin</artifactId> 
      <version>2.4</version> 
      <executions> 
       <!-- Deploy target platform if required --> 
       <execution> 
        <id>unpack-target-platform</id> 
        <phase>initialize</phase> 
        <goals> 
         <goal>unpack</goal> 
        </goals> 

        <configuration> 
         <markersDirectory>${target.platform.dir}</markersDirectory> 
         <artifactItems> 
          <artifactItem> 
           <groupId>org.eclipse</groupId> 
           <artifactId>rcp-target-platform</artifactId> 
           <version>3.7.2-win32-x86_64</version> 
           <type>zip</type> 
           <outputDirectory>${target.platform.dir.sdk}</outputDirectory> 
          </artifactItem> 

          <artifactItem> 
           <groupId>org.eclipse</groupId> 
           <artifactId>rcp-target-platform-delta-pack</artifactId> 
           <version>3.7.2</version> 
           <type>zip</type> 
           <outputDirectory>${target.platform.dir.deltapack}</outputDirectory> 
          </artifactItem> 

          <artifactItem> 
           <groupId>org.eclipse</groupId> 
           <artifactId>swtbot.eclipse</artifactId> 
           <version>2.0.5.20111003_1754-3676ac8-dev-e36</version> 
           <type>zip</type> 
           <outputDirectory>${target.platform.dir.swtbot}</outputDirectory> 
          </artifactItem> 
         </artifactItems> 
        </configuration> 
       </execution> 

      </executions> 

     </plugin> 
    </plugins> 
</build> 



<properties> 
    <!-- Build system properties --> 
    <target.platform.dir>/rcp-target-platform-3.7.2</target.platform.dir> 

    <target.platform.dir.swtbot>${target.platform.dir}/swtbot</target.platform.dir.swtbot> 
    <target.platform.dir.swtbot.plugins>${target.platform.dir.swtbot}/eclipse/plugins</target.platform.dir.swtbot.plugins> 

    <target.platform.dir.sdk>${target.platform.dir}/sdk</target.platform.dir.sdk> 
    <target.platform.dir.sdk.plugins>${target.platform.dir.sdk}/eclipse/plugins</target.platform.dir.sdk.plugins> 

    <target.platform.dir.deltapack>${target.platform.dir}/deltapack</target.platform.dir.deltapack> 
    <target.platform.dir.deltapack.plugins>${target.platform.dir.deltapack}/eclipse/plugins</target.platform.dir.deltapack.plugins> 

    <pdebuild.launcherVersion>1.2.0.v20110502</pdebuild.launcherVersion> 
    <pdebuild.plugin.version>3.7.0.v20111116-2009</pdebuild.plugin.version> 

    <pdebuild.antDelegateBuildfile>${pdebuild.configDirectory}/pdebuild-ant-from-mvn.xml</pdebuild.antDelegateBuildfile> 
    <pdebuild.configDirectory>${basedir}/pdebuild</pdebuild.configDirectory> 

    <pdebuild.buildDirectory>${project.build.directory}/${pdebuild.directory}</pdebuild.buildDirectory> 
    <pdebuild.directory>pde-build</pdebuild.directory> 
</properties> 

我然後調用從Maven的Ant構建這樣的:

 <!-- Delegate execution to PDE/Build via ant --> 
     <plugin> 
      <artifactId>maven-antrun-plugin</artifactId> 
      <version>1.7</version> 
      <executions> 
       <execution> 
        <phase>compile</phase> 
        <configuration> 
         <target> 
          <ant antfile="${pdebuild.antDelegateBuildfile}"> 
           <property name="equinoxLauncherPluginVersion" value="${pdebuild.launcherVersion}" /> 
           <property name="pdeBuildPluginVersion" value="${pdebuild.plugin.version}" /> 
           <property name="projectsDirectory" value="${basedir}" /> 
           <property name="baseLocation" value="${target.platform.dir}" /> 
           <property name="buildDirectory" value="${pdebuild.buildDirectory}" /> 
           <property name="builder" value="${pdebuild.configDirectory}" /> 
           <property name="product" value="${gui.product}"/> 
           <property name="runPackager" value="${pdebuild.runPackager}"/> 
          </ant> 
         </target> 
        </configuration> 
        <goals> 
         <goal>run</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

我很高興與成立了。

+0

將代碼複製到https://gist.github.com/4529654 – vitaly