You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2007/08/14 22:15:02 UTC

svn commit: r565895 - in /maven/plugins/trunk/maven-eclipse-plugin/src/site: apt/pde.apt apt/usage.apt site.xml

Author: jdcasey
Date: Tue Aug 14 13:15:01 2007
New Revision: 565895

URL: http://svn.apache.org/viewvc?view=rev&rev=565895
Log:
[MECLIPSE-281] Adding documentation for working with PDE projects.

Added:
    maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/pde.apt   (with props)
Modified:
    maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/usage.apt
    maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml

Added: maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/pde.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/pde.apt?view=auto&rev=565895
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/pde.apt (added)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/pde.apt Tue Aug 14 13:15:01 2007
@@ -0,0 +1,135 @@
+							 ------------------
+							    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 <maven-eclipse-plugin> 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 <eclipse:eclipse> 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 <pde> flag to true
+ within the configuration.
+ 
++-----------------------------------------------------+
+      <plugin>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <pde>true</pde>
+        </configuration>
+      </plugin>
++-----------------------------------------------------+
+
+* Eclipse PDE configuration
+
+ When PDE support is enabled in the <maven-eclipse-plugin>, the
+ Eclipse project files are configured differently to the default.
+ These differences are explained below.
+ 
+ * Plugin Nature
+ 
+ The <org.eclipse.pde.PluginNature> is added to the list of eclipse
+ project natures, indicating to Eclipse that this project is a PDE
+ project.
+ 
+ * Plugin Dependencies
+ 
+ The <Plugin Dependencies> 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 <eclipse:eclipse> 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.
+ 
+ <<Note: Linked resources are correctly referenced from the Eclipse
+ IDE, however due to a limitation of the Eclipse headless PDE build,
+ linked resources are not correctly referenced from the Eclipse headless
+ PDE build. As a result, attempts to use the Eclipse export wizard to export
+ your plugin, feature or product, and attempts to use the pde-maven-plugin
+ to do so will fail, despite the same build working in the IDE.>>
+ 
+ The workaround is to use the <maven-dependency-plugin> to copy your
+ dependent jars into the root of your project before running Eclipse.
+ The <maven-clean-plugin> is configured to remove these jar files on
+ <mvn clean>. Don't forget to configure your source control server to
+ ignore *.jar files in the root directory of your project.
+ 
++-----------------------------------------------------+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-dependencies</id>
+            <phase>process-sources</phase>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${basedir}</outputDirectory>
+              <overWriteReleases>false</overWriteReleases>
+              <overWriteSnapshots>false</overWriteSnapshots>
+              <overWriteIfNewer>true</overWriteIfNewer>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+ 
+      <plugin>
+        <artifactId>maven-clean-plugin</artifactId>
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>${basedir}</directory>
+              <includes>
+                <include>*.jar</include>
+              </includes>
+              <followSymlinks>false</followSymlinks>
+             </fileset>
+           </filesets>
+         </configuration>
+       </plugin>
++-----------------------------------------------------+
+
+* Building PDE Code
+
+ Having configured Eclipse correctly using <maven-eclipse-plugin>, 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.

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/pde.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/pde.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/usage.apt?view=diff&rev=565895&r1=565894&r2=565895
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/usage.apt (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/usage.apt Tue Aug 14 13:15:01 2007
@@ -16,6 +16,12 @@
 
  * {{{#Simple Project}Simple Project}}
 
+ * {{{#Project with Dependencies}Project with Dependencies}}
+
+ * {{{#Multiple Module Projects}Multiple Module Projects}}
+
+ * {{{#Eclipse PDE Projects}Eclipse PDE Projects}}
+
 * {Maven repository}
 
  Eclipse needs to know the path to the local maven repository. Therefore the
@@ -65,4 +71,36 @@
  project into your Eclipse workspace (From the menu bar, select File > Import >
  Existing Projects into Workspace). In the latter case the project (directory)
  should not be located in your workspace, because Eclipse might come into
- trouble, especially if you want to use Eclipse as the scm client.
\ No newline at end of file
+ trouble, especially if you want to use Eclipse as the scm client.
+ 
+* {Project with Dependencies}
+
+ If your maven project has dependencies, the eclipse classpath will be
+ synchronised with the current list of maven dependencies, as well as
+ any transitive maven dependencies.
+ 
+ After making changes to your maven dependencies inside the pom file,
+ rerun <eclipse:eclipse> and refresh your eclipse workspace for the
+ new dependencies to take effect.
+ 
+* {Multiple Module Projects}
+
+ If your maven project consists of a number of aggregated projects with
+ a common root pom, and if some of these aggregated projects depend on
+ each other, the <eclipse:eclipse> goal will configure each dependent
+ project in eclipse as an eclipse project dependency, rather than an
+ eclipse jar dependency.
+ 
+ By doing this, changes to code within project A will be available immediately
+ to project B, assuming that project B defines a dependency on project A.
+ 
+ For further details, see {{{reactor.html}Multiple Module Projects}}.
+ 
+* {Eclipse PDE Projects}
+
+ This plugin is capable of creating and / or synchronising an Eclipse
+ Plugin Development Environment project.
+ 
+ For further details, see the configuration instructions
+ {{{pde.html}here}}.
+ 

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml?view=diff&rev=565895&r1=565894&r2=565895
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml Tue Aug 14 13:15:01 2007
@@ -8,6 +8,7 @@
     </menu>
     <menu name="Configuration">
       <item name="Multiple Module Projects" href="reactor.html"/>
+      <item name="Eclipse PDE Projects" href="pde.html"/>
       <item name="WTP Support" href="wtp.html"/>
     </menu>