My favorites | Sign in
Project Logo
                
Search
for
Updated May 12, 2008 by jianfeiliao
Labels: Featured
DevelopersGuide  
A guide to set up the system for developers to work on

Developer's guide for the Informative Workspace Overviewer

This version of the overviewer uses the following tools to build and requires that all of them be installed properly:

Tool Version Home Page Environment Var
Java 1.6.0 http://java.sun.com/ JAVA_HOME
Apache Ant 1.7.0 http://ant.apache.org/ ANT_HOME
HttpUnit 1.6.2 http://www.httpunit.org/ HTTPUNIT_HOME
Jetty 6.1.9 http://www.mortbay.org/ JETTY_HOME
Jaxb (if not running Java 6 or higher) 2.0 https://jaxb.dev.java.net/ JAXB_HOME
Checkstyle 4.4 http://checkstyle.sourceforge.net/ CHECKSTYLE_HOME
JUnit 4.4 http://www.junit.org/ JUNIT_HOME
JTreeMap 1.1.0 http://jtreemap.sourceforge.net/ JTREEMAP_HOME
PMD 4.1 http://pmd.sourceforge.net/ PMD_HOME
FindBugs 1.2.0 http://findbugs.sourceforge.net/ FINDBUGS_HOME
SCLC 2.7.428 http://code.google.com/p/sclc/ SCLC_HOME
Emma 2.1.5312 http://emma.sourceforge.net/ EMMA_HOME

Once all the tools are setup, load the project source into your IDE (Eclipse with Java plugin is preferred). In your project build paths, make sure all the required libraries are linked/copied correctly.

Some other possibly required libraries are:

httpunit.jar joda-time-1.4.jar js.jar junit-4.4.jar
nekohtml.jar sensorbaseclient.jar slf4j-api-1.4.3.jar slf4j-simple-1.4.3.jar
wicket-1.3.2.jar wicket-datetime-1.3.2.jar wicket-extensions-1.3.2.jar xercesImpl.jar

ProjectOverviewer Version 3

  1. Download the source distribution here and upzip to a folder without space.
  2. For first time usage, creates the directory of <user.home>/.hackystat/projectoverviewer if it doesn't already exist.
  3. Invoke "ant run" in the root directory of the project, the system will start the embedded Jetty server and start running. The system is running on port 8081 by default, if you want to change the port, invoke "ant run -Dport=<your port number>" instead. Here is a sample output:
  4. C:\svn-google\informative-workspace\trunk>ant run -Dwicket.version=1.3.3
    Buildfile: build.xml
    
    clean:
       [delete] Deleting directory C:\svn-google\informative-workspace\trunk\build
       [delete] Deleting directory C:\svn-google\informative-workspace\trunk\target
    
    compile:
        [mkdir] Created dir: C:\svn-google\informative-workspace\trunk\build\war\WEB-INF\classes
        [javac] Compiling 39 source files to C:\svn-google\informative-workspace\trunk\build\war\WEB-INF\classes
         [copy] Copying 5 files to C:\svn-google\informative-workspace\trunk\build\war\WEB-INF\classes
    
    war:
         [copy] Copying 7 files to C:\svn-google\informative-workspace\trunk\build\war\WEB-INF
         [copy] Copying 1 file to C:\svn-google\informative-workspace\trunk\build\war\WEB-INF\lib
         [copy] Copying 7 files to C:\svn-google\informative-workspace\trunk\build\war
         [copy] Copying 23 files to C:\svn-google\informative-workspace\trunk\build\war\applets
         [copy] Copying 89 files to C:\svn-google\informative-workspace\trunk\build\embedded-webapp
          [war] Building war: C:\svn-google\informative-workspace\trunk\build\projectoverviewer.war
    
    run:
         [java] 0 [main] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortbay.log.Slf4jLog
         [java] >>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP
         [java] 141 [main] INFO org.mortbay.log - jetty-6.1.9
         [java] Loading ProjectOverviewer properties from: C:\Documents and Settings\Fei/.hackystat/projectoverviewer/projectoverviewer.properties
         [java] Setting wicket.configuration to: development
         [java] 05/12 16:54:36  ProjectOverviewer Properties:
         [java]                 projectoverviewer.sensorbase.host = http://dasha.ics.hawaii.edu:9876/sensorbase
         [java]                 projectoverviewer.logging.level = INFO
         [java]                 projectoverviewer.wicket.configuration = development
         [java]                 projectoverviewer.application.name = Project Overviewer
         [java]                 projectoverviewer.admin.email = johnson@hawaii.edu
         [java] 1969 [main] INFO org.apache.wicket.Application - [ProjectOverviewerApplication] init: Wicket core library initializer
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IResourceListener, method=public abstract void org.apache.wicket.IResourceListener.onResourceRequested()]
         [java] 1969 [main] INFO org.apache.wicket.RequestListenerInterface - registered listener interface [RequestListenerInterface name=IResourceListener, method=public abstract void org.apache.wicket.IResourceListener.onResourceRequested()]
         [java] 1969 [main] INFO org.apache.wicket.protocol.http.WebApplication - [ProjectOverviewerApplication] Started Wicket version 1.3.3 in development mode
         [java] ********************************************************************
         [java] *** WARNING: Wicket is running in DEVELOPMENT mode.              ***
         [java] ***                               ^^^^^^^^^^^                    ***
         [java] *** Do NOT deploy to your live server(s) without changing this.  ***
         [java] *** See Application#getConfigurationType() for more information. ***
         [java] ********************************************************************
         [java] 1985 [main] INFO org.mortbay.log - Started SocketConnector@0.0.0.0:8081
  5. Go to the browser at http://localhost:<your port number>/projectoverviewer and your system is ready to go!
  6. If you want the system to automatically update information for you, you need to refresh the page at least every hour. Some browser plug-in like Auto-Refresh can help with this.
  7. To stop the system, press CTRL and C at the same time.

ProjectOverviewer Version 2 TreeMap

  1. Download the source distribution & unzip
  2. Invoke "ant jar" in the root directory of the project
  3. Invoke "java -jar JTreeMap-application.jar"
  4. For first time usage, please create a new project under the Project menu option. (The Repository URL must be valid for a successful project creation.)
  5. Now you can choose different metrics for the size and color to represent your project.

ProjectOverviewer Version 1

Execution

To run the project with the QA tools mentioned above, you have to open a command-line console in the root directory of the project and type "ant -f verify.build.xml".

NOTE

  1. Verify does not run the emma coverage tool - if you would like to do a coverage analysis, please run emma separately with emma.build.xml instead.
  2. Emma has a known issue with the ctl tool which is used in this system. If it doesn't succeed, please re-deploy the system and try run emma again.

If you want to run the QA tools separately, just invoke "ant -f

<tool-name>
.build.xml". Here's a table of what each
<tool-name>
.build.xml file does:

build.xml Compile the code and create a war file
checkstyle.build.xml Runs checkstyle code for code standard violation.
dist.build.xml Creates distribution of the system.
emma.build.xml Runs the emma tool for coverage.
findbugs.build.xml Runs FindBugs for coding violation.
hudson.build.xml Same as verify.build.xml, but dedicated to continuous integaration purpose.
java.build.xml Generates JavaDoc documentation.
jaxb.build.xml Creates the jaxb generated Java classes.
junit.build.xml Runs the JUnit test.
pmd.build.xml Runs PMD for coding violation.
sclc.build.xml Runs the SCLC for file metric information.
tomcat.build.xml Checks the presence of Tomcat, undeploy and re-deploy the system.
verfiy.build.xml Runs the all the QA tools.

If you are having trouble logging in, set your tomcat username and password in the tomcat-users.xml file in CATALINA_HOME/conf folder. Here is an example with "admin" as the username and "password" as the password:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <role rolename="password"/>
  <user username="admin" password="password" roles="admin,manager"/>
</tomcat-users>

Once the war file is properly deployed, you should be able to view the overviewer locally at http://localhost:8080/project-overviewer


Sign in to add a comment
Hosted by Google Code