pde-maven-pluginをeclipse3.3で動かす

pde-maven-pluginとは

mavenでEclipseのPDEをエクスポートできます。

 

参考サイト

 

設定

pde-maven-pluginの1.0-SNAPSHOTはEclipseの3.3に対応済みなんですね。

以下pom.xmlに追加しました。

    
  <pluginRepositories>
 <pluginRepository>
  <id>mojo-snapshot</id>
  <name>mojo SnapShot</name>
  <releases><enabled>true</enabled></releases>
  <snapshots><enabled>true</enabled></snapshots>
  <url>http://snapshots.repository.codehaus.org</url>
 </pluginRepository>
  </pluginRepositories>
  
    <plugin>
 <groupId>org.codehaus.mojo</groupId>
 <artifactId>pde-maven-plugin</artifactId>
 <extensions>true</extensions>
 <version>1.0-SNAPSHOT</version>
 <configuration>
 <eclipseInstall>ecliipse-path-to</eclipseInstall>
 </configuration>
  <executions>
          <execution>
            <id>build-pde</id>
            <phase>compile</phase>
            <goals>
              <goal>attach</goal>
            </goals>
          </execution>
           <!-- Also bind to mvn clean -->
          <execution>
            <id>clean-pde</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>         
     </plugin>

 

実行

$ mvn pde:pde

と実行すると、mavenのversion2.0.9を要求するので、mavenをversion upしました。

再度実行です。

 

$ mvn -e pde:pde
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'pde'.
WAGON_VERSION: 1.0-beta-2
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - ws.susie.kabusen.rcp:ws.susie.kabusen.rcp:jar:1.0.0-SNAPSHOT
[INFO]    task-segment: [pde:pde] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[WARNING] Attempting to build MavenProject instance for Artifact (org.codehaus.mojo:pde-maven-plugin:1.0-20080304.235354-2) of type: maven-plugin; constructing POM artifact instead.
[INFO] [pde:pde]
[INFO] Startup jar found at: D:\cygwin\home\Administrator\develop\Eclipse\eclipse-jee-europa-fall2-win32\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20070828.jar
[INFO] cmd.exe /X /C '"java -classpath D:\cygwin\home\Administrator\develop\Eclipse\eclipse-jee-europa-fall2-win32\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20070828.jar org.eclipse.equinox.launcher.Main -application org.eclipse.ant.core.antRunner -buildfile d:\cygwin\home\Administrator\develop\workspace2\ws.susie.kabusen.rcp\target\pdeBuilder\build.xml"'
Buildfile: d:\cygwin\home\Administrator\develop\workspace2\ws.susie.kabusen.rcp\target\pdeBuilder\build.xml

generate:
[eclipse.buildScript] Some inter-plug-in dependencies have not been satisfied.
[eclipse.buildScript] Bundle org.eclipse.datatools.connectivity.oda.consumer:
[eclipse.buildScript]   Another singleton version selected: org.eclipse.datatools.connectivity.oda.consumer_3.1.2.200710011
[eclipse.buildScript] Bundle org.eclipse.datatools.connectivity.oda.design.ui:

<<略>>

[eclipse.buildScript] Bundle org.polarion.eclipse.team.svn.connector.svnkit:
[eclipse.buildScript]   Another singleton version selected: org.polarion.eclipse.team.svn.connector.svnkit_2.0.0.v20080321
[eclipse.buildScript] Bundle org.seasar.dbflute.emecha.eclipse.plugin:
[eclipse.buildScript]   Another singleton version selected: org.seasar.dbflute.emecha.eclipse.plugin_0.1.1

BUILD FAILED
d:\cygwin\home\Administrator\develop\workspace2\ws.susie.kabusen.rcp\target\pdeBuilder\build.xml:8: Unable to find element: ws.susie.kabusen.rcp.

Total time: 3 seconds
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error returned by PDE build. The cause for this error should be found within the PDE build logfile.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error returned by PDE build. The cause for this error should be found within the PDE build logfile.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error returned by PDE build. The cause for this error should be found within the PDE build logfile.
        at org.codehaus.mojo.pde.AbstractEclipsePDEMojo.executeCommandLine(AbstractEclipsePDEMojo.java:271)
        at org.codehaus.mojo.pde.EclipsePDEMojo.execute(EclipsePDEMojo.java:99)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Fri May 02 23:03:46 JST 2008
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

うまく動きません。 

自動生成された「build.xml」がよろしくないとのこと。

 

<project default="generate" > 
  <target name="generate" >
    <eclipse.buildScript 
      elements="plugin@ws.susie.kabusen.rcp"
      baseLocation="D:\cygwin\home\Administrator\develop\Eclipse\eclipse-jee-europa-fall2-win32"
      buildDirectory="d:\cygwin\home\Administrator\develop\workspace2\ws.susie.kabusen.rcp\..\.."
    />
  </target>
</project>

elements="plugin@ws.susie.kabusen.rcp"がまずいのかなぁ。

「ws.susie.kabusen.rcp」はpluginのPJ名で正しいです。

「plugin@」ってなんだろう。

 

Eclipseのログも確認すると「config.ini」がおかしいのかな。。。

EclipseはDLしたての「eclipse-RCP-3.3.2-win32」です。

/eclipse/configuration$ more ./1209725372718.log 
!SESSION 2008-05-02 19:49:32.281 -----------------------------------------------
eclipse.buildId=@build@
java.version=1.6.0_04
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ja_JP
Framework arguments:  -application org.eclipse.ant.core.antRunner -buildfile d:\cygwin\home\Administrator\develop\workspace2\ws.susie.kabusen.rcp\target\pdeBuilder\build.xml
Command-line arguments:  -application org.eclipse.ant.core.antRunner -buildfile d:\cygwin\home\Administrator\develop\workspace2\ws.susie.kabusen.rcp\target\pdeBuilder\build.xml

!ENTRY org.eclipse.osgi 4 0 2008-05-02 19:49:33.640
!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:72)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
        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:508)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
今日はここまで。

0 コメント: