------------------ PDE support ------------------ Graham Leggett ------------------ 12-06-2007 ------------------ Eclipse Plugin Development Environment support The Eclipse plugin supports creating configurations for Eclipse PDE (Plugin Development Environment). These configurations can be used to create Eclipse plugins, features, or Eclipse RCP products. Note that the scope of the is to synchronise the Eclipse <.project> and <.classpath> files with the configuration found in the pom file. Once you have finished configuring the Eclipse plugin as below, and once you have run the goal, you will be in a position to build your plugin code with the Eclipse IDE, or the {{{http://www.eclipse.org/articles/Article-PDE-Automation/automation.html}Eclipse headless PDE build}}. The Eclipse headless PDE build can be triggered from within Maven using the {{{http://mojo.codehaus.org/pde-maven-plugin/}pde-maven-plugin}}. * Enabling PDE support Enabling support for PDE is achieved by setting the flag to true within the configuration. +-----------------------------------------------------+ maven-eclipse-plugin ${project.version} true +-----------------------------------------------------+ * Eclipse PDE configuration When PDE support is enabled in the , the Eclipse project files are configured differently to the default. These differences are explained below. * Plugin Nature The is added to the list of eclipse project natures, indicating to Eclipse that this project is a PDE project. * Plugin Dependencies The library is added to the Eclipse classpath. This Eclipse library resolves Eclipse/OSGI dependencies, and removes the need for maven to depend explicitly on eclipse jars. * Linked Resources In order for the Eclipse PDE system to build or deploy an Eclipse PDE project, it requires that dependent jars exist somewhere within the project itself. By default, the goal sets up the Eclipse classpath such that the project depends on jars in the external local maven repository. When PDE mode is enabled, dependencies are configured as Eclipse linked resources instead. Eclipse linked resources work like symbolic links within the Eclipse IDE. These linked resources appear in the root directory of your PDE project, and link the jars within your repository into the root of your project as required by Eclipse. <> The workaround is to use the to copy your dependent jars into the root of your project before running Eclipse. The is configured to remove these jar files on . Don't forget to configure your source control server to ignore *.jar files in the root directory of your project. +-----------------------------------------------------+ org.apache.maven.plugins maven-dependency-plugin 2.1 copy-dependencies process-sources copy-dependencies ${basedir} false false true maven-clean-plugin 2.3 ${basedir} *.jar false +-----------------------------------------------------+ * Building PDE Code Having configured Eclipse correctly using , the task of building your PDE project is a job for one or more of: * {{{http://www.eclipse.org/jdt/}The Eclipse IDE}} * {{{http://www.eclipse.org/articles/Article-PDE-Automation/automation.html}The Eclipse PDE headless build process}} * {{{http://mojo.codehaus.org/pde-maven-plugin/}pde-maven-plugin}} Refer to the links above for further build instructions.