My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
DevelopersGuide  
System Build Information for Ambient Coders.
Featured
Updated Feb 4, 2010 by taesu...@gmail.com

Introduction

First off, we would like to thank you for taking interest in our AmbientHackystat project. In case you happened to just stumble upon this wiki page and have no idea what you're getting yourself into, but would like to get a acquainted with the system, you can visit the GuidedTour wiki page.

Software Tools

You will need to download a few software tools in order to work and test our source code. You will also need to set up environmental variables for the tools. If you are unfamiliar with setting up environmental variables, please see the EnvironmentalVariables wiki page.

We apologize in advance for the time and effort required to install all of these supplemental packages.

Software Tools Download Version Environmental Variable Description
Ant Download 1.7.0 ANT_HOME Needed to run QA tools
Derby Download 10.2.2.0 DERBY_HOME Relational database implemented entirely in Java
Eclipse Download 3.3.0 No environmental variable Recommended IDE for Java
Java Download 1.6.0 JAVA_HOME You will need the JDK, not JRE
Jaxb Download 2.0 JAXB_HOME Need to download JAXB if you only have Java 5.
Javamail Download 1.4.1 JAVAMAIL_HOME Needed for Hackystat Sensorbase, mentioned below

Please refer to the InstallingJavaMail wiki page, found at the hackystat wiki to install javamail correctly.

Quality Assurance Tools

Below is a table containing the Quality Assurance tools needed for testing on this project. Please download the specified versions. The configuration file is used to specify which QA tests the tool should perform. Please note that there are newer versions of some of the tools mentioned belower, however, we strongly recommend that you download the specified versions in order to have full compatibility with our system.

QA Tool Download Version Configuration File Environmental Variable Invocation
Checkstyle Download 4.3 checkstyle.module.xml CHECKSTYLE_HOME ant -f checkstyle.build.xml
Emma Download 2.0.5312 EMMA_HOME ant -f emma.build.xml
Findbugs Download 1.2.0 findbugs.filter.xml FINDBUGS_HOME ant -f findbugs.build.xml
Junit Download 4.4 JUNIT_HOME ant -f junit.build.xml
Pmd Download 4.0 pmd.rulesets.xml PMD_HOME ant -f pmd.build.xml
SCLC Download 2.5.525 SCLC_HOME ant -f sclc.build.xml

Hackystat

In order for you to successfully run the AmbientHackystat system, you will need to install the hackystat framework. Please follow the link to download and install the hackystat system on your computer. We recommend that you read through the tutorials and guides to get a better understanding of this great framework.

Checkout the sources

Check out the sources from the trunk of the ambienthackystat Google Project repository. http://ambienthackystat.googlecode.com/svn/trunk/. The google project source page has more information.

Verify your installation

Invoke ant -q -f verify.build.xml to make sure everything is running fine.

Building and Running the system

To build the jar file, invoke ant -f dist.build.xml to create the jar file. What this will do is create a distributable zip file in the build directory, as well as create a jar file in the main directory.

Alternately, this file can be downloaded from the .zip file that is located in the featured downloads. The jar file is found within the build directory of the .zip. But if you have install all the correct files and set up the environmental variables, you might as well just build the file!

Setting up the Configuration File

To set up the configuration file, go to the directory where you unzipped the file and navigate to xml\test\configuration.test.xml file. From there you need to set up the username and password for your HackyStat account.

Make sure to leave the Servers field alone for now. The next thing you need to edit is the Devices fields. Fill in this field with the information for your devices. The only thing you really need to edit is the DeviceId for the Orb which is the serial number located at the bottom of the Orb. The DeviceId for the Nabaztag Bunny which is the serial number at the bottom of the Bunny and the Token is found on the http://my.nabaztag.com site under "My Burrow" in the area called "Nabazphere."

The last thing you need to edit is the project and the Trigger/Action pairs. The picture below only has one project and one Trigger/Action pair but you can add more and the test file should have at least 5 already preinstalled. The only thing you need to edit is the ProjectName and the Owner for each project. The ProjectName must match the project name in HackyStat and the Owner must be the email of the Owner of the project so that you get any DevEvents (Development Events) that come from that project and not just a single HackyStat account.

Start up server

To start up server, using the test xml file, invoke the jar file by entering

java -jar ambienthackystat.jar xml\test\configuration.test.xml

If you entered your username and password correctly, the server should be able to communicate with the sensorbase.

Once its running, it will communicate with the sensorbase and look for build information included in the configuration xml file. If the state has changed, it will change the orb's color/appearance accordingly.

Kill the server

Unfortunately, there is no graceful way of stopping the server(yet), so enter Ctrl + C.

Possible Errors

When you start the server, you might see some text that seem like errors. What's happening is the server is checking for the latest information from the sensorbase, and changes the state of the orb accordingly. If you take a look at the console output above, there are some errors but most of these are out of the hands of the user. Most of the errors you will encounter are mostly errors with your internet connection. Since the server is trying to receive data from the sensorbase, if it cannot reach the internet then there will be an error reaching the server.

Any other errors that might be displayed will usually be due to incorrect information in the configuration file. The system is still very fragile so any slight incorrectness in the configuration file will usually trigger some kind of error if not collapsing the system in general. If you do see a printStackTree, a huge amount of garbled text in the command line referring to files in the program and other Java jargon, then it's probably one of those errors.

A sample of this sort of error:

Developmental Ant Tasks

Below are ant tasks that you can invoke while in the main installation directory.

Command Description
ant Compiles system
ant clean Removes build directory
ant -f checkstyle.build.xml Runs checkstyle to verify source code format standards.
ant -f findbugs.build.xml Runs Findbugs to analyze byte code
ant -f pmd.build.xml Runs pmd to analyze source code
ant -f junit.build.xml Runs junit test cases
ant -f emma.build.xml Runs emma to test for coverage
ant -f verify.build.xml Runs compiler, checkstyle, PMD, FindBugs, JavaDoc, and Emma, failing the build if problems occur.
ant -f javadoc.build.xml Generates javadoc files the build\javadoc directory
ant -f dist.build.xml Creates a downloadable version of this system and creates a jar file in the main installation directory


Sign in to add a comment
Powered by Google Project Hosting