There are several steps you should do.
1. You need a working Bazaar client - a distributed version control system.
You can download and find instructions how to install it here:
After you get a working Bazaar initialize the directory where you will branch the wannatrak project. Here is the instruction:
2. From your local repository execute Bazaar branch command to get wannatrak project:
(Optional) Read Bazaar docs to ensure you understand how it works.
bzr branch http://bzr.wannatrak.org/main
3. Configure Maven - a project management tool that builds and deploys Wannatrak application.
Using link below you can find detailed instructions on how to install it: http://maven.apache.org/download.html
To make maven work and to ease its usage create
M2environment variables. Also add maven dir to
PATH. You can read how to do it at the bottom of the page: http://maven.apache.org/download.html
4. Install DBMS PostgreSQL 8.3. Here are the instructions:
5. You need JBoss 4.2.3 Application Server. You can download it from developers site: http://jboss.org/jbossas/downloads/
or right away from SourceForge: http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/
To install unzip it, for example to the
Add new environment variable
WT_JBOSS_HOMEwith the JBoss installation path value. As in the example above it can be
6. (Optional) In order to develop mobile Java application you need to install WTK 2.5.2. All necessary information you can find here:
Add new environment variable
WTK_HOME with the WTK installation path value.
If you have installed and configured programs described in part I, you can deploy Wannatrak project with maven.
1. First of all you need to initialize PostgreSQL database, load demonstration data if need and init JBoss (copy libs).Execute this command from the root of the project to initialize wannatrak:
mvn install -P InitDB,LoadDemo,InitJBoss
<properties> <db.url>jdbc:postgresql://127.0.0.1</db.url> <db.driver>org.postgresql.Driver</db.driver> <db.type>PostgreSQL 8.3</db.type> <db.username>postgres</db.username> <db.password>postgres</db.password> <db.name>wannatrak</db.name> ... </properties>
-Dkey as shown below (keep in mind they are case sensitive):
mvn install -Ddb.username=myname -Ddb.password=1234
mvn install -P InitDB,LoadDemo,InitJBoss -Ddb.username=myname -Ddb.password=1234
2. Build the Wannatrak.Execute
mvn installcommand that builds project - middleware and device. If you want to rebuild project:
mvn clean installThere are some profiles for building wannatrak project:
WithClient- web interface based on GWT.
WithClientAndJ2ME- includes client and mobile modules.
Deploy2JBoss- copies middleware, device and client to JBoss
You can combine any of these profiles according to what you need, for example to update mobile client and deploy to JBoss, use this command:
UpdateJ2MEInClient- copies last mobile Jar and Jad files to client/war/download.
mvn clean install -P UpdateJ2MEInClient,Deploy2JBoss
3. It's time to run the project.
Check whether PostgreSQL service started.
Open link below in your browser (be sure firewall doesn't block 8080 port): http://localhost:8080