Skip to end of metadata
Go to start of metadata

Starting with version 3.2.0, the fully function platform is once again available as open source. These are the instructions to build 3.2.x and 4.0.x.

Step-by-step guide

These instructions apply to all platforms. The examples here are for a Unix based system like Linux. Similar instructions apply to Windows and other platforms though different tools may be required. These build instructions assume an Oracle 8 JDK or later, though the platform performs equally well with an equivalent version of OpenJDK.

The Marketcetera Automated Platform requires a database system. The development environment is designed so that each developer can specify his or her own database coordinates without modifying the source code. The settings are established in the Maven settings.xml file.

Prepare your environment: create or edit your Maven settings.xml file. In Unix environments, this file will be at ~/.m2/settings.xml

In order to run the application from the development environment, you must provide two things in settings.xml:

  1. Provide a unique name for metc.exsim.qf.sender.comp.id - anything will do. I've used <name>-<project>-<machine> here, but you can use anything you want.
  2. Provide a database environment. I've included the blocks for Derby, Postgres, MySQL, and Oracle here. Postgres is uncommented here, the rest are disabled by comments. You must set up the database and the user/password, which is not covered in this document.


<settings>
  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <mvn.build.number>1</mvn.build.number>
        <!-- Core -->
        <metc.exsim.qf.sender.comp.id>colin-core-callisto</metc.exsim.qf.sender.comp.id>
        <!-- Derby -->
        <!--metc.jdbc.user>metc</metc.jdbc.user>
        <metc.jdbc.password>pw4metc</metc.jdbc.password>
        <metc.jdbc.driver>org.apache.derby.jdbc.EmbeddedDriver</metc.jdbc.driver>
        <metc.jdbc.url>jdbc:derby:target/metc;create=true</metc.jdbc.url>
        <metc.jdbc.testquery>values 1</metc.jdbc.testquery>
        <metc.hibernate.dialect>org.hibernate.dialect.DerbyTenSevenDialect</metc.hibernate.dialect>
 	    <metc.flyway.vendor>derby</metc.flyway.vendor-->
        <!-- Postgres -->
        <metc.jdbc.user>metc</metc.jdbc.user>
        <metc.jdbc.password>pw4metc</metc.jdbc.password>
        <metc.jdbc.driver>org.postgresql.Driver</metc.jdbc.driver>
        <metc.jdbc.url>jdbc:postgresql://127.0.0.1/metc</metc.jdbc.url>
        <metc.jdbc.testquery>select 1</metc.jdbc.testquery>
        <metc.hibernate.dialect>org.hibernate.dialect.PostgreSQLDialect</metc.hibernate.dialect>
     	<metc.flyway.vendor>psql</metc.flyway.vendor>
        <!-- MySQL -->
        <!-- Do not use MySQL < 5.6 - does not support datetimestamp milliseconds -->
        <!--metc.jdbc.user>metc</metc.jdbc.user>
        <metc.jdbc.password>pw4metc</metc.jdbc.password>
        <metc.jdbc.driver>com.mysql.jdbc.Driver</metc.jdbc.driver>
        <metc.jdbc.url>jdbc:mysql://localhost:3306/metc</metc.jdbc.url>
        <metc.jdbc.testquery>select 1</metc.jdbc.testquery>
        <metc.hibernate.dialect>org.marketcetera.persist.MarketceteraMySQL5Dialect</metc.hibernate.dialect>
	    <metc.flyway.vendor>mysql</metc.flyway.vendor-->
        <!-- Oracle -->
        <!--metc.jdbc.user>metc</metc.jdbc.user>
        <metc.jdbc.password>pw4metc</metc.jdbc.password>
        <metc.jdbc.driver>oracle.jdbc.driver.OracleDriver</metc.jdbc.driver>
        <metc.jdbc.url>jdbc:oracle:thin:@localhost:1521:xe</metc.jdbc.url>
        <metc.jdbc.testquery>select 1 from DUAL</metc.jdbc.testquery>
        <metc.hibernate.dialect>org.hibernate.dialect.Oracle10gDialect</metc.hibernate.dialect>
    	<metc.flyway.vendor>oracle</metc.flyway.vendor-->
      </properties>
    </profile>
  </profiles>

Install the tools

  1. Maven 3
  2. Java SE JDK 8
  3. Subversion Client (command-line or UI-based, like TortoiseSvn)
  4. IDE (Eclipse, Intellij, Netbeans, Emacs, etc)


$ mkdir -p ~/marketcetera/workspaces/trunk3/code
$ cd ~/marketcetera/workspaces/trunk3/code
$ svn co https://source.marketcetera.org/root/trunk public
$ cd public
$ mvn -DskipTests install

From here, prepare the environment as necessary for your IDE. For Eclipse:

$ cd ~/marketcetera/workspaces/trunk3/code/public
$ mvn eclipse:eclipse

Other IDEs may have similar setup procedures.

  1. Start Eclipse

    1. Set your workspace to marketcetera/workspaces/trunk3
    2. Import projects (File->Import->General->Existing Projects into Workspace). Set the root directory to your top level code directory (marketcetera/workspaces/trunk3/code/public). 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.

From here, run the unit tests to make sure your environment is set up properly. Some of the integration tests require the database you set up to succeed. Some of the more common problems with database access are using the proper JDBC library and granting access privileges.

$ cd ~/marketcetera/workspaces/trunk3/code/public
$ mvn install

The instructions for building the UI client, Photon, are separate from this document.