Colle Quick Start Guide

Welcome to Project Colle! This guide will help you get up and running in the least amount of time. To learn more about Colle before you start look here.

Project Colle is based on many standards and frequently one piece of technology can be replaced by another. This guide makes some assumptions about which technologies are being used, but where applicable, notes are made to show where other technologies can be used.

This guide assumes you have an installed and functioning Java SDK (not just the JRE). Look here for the right SDK for your operating system. Project Colle will work with JDK 1.2 and later.

Next you will need to have Ant 1.4 or later installed and running. You can download Ant here. Here is the official installation manual.

Finally, depending on which sub-systems of Project Colle you are using, you may need to have a running RDBMS with JDBC driver, an EJB 1.1 compliant application server and/or a web server with a Servlet engine that supports the Servlet API 2.2 or later.

The following is a list of servers that are supported and tested on a regular basis:

Server RDBMS EJB Server Servlet Engine Notes
MySQL 4.0 Yes JDBC driver is Connector/J (formerly MM.MySQL)
MySQL 3.23 Yes JDBC driver is Connector/J (formerly MM.MySQL)
Microsoft SQL Server 2000 Yes JDBC drivers are found here.
Oracle 10g Yes Yes Yes

Set useappinfdir="false" in colle-ejb task

JDBC drivers vary with platform

JBoss 4.0 Yes Yes Tested through JBoss 4.0.0
JBoss 3.2 Yes Yes Tested through JBoss 3.2.6
JBoss 2.4 Yes Yes Tested through JBoss 2.4.10
WebLogic 8.1 /w SP3 Yes Yes
WebLogic 7.0 /w SP5 Yes Yes
Tomcat 5.5.4 Yes
Tomcat 4.1.31 Yes
Tomcat 3.3.2 Yes
Jetty 4.2.22 Yes

Here are the step by step instructions:

  1. Download the latest version of Colle here.
  2. Unzip or un-archive Colle to a folder on your hard disk.
  3. UNIX:  $ tar xzf colle_0.9.7.1.tar.gz
    Windows:  C:\> pkunzip colle_0.9.7.1.zip

  4. Copy the necessary Colle jars to your project. The Colle jars are split up by sub-system so you can add only what you need. There is also a colle-all_0.9.7.1.jar which contains all sub-systems.
  5. UNIX:  $ cp colle_0.9.7.1/lib/colle-all_0.9.7.1.jar myproject/lib
    Windows:  C:\> copy colle_0.9.7.1\lib\colle-all_0.9.7.1.jar myproject\lib

  6. Add a validate task to your project's build.xml to validate your Colle tables (.crt), views (.crv), interfaces (.cid & .cil), forms (.cfs), and resources (.crb).
  7. <taskdef name="colle-validate" classname="net.sf.colle.ant.ValidateTask">
        <classpath path="lib/colle-all_0.9.7.1.jar"/>
    </taskdef>
    
    <colle-validate srcdir="src" collejar="lib/colle-all_0.9.7.1.jar"/>
    

  8. Add a generate task to your project's build.xml to generate Java files and other intermediate files.
  9. <taskdef name="colle-generate" classname="net.sf.colle.ant.GenerateTask">
        <classpath path="lib/colle-all_0.9.7.1.jar"/>
    </taskdef>
    
    <colle-generate
        srcdir="src"
        destdir="build"
        collejar="lib/colle-all_0.9.7.1.jar"/>
    

  10. Add the generated code to your javac task (assuming you already have a javac task).
  11. before: 
    <javac
        destdir="build/classes"
        includes="**/*.java">
        <src path="src"/>
    </javac>
    
    after: 
    <javac
        destdir="build/classes"
        includes="**/*.java">
        <src path="src"/>
        <src path="build/java"/><!-- Generated code. -->
    </javac>
    

  12. OPTIONAL (Colle-SQL): If you want to use Colle-SQL to build and populate your database, then run the tablebuilder task for each group of tables.
  13. <taskdef name="colle-tablebuilder" classname="net.sf.colle.ant.TableBuilderTask">
        <classpath>
            <pathelement path="lib/colle-all_0.9.7.1.jar"/>
            <!-- Add your JDBC driver jar here -->
            <pathelement path="lib/mysql-connector-java-3.0.15-ga-bin.jar"/>
        </classpath>
    </taskdef>
    <colle-tablebuilder
        runtime="net.sf.colle.sql.mysql.MySQLRuntime"
        driver="com.mysql.jdbc.Driver"
        databaseURL="jdbc:mysql://localhost:3306/colle"
        username="root"
        password="mysqlpassword"
        modelDir="./src/com/myproject/sql"
        dataDir="./src/com/myproject/sql"/>
    

    RDBMS Runtime class Typical driver
    URL format
    MySQL
    net.sf.colle.sql.mysql.MySQLRuntime
    com.mysql.jdbc.Driver
    jdbc:mysql://{hostname}:{port default=3306}/{db name}
    Oracle
    net.sf.colle.sql.oracle.OracleRuntime
    oracle.jdbc.driver.OracleDriver
    jdbc:oracle:thin:@{hostname}:{port default=1521}:{db name}
    MS SQL
    net.sf.colle.sql.mssql.MSSQLRuntime
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    jdbc:microsoft:sqlserver://{hostname}:{port default=1433};DatabaseName={db name}

  14. OPTIONAL (Colle-Mid): If you want to deploy EJBs to an application server, then for each group of logics create an EJB jar with the ejbjar task.
  15. <taskdef name="colle-ejbjar" classname="net.sf.colle.ant.EJBJarTask">
        <classpath>
            <pathelement path="lib/colle-all_0.9.7.1.jar"/>
            <!-- The ejbjar task requires jdom -->
            <pathelement path="lib/jdom-1.0.jar"/>
        </classpath>
    </taskdef>
    
    <colle-ejbjar
        srcdir="src"
        eardir="build/ear"
        eardisplayname="my-ear"
        destfile="build/ear/my-ejb.jar"
        classesdir="build/classes"
        collejar="lib/colle-all_0.9.7.1.jar">
        <libraries>
            <fileset dir="lib" includes="lib/colle-all_0.9.7.1.jar"/>
            <!-- A Colle-Mid generated jar also requires jdom at runtime -->
            <fileset dir="lib" includes="jdom-1.0.jar"/>
        </libraries>
    </colle-ejbjar>
    

  16. OPTIONAL (Colle-Web and Colle-Forms): If you would liek to build one or more web applications (.war files), you can call .
  17. <taskdef name="colle-stagewar" classname="net.sf.colle.ant.StageWarTask">
        <classpath>
            <pathelement path="lib/colle-all_0.9.7.1.jar"/>
        </classpath>
    </taskdef>
    
    <colle-stagewar
        srcdir="src"
        destdir="build" collejar="lib/colle-all_0.9.7.1.jar"
        stagingdir="build/mywebapp.war">
        <libraries>
            <fileset dir="lib">
                <include name="lib/colle-all_0.9.7.1.jar"/>
                <!-- A Colle-Web generated war requires Apache Commons Codec and jdom jars -->
                <include name="commons-codec-1.1.jar"/>
                <include name="jdom-1.0.jar"/>
            </fileset>
        </libraries>
    </colle-stagewar>
    

That's it! You can take an ear directory created in step 8 or a war directory created in step 9 and deploy to your app server. You are now ready to start writing your database schema, application server logic, and/or web content. For more direction look at one of our fine tutorials (coming soon!).