>>>>> Steinar Bang <[EMAIL PROTECTED]>:

> (Well, at least it's partly working...  The eclipse:make-artifacts goal
> doesn't install all of the dependencies that's needed to create a
> single runtime.

> It seems I have to specify the platform (ie. win32 or linux.gtk.x86)
> in some manner in the POM or as arguments to the maven command, and
> I'd hoped to avoid that.  But that's a different issues)

Now I've succeeded in creating enough of a target platform under
$HOME/pde_target_platform_test that I was able to run an existing
eclipse RCP application with it.

What I did was
 1. run
        mvn eclipse:make-artifacts -DeclipseDir=/usr/local/eclipse-3.2.1
    from the command line, to install the plugins of the eclipse
    installation under /usr/local/eclipse-3.2.1 into my local maven
    repository 

 2. create a /tmp/pom.xml file, included at the end of this message

 3. in eclipse, select from the menus
        Run->External Tools->External Tools...
    and create a new Program, in the Name: field, put "Build pde
    target platform with maven" (without the quotes) and in the Main
    tab, do the following settings: 
     Location: /usr/local/maven-2.0.4/bin/mvn
     Working directory: /tmp
     Arguments: validate -Dwindowing.system=${system_property:osgi.ws} 
-Doperating.system=${system_property:osgi.os} 
-Darchitecture=${system_property:osgi.arch}
    and click on "Run"

  4. open the Preferences dialog, and select 
        Plug-in Development->Target Platform
     in the Location field, click on the "Browse..." button, and
     browse to the $HOME/pde_target_platform_test directory, and click
     on the "OK" button

Thazzit!


Here's the pom.xml file mention in step 2, above:

<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 <modelVersion>4.0.0</modelVersion> 
 <groupId>com.somecompany</groupId>
 <version>0.1.0</version>
 <artifactId>build-pde-target-platform</artifactId>
 <name>Build eclipse PDE target platform</name>
 <packaging>pom</packaging>
 <dependencies>
  <dependency>
   <groupId>org.eclipse.swt</groupId>
   
<artifactId>org.eclipse.swt.${windowing.system}.${operating.system}.${architecture}</artifactId>
   <version>[3.2.1,4.0)</version>
  </dependency>
  <dependency>
   <groupId>org.eclipse.ui</groupId>
   <artifactId>org.eclipse.ui.console</artifactId>
   <version>[3.1.100,4.0)</version>
  </dependency>
  <dependency>
   <groupId>org.eclipse.ui</groupId>
   <artifactId>org.eclipse.ui.editors</artifactId>
   <version>[3.2.1,4.0)</version>
  </dependency>
  <dependency>
   <groupId>com.ibm.icu</groupId>
   <artifactId>com.ibm.icu</artifactId>
   <version>[3.4.5,4.0)</version>
  </dependency>
 </dependencies>
 <build>
  <plugins>
   <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>dependency-maven-plugin</artifactId>
    <executions>
     <execution>
      <id>copy-dependencies</id>
      <phase>validate</phase>
      <goals>
       <goal>copy-dependencies</goal>
      </goals>
      <configuration>
       
<outputDirectory>${user.home}/pde_target_platform_test/plugins</outputDirectory>
      </configuration>
     </execution>
     <execution>
      <id>unpack</id>
      <phase>validate</phase>
      <goals>
       <goal>unpack</goal>
      </goals>
      <configuration>
       <artifactItems>
        <artifactItem>
         <groupId>org.junit4</groupId>
         <artifactId>org.junit4</artifactId>
         <version>4.1.0</version>
         
<outputDirectory>${user.home}/pde_target_platform_test/plugins/org.junit4</outputDirectory>
        </artifactItem>
        <artifactItem>
         <groupId>org.junit</groupId>
         <artifactId>org.junit</artifactId>
         <version>3.8.1</version>
         
<outputDirectory>${user.home}/pde_target_platform_test/plugins/org.junit</outputDirectory>
        </artifactItem>
       </artifactItems>
       
<outputDirectory>${user.home}/pde_target_platform_test/plugins</outputDirectory>
       
<unpackMarkersDirectory>${user.home}/pde_target_platform_test/plugins_markers</unpackMarkersDirectory>
      </configuration>
     </execution>
    </executions>
   </plugin>
  </plugins>
 </build>
</project>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to