This guide is intended for developers who wish to work on Fosstrak Reader project. It outlines the steps to follow for setting up the development environment and helps developers to find their way through the code.
This section describes the setup of the development environment we use when working on Fosstrak's Reader project. To compile the Reader, execute Maven as explained below. A Java Development Kit needs to be installed.
First thing you need to do is checking out the code from the SVN repository. See Source Repository on how to access the sources.
We use Maven 2 as our build tool. After installation you need to have the M2_HOME environment variable set to your Maven installation directory.
This section helps developers to find their way through the code.
Fosstrak's Reader project consists of three modules:
This module implements the EPCglobal Reader Protocol and Reader Management. It represents a compliant reader that uses the Fosstrak HAL with a simulator or reader hardware that does not support the Reader Protocol as backend.
This module is a library for communication with a Reader Protocol compliant reader such as but not limited to the reader core module. The proxy depends on code of the reader core even if the reader of the core module is not used. An example of shared code located in the core module is the marshalling and unmarshalling of Reader Protocol messages that is used on both sides.
This module provides a graphical user interface to configure a Reader Protocol compliant reader and two versions of an event sink that acts as a notification channel end point and displays information about events reported by the reader. The client depends on code of of the reader core and the proxy.
We use the standard Maven directory layout as follows:
| +-- pom.xml -> top-level POM file | +-- LICENSE.txt, README.txt | +-- src/ | | | `-- site/ -> project documentation | +-- reader-rprm-core/ | ¦ | ' | +-- reader-rp-proxy/ | ¦ | ' | +-- reader-rp-client/ | | | +-- pom.xml -> module POM file | | | `-- src/ | | | +-- main/ | | | | | +-- java/ -> java source files | | | | | +-- resources/ -> configuration files and images | | | | | `-- assembly/ -> packaging information | | | +-- site/ -> module documentation | | | `-- test/ | | | `-- java/ -> java unit test source files | `-- target/ -> generated contents
We use Maven as our build tool for the Fosstrak Reader project.
For building the sources, it is sufficient to run the following command:
mvn compile
In order to work on the Fosstrak Reader using Eclipse, follow these instructions:
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo
mvn eclipse:eclipse
The following command will generate the binaries for the modules.
mvn package
To install Fosstrak Reader in the local Maven repository and use it in other projects, for instance an application using the reader proxy module, run the following command:
mvn install
The main web site (containing this documentation) can be generated by using the following command:
mvn site -N
In order to generate all module reports and to test the whole site navigation before a live deploy, you can execute the following command which will generate the web site under the given directory:
mvn site:stage -DstagingDirectory=<directory-to-deploy-site>