InstallGuide.doc - Assembla

tamerunSoftware and s/w Development

Aug 15, 2012 (4 years and 10 months ago)

279 views


Maciej Janik

Jason Pancake

Reiman Rabbani

Corey Stark

Shaohua Xie

Installation guide


Download and installation


Directory structure and files

Configuration


Building project


Building source files

C
heckstyle

report

Creating JavaDoc

Running JUnits with E
mma

Running SpeedEx system


How to correctly run SpeedEx demo

Directory structure and files


Tracking project has following directory structure:


-

apidocs


JavaDoc documentation for project

-

build



build directory for ‘class’ files

-

classes


tracking
system class files

-

test


JUnit test ‘class’ files for tracking system

-

coverage


generated Emma report

-

dist



built executable ‘jar’ distribution of system

-

libs



required libraries to run system (jar files)

-

routes


files with GPS route definition
s

-

src



tracking system java source files

-

test



JUnit source files for tracking system

-

uml



UML diagrams for tracking sustem (Poseidon)


Additionally in main system directory there are following files:


-

build.xml




Ant build file

-

create_javado
c.bat



creating JavaDoc for project

-

InstallGuide.doc



this document

-

manifest.mf




template for jar manifest file

-

map.jpg




map of tracks used by system

-

project.properties



properties needed for Ant build

-

ReadMe.txt




file you start with to
know where to look for

-

runCheckStyle.bat



running checkstyle for whole project

-

runEmma.bat



running JUnits in Emma to generate reports

-

simulateSystem.bat



running tracking system demo itself

-

simulateTrucks.bat



running truck simulators needed
for demo

-

SpeedEx.gif




system logo

-

SpeedEx
-
big.gif



big system logo

-

SpeedExPresentation.ppt


system class presentation

-

sun_checks.xml



checkstyle configuration

-

UserGuide.doc



user guide, how to use system


Configuration

SpeedEx system needs
Java 5.0 and Ant installed. There must be path to both of them.

No other configuration is necessary, as for demo purposes we unplugged MySql

and
system runs using only main memory.

Zip file contains fully build system with generated documentation, coverage

and
checkstyle report, but of these parts can be generated on your machine.

Building source files

We use Ant for building system from sources.

To build system, open command
-
line window in project directory and run ant


> ant
[enter]


Classes and distribut
ion will be cleaned and whole project will be rebuilt. All needed jar
files are in ‘libs’ directory.

Checkstyle report

To generate checkstyle report, open command
-
line window in project directory and type:


> runCheckStyle.bat

[enter]


This will run checks
tyle for project source files and generate report to file

checkReport.txt
’ from all classes. Please, disregard errors from
tracking.gui.Login

and
tracking.gui.
PackageTracking

as these files
are automatically generated by NetBeans and we do not have contro
l over generated
code. Checkstyle also reports non
-
existing errors of space after class names like
‘ArrayList’ or ‘HashMap’. This is due to use of Java5 generics that Checkstyle does not
handle correctly.

We also decided to make some methods non
-
final and
some attributes
non
-
private. This is valid design decision, but still is reported as error in sun
-
standard.

Creating JavaDoc

To generate JavaDocs from current source files, open command
-
line window in project
directory and type:


> create_javadoc.bat
[ente
r]


JavaDoc files will be created in ‘apidocs’ directory as HTML files.

Running JUnits with Emma

To run JUnit tests and Emma to generate coverage report, JavaDocs from current, open
command
-
line window in project directory and type:


>
runEmma
.bat
[enter]


All JUnits will be run with output to a terminal. Emma will create coverage report as
HTML files inside ‘coverage’ directory.

How to correctly run SpeedEx demo

SpeedEx demo requires to separately run two parallel processes. One of them is the
system that

uses sees and naviagate in, while the second one simulate trucks driving on
routes. Truck simulation part is required for trucks to move during simulation. In real life
there should be trucks with GPS devices that update truck position in system. Due to
s
imulator limitations, we simulate trucks by sending real GPS coordinates over network
(using sockets) to central system.


To run SpeedEx system, please open two command
-
line windows in project directory. As
first one, start the system itself typing:


>
sim
ulateSystem
.bat
[enter]


This will open a SpeedEx system and bring up login window. It is important to start it
before truck simulator, as inside system there is a listening server that accepts connection
from trucks. Without it, truck simulators will not
have a destination to send position
updates.

Also, inside system simulator there is running random

package generator (it shows some
output in command window). This is to automatically generate and ship packages in
system for demonstrating all features.


In

second command
-
line window start truck simulators by typing:


>
simulateTrucks
.bat
[enter]


This starts a process which has 9 threads. Each of them simulate a truck on one route (as
in route directory).


Remember to kill this process (Ctrl
-
C) after exitin
g SpeedEx system. Truck Simulators
are totally independent from SpeedEx system and are used only for demonstration.