|
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:
Here are the step by step instructions:
- Download the latest version of Colle
here.
- Unzip or un-archive Colle to a folder on your hard
disk.
UNIX: | |
$ tar xzf colle_0.9.7.1.tar.gz |
Windows: | |
C:\> pkunzip colle_0.9.7.1.zip |
|
- 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.
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 |
|
- 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 ).
<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"/>
|
- Add a generate task to your project's build.xml to
generate Java files and other intermediate files.
<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"/>
|
- Add the generated code to your
javac task
(assuming you already have a javac task).
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>
|
|
- 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.
<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} |
- 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.
<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>
|
- OPTIONAL (Colle-Web and Colle-Forms): If you would liek to build one or more web applications
(.war files), you can call .
<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!).
|