Chapter 3. Setting up your development environment

Table of Contents

3.1. Requirements
3.2. Environment Setup
3.2.1. Install Eclipse and required external plug-ins
3.2.2. Install the Nuxeo RCP plug-ins
3.2.3. Enjoy
3.2.4. Launching your first Nuxeo RCP development product
3.3. Building Nuxeo RCP
3.3.1. Using the Eclipse export wizard

This section explains what you need and how you should prepare your environment in order to be able to develop your own plug-ins based on Nuxeo RCP.

3.1. Requirements

  1. Eclipse 3.4.2 with the RCP/Plug-in Developers profile, from http://www.eclipse.org/downloads/packages/release/ganymede/sr2

  2. Java 5, from http://java.sun.com/j2se/1.5.0/

  3. Nuxeo ECM 5.2.1-SNAPSHOT. Please refer to the installation guide for this product for more details.

  4. The SWT HTML composer plug-in, from http://www.eclipsian.org/swt-composer/update/. This is mandatory only if you need the HTML editing support in Nuxeo RCP. If you dont want this you need to disable the HTML editing plug-in from Nuxeo RCP. (Just remove it)

  5. Maven 2.0.9

  6. Mercurial HG

3.2. Environment Setup

3.2.1. Install Eclipse and required external plug-ins

  1. Install at least Eclipse 3.4.2 for RCP/Plugin developers

  2. Install the SWT HTML composer plug-in from the following update site: http://www.eclipsian.org/swt-composer/update/

  3. Optionally install ECF plugins if you need the chatroom and share editor support from eclipse update site

3.2.2. Install the Nuxeo RCP plug-ins

Set up your eclipse to build your nuxeo-rcp platform to build your own product can be done by getting nuxeo-rcp code sources.

  1. Install the Nuxeo RCP plug-ins from hg. Clone the entire directory at: http://hg.nuxeo.org/nuxeo-apogee/#2.0

  2. In nuxeo apogee core, do a "mvn clean install" to retrieve the needed nuxeo-ep plugins. It will create a new folder target where you can find the generated plugins

  3. Run nuxeo-apogee-core/build/build.sh. It will generate nuxeo-apogee-core plugins available in nuxeo-apogee-core/build/target/plugins.

  4. In eclipse, import the apogee core plugins in Window > Preferences > Plugin Development > Target Platform

    Warning

    In some case, eclipse doesnt build anymore, complaining missing package from SWT. To resolve it, go back to Target Platform, click on "Restore Defaults", re add nuxeo apogee core generated plugins and "Apply" the changes.

  5. Then go into Eclipse and click on File > Import ..., then select General > Existing projects into Workspace. As the root directory select the Nuxeo RCP nuxeo-apogee-rcp folder (where you previously checked out Nuxeo RCP). Eclipse will automatically detect all the plug-ins, fragments and sites in the Apogee project. Click on the Finish button.

3.2.3. Enjoy

That's all. Now you should be able to begin coding your own Nuxeo RCP plug-ins.

3.2.4. Launching your first Nuxeo RCP development product

This section is about launching the Nuxeo-RCP product that is provide in the source of nuxeo-rcp.

Now, you should have all your plugins compiled and you may want to try Nuxeo RCP. First you'll need to have a running Nuxeo ECM (5.2.1-SNAPSHOT).

Note

if you want to use your RCP client from a remote computer, you should run your Nuxeo server with a specific IP binding

From Eclipse, you'll pop up the Debug dialog box of the Nuxeo RCP product file from the Run > open Debug dialog ... menu.

You'll create a new Eclipse application named "Nuxeo RCP" following the figures below:

In the plugin tab, click on "Validate" to make sure that your have the right configuration. If some plugins are missing, it may be because features selected in the product do not have the same version installed in your eclipse. To quickly fix it, select "Launch with: plugins selected below only", "Deselect all" and "add Required Plug-ins". To fix it permanently, remove and readd the features from the product file one by one using the product editor (that will readd the feature with the version install in your computer

Launch Nuxeo RCP by clicking on "Apply" and "Debug".

Once Nuxeo RCP is launched, you should have a connexion view called "ECM Applications" that lets you add Nuxeo ECM server and connect to them.

3.3. Building Nuxeo RCP

In this section, we're talking about building a ready-to-use Nuxeo RCP application. We'll use the classic export wizard from Eclipse. Another option would be using the custom automated build process that has been made available for Nuxeo RCP to ease automatic builds.

3.3.1. Using the Eclipse export wizard

From the menu (File > export > Plug-in development > Eclipse product), you'll find a wizard page that you'll configure as following:

If you have the Eclipse delta pack installed, you'll even be able to build products for other platforms than yours. Click in "Finish" to build your product(s).