Skip to end of metadata
Go to start of metadata

How to setup Engage Server using Eclipse

Here you can find a comprehensive list of steps that would allow you to run fluid-engage server with all its services using Eclipse:
  • First step is to download Eclipse:
    • If you are a windows user you can find a link here: 32bit
    • If you are a linux user you can find the links here: 32bit and 64bit
    • If you are a Mac Cocoa user you can find the links here: 32bit and 64bit
  • Next step is to install subversion plugin for Eclipse called Subclipse. For that:
    • Start your eclipse
    • Go to Help -> Install New Software...
    • In the "Install" dialog click on "Add..." button.
    • There "Add Site" dialog will prompt you for Plugin name and location. In the name field enter "Subclipse" and in the "Location" enter this link.
    • Click "OK".
    • After you set up Plugin location you will see Subclipse and its related components listed in the "Install" dialog. At least select all required components, click "Next" and continue with installation.
    • Once the installation is complete Eclipse will prompt you to restart itself and after that Subclipse installation will be completed.
  • Next step is to import all the source for Engage application into Eclipse:
    • Go to "File" -> "Import..." (Notice you will see and SVN option there because you just installed the Subclipse plugin for you Eclipse).
    • Click on SVN and then select "Checkout Projects from SVN".
    • On "Select/Create Location" choose "Create a new repository location" and in the URL specify:
      https://source.fluidproject.org/svn
    • Next step is to check out a project "fluid-all" that contains all necessary sub-projects and dependencies for engage application: on "Select Folder" page select fluid -> fluid-all folder and click next.
    • On the "Check Out As" page select "Check out as a project in the workspace". Click "Finish". After the operation completes you should have a fluid-all project listed in the Package Explorer.
  • So by now you should have the source for the whole Engage app checked out inside Eclipse however there are a few more steps on order to run the application:
    • Click on "File" -> "Import..." and on "Select" page choose "General" -> "Existing Projects into Workspace". Click next.
    • On "Import Projects" page select root directory as the one inside the recently checked out fluid-all called fluid-engage-kettle and click "Finish".
    • Now you have another "fluid-engage-kettle" project inside your Package Explorer ready and set up as the Java project.
  • Now you need to make sure that you have Maven installed on your machine. If not, you this is how you can download and install it:
    • Mac and Linux users can download it here.
      Installation Instructions:
      • Extract the distribution archive, i.e. apache-maven-2.2.1-bin.tar.gz to the directory you wish to install Maven 2.2.1. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-2.2.1 will be created from the archive.
      • In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-2.2.1.
      • Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.
      • Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m". This environment variable can be used to supply extra options to Maven.
      • Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.
      • Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1.5.0_02 and that $JAVA_HOME/bin is in your PATH environment variable.
      • Run mvn --version to verify that it is correctly installed.
    • Windows users can download it here.
      Installation Instructions:
      • Unzip the distribution archive, i.e. apache-maven-2.2.1-bin.zip to the directory you wish to install Maven 2.2.1. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-2.2.1 will be created from the archive.
      • Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value C:\Program Files\Apache Software Foundation\apache-maven-2.2.1. Be sure to omit any quotation marks around the path even if it contains spaces. Note: For Maven < 2.0.9, also be sure that the M2_HOME doesn't have a '\' as last character.
      • In the same dialog, add the M2 environment variable in the user variables with the value %M2_HOME%\bin.
      • Optional: In the same dialog, add the MAVEN_OPTS environment variable in the user variables to specify JVM properties, e.g. the value -Xms256m -Xmx512m. This environment variable can be used to supply extra options to Maven.
      • In the same dialog, update/create the Path environment variable in the user variables and prepend the value %M2% to add Maven available in the command line.
      • In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. C:\Program Files\Java\jdk1.5.0_02 and that %JAVA_HOME%\bin is in your Path environment variable.
      • Open a new command prompt (Winkey + R then type cmd) and run mvn --version to verify that it is correctly installed.
  • Great now you have Maven and Eclipse installed, source code checked out, you need to run Maven once in order to download all necessary dependencies into your m2 repository:
    • In your command prompt (Windows run cmd) or your terminal (Linux or Mac) navigate into the above mentioned fluid-engage-kettle project directory inside fluid-all.
    • There you can see that you have a file called pom.xml. Once you make sure the file is there you should run "mvn install" to pull all fluid engage dependencies onto your machine.
  • Next step is the last step before you are able to see engage in action:
    • Go back to your eclipse and right click on fluid-engage-kettle in your "Package Explorer" where you select "Build Path" -> "Configure Build Path...".
    • There you should select a "Libraries" tab and click on "Add Variable...".
    • In "New Variable Classpath Entry" click on "Configure Variables..." and on the next screen click "New...".
    • The name of the new variable should be "M2_REPO" and it should point to "repository" directory inside the downloaded m2 directory (on Mac and Linux it is usually located in $HOME/.m2 and on Windows machines it can be found in %USERPROFILE%\.maven).
    • Save the variable and rebuild the whole project. Now you should be ready to start the engage app.
  • In order to run engage you should run fluid-engage-kettle/src/main/java/org/fluidproject/kettle/jetty/JettyLauncher.java as Java Application (Note: Rhino debugger in engage is enabled by default so once it's started and loaded all the files just click on Go for the application to procede).
  • Next and final step is to open you Web-Kit enabled browser (Safari or Chrome) and go to
    http://localhost:8080/home/home.html
  • No labels