Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document will guide you through importing through importing ServiceMix 3 .0 into the Eclipse IDE Eclipse Java Development Tools v3. x.

The Maven website offers some additional information concerning Maven and Eclipse, for example how Maven goals can be executed from within Eclipse or alternative ways of importing projects into Eclipse.

Pre-Installation Requirements

Hardware:

...

Operating Systems:

  • Windows: Windows XP SP2, Windows 2000.
  • Unix: Ubuntu Linux, Powerdog Linux, MacOS, AIX, HP-UX, Solaris, any Just about any Windows or Linux/Unix platform that supports Java.

Environment:

  • Java Developer Kit (JDK ) 1.5.x (Java 5) for compiling/building.
  • The JAVA_HOME environment variable must be set to the directory where the JDK is installed, e.g., c:\Program Files\jsdk.1.5.x
  • Maven 2.0.4 or greater.
  • Eclipse 3.x 3 or greater.

Importing ServiceMix

Below are the steps to import ServiceMix as a project in Eclipse.:

Preparing the

...

Source for Eclipse

1) Grab the sources from

...

the Subversion repository or download

...

the ServiceMix source distribution

...

Code Block

mvn eclipse:eclipse

...

Code Block

[INFO] Searching repository for plugin with prefix: 'eclipse'.
Downloading: http://mirrors.sunsite.dk/maven2/org/apache/servicemix/tooling/jbi-maven-plugin/3.0-incubating/jbi-maven-plugin-3.0-incubating.jar
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository

...

Code Block

mvn -Dprofile=step1
mvn -Dprofile=step2

...


2) Build the source with the following two separate commands on the command line:

Code Block

mvn -Dmaven.test.skip=true -P=step1
mvn -Dmaven.test.skip=true -P=step2

3) Now create the necessary Eclipse project files using the following command on the command line:

Code Block

mvn eclipse:eclipse

Importing the Source Into

...

Eclipse:

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


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


     
  3. Browse for the root directory (into which you downloaded ServiceMix).  "Select All" the projects in the "Import" pop-up window - they are probably already pre-selected for you (check boxes are checked).  Un-checking the option "Copy projects into workspace" allows you to automatically always edit the current version of the SVN checkout folder, thus avoiding an import after each SVN update. Click "Finish" in the "Import" window; the import takes around three minutes.


     
  4. In the menu bar, open "Windows" and click "Preferences"
    The "Preferences" window will pop-up.
    Click on the "Java" plus sign and change to "Compiler". Compiler compliance level must be 5.0; select this option in the pull down menu.
    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 "Build Path" and then select "Classpath Variables". 


     
  7. Click on "New" button to right
    A pop-up appears.
    Enter the Name: M2_REPO
    Enter the Path of your local maven repository, usually located in <your home directory>\.m2, for example: C:\Documents and Settings\exjobb\.m2\repository
     

     
  8. Click "OK" button. The necessary build takes around three minutes.

...