Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

This document will guide you through importing ServiceMix into the IDE Eclipse.

Warning
titleWarning

This documentation applies to ServiceMix versions prior to 3.0 release. For v3.0, please refer to the User's Guide, chapter Importing ServiceMix into Eclipse.

Pre-Installation Requirements

...

  1. Grab the sources from svn or download servicemix source distribution.
  2. From the command line execute the following Maven 2 command to ready the project for Eclipse.
    Code Block
    maven -Dmaven.test.skip=true default mvn eclipse:eclipse
    

In Eclipse:

  1. From the "File" menu select "Import". 



  2.  Select "Existing Projects into Workspace" and click "Next" 



  3. Browse for the root directory, which is the directory in which you downloaded ServiceMix.  "Select All" the files in the Import pop-up window. They are probably already pre-selected for you (check box is checked).  Click "Finish" in the Import window. 



  4. From the "Windows" menu and click "Preferences"
    The Preferences window will pop-up.
    Change to JDK 5
    Windows>preferences click on Compiler
    Compiler compliance level must be 5.0, pull down menu and select.
    Check the "Use default compliance settings" box. 



  5. Then check under "Installed JREs" that you have JDK 5, e.g., jre_1.5.x



  6. Click on the Java plus sign, then click on Build Path
    then select Classpath Variables. 



  7. Click on New button to right
    A pop-up appears.
    Enter the Name: MAVENM2_REPO
    Enter the Path, which is your local maven repository, usually located in
    your home directory .mavenm2, for example:
    C:\Documents and Settings\jwortzmangnodet\.mavenm2\repository repository 
    Image Removed
    Image Added

Running an Example

  1. Now you can run an example:
    a. In the Package Explorer find the Main class, which should be located in: servicemix-core/src/main/java/
    under org.apache.servicemix/Main.java.
    Double click on the main() class. 



  2. From the Run menu select "Run..." 



  3. You will get a Run window pop-up, from there select Java Application.
    1. Click on New button in botton left
    2. Name the Project: any name you like, for example if you want to run the FilePoller application call it "filepoller".
    3. Click on arguments button:
      1. In the Program Arguments box enter servicemix.xml
      2. In the Working Directory enter the path of your example. Such as:
        C:\Program Files\servicemix-1.0.1\examples\file-binding
        You can use the "File System..." button to browse for your directory.
    4. Click Apply.
    5. Click Run Run 



Configuring Eclipse

Updating Eclipse from Trunk

  1. Browse the "Project" menu and select "Properties" 



  2. Click "Java BuildPath" and under the "Libraries" tab click "Add External Jar". 



  3. Browse to the incubator-servicemix-3.0-SNAPSHOT.jar location:
    \target\incubator-servicemix-3.0-SNAPSHOT\bin\incubator-servicemix-3.0-SNAPSHOT and Click "Open" then "OK" in the "Properties" screen screen 



  4. Allow some time for the individual projects to build.