Building From Source

Building From Source

Step-by-step guide to build the Marketcetera platform from source:

  1. Install the tools
    1. Maven 3
    2. Java SE JDK 6
    3. Subversion (command-line or UI-based, like TortoiseSvn)
    4. Eclipse IDE
    5. MySQL 5
  2. Set up your database system
    1. Add the following to your my.cnf and restart MySQL#
       
      # Marketcetera Modifications
      #character_set_server = utf8
      lc_time_names = en_US
      default-time-zone = +0:00
      collation_server = utf8_general_ci

    2. Create a Marketcetera database$ mysql -u root -p
       
      Enter password:
      mysql> create database marketcetera;
      mysql> grant all on marketcetera.* to ‘marketcetera’@’localhost’ identified by ‘marketcetera’;
      mysql> flush privileges;
      mysql> \q

      These instructions are for Linux, but are almost the same for Windows. If you installed MySQL as a service, you can omit the ‘@localhost’ part above.

  3. Set up your directories.
    1. Linux
       
      $ cd ~
      $ mkdir -p marketcetera/workspaces/base/code

    2. Windows
       
      Create the same directory structure from your root device, like C:\metc\workspaces\base\code. Keep it as short as possible as there’s a limitation in Windows on the length of filenames.

  4. Download the Source
     
    $ cd ~/marketcetera/workspaces/base/code
    $ svn co http://source.marketcetera.org/root/trunk metc

  5. Build the Source
     
    $ cd metc
    $ mvn -DskipTests clean install eclipse:eclipse

  6. Start Eclipse
    1. Set your workspace to marketcetera/workspaces/base
    2. Define a String Substitution that points to your Maven executable (Window->Preferences->Run/Debug->String Substitution)
       
      1

    3. Set the target platform (Windows->Preferences->Plug-in Development->Target Platform)
      1. Select Add to create a new target platform
      2. Start with Nothing and click Next
      3. Name your target Marketcetera and click Add
      4. Choose Directory and click Next
      5. Browse to metc/photon/maven/rcptarget/photon-target/eclipse and click OK
      6. Click Finish
      7. Click Finish
      8. Select the Marketcetera platform as the active platform and click OK
  7. Import projects (File->Import->General->Existing Projects into Workspace). Set the root directory to your top level code directory (marketcetera/workspaces/base/code/metc). Check Search for nested projects and select Finish. A popup may appear right away that says “build error”. Just close this and ignore it. The code should build cleanly at this point.