My favorites | Sign in
Project Logo
                
Search
for
Updated May 05, 2008 by harry.chen
Labels: Phase-Implementation
HowToBuild  
How to check out and build gnizr on your local machine

This page describe the steps to build gnizr from SVN source code. Most users should download and install from gnizr binary releases.

If you have any questions, post them in Gnizr User Discussion.

Required Tools

Our build configuration requires the following tools already been installed:

Step 1: Download Source Code

Follow these instructions.

Source code options:

  • /trunk -- the latest under active development; may not build or may fail tests.
  • /branches -- release branches; software under "maintenance" mode; should build and pass tests.
  • /tags -- tagged Stable Releases and Development Releases; should build and pass tests.

Step 2: Prepare JUnit Test DB

Create a new MySQL database schema for testing. This schema should be created using the following configuration:

NOTE: Make sure you grant gnizr user all proper MySQL DB privileges.

Run gnizr SQL script files:

  1. Go to the SQL script directory
    • cd gnizr-db/src/main/resources/sql.
  2. Run BASH script to setup database
    • chmod 755 loadsch.sh loadsp.sh
    • ./loadsch.sh gnizr_test gnizr gnizr
  3. Done!

Step 3: Compile Source Code

Assume that you've checked out the source code in a top-level directory called gnizr.

  1. Go to the top-level directory
  2. Install the root project POM and update Maven plugins
  3. Compile gnizr modules, run JUnit tests and assemble the application
  4. If you see no error messages, then the build is complete.

In the target directory, you will find two different outputs of the same build: one in a uncompressed directory structure, and the other bundled in a ZIP file.


Comment by harry.chen, Feb 25, 2008

In Step 3: Compile Source Code, if you encounter a JUnit test error for TestBookmarkDBDao2.java, there is a possibility that the file has a character encoding error on your machine.

You have two options:

Option 1:

Skip the JUNit test by using mvn -U -N -Dmaven.skip.test=true install

Option 2:

Fix the character encoding problem.

1) Open the TestBookmarkDBDao2.java file in Eclipse

2) In the "Package Explorer", right-click the file name => "properties"

3) In "Text file encoding" section, select "Other: UTF-8".

4) Save the file.

5) Re-run mvn -U -N install

Comment by pajoma, Nov 04, 2008

Two comments:

  • it's -Dmaven.test.skip=true
  • switching to UTF-8 didn't work for me (UTF-8 was already standard for my linux box anyway, I commented out the test method)

Sign in to add a comment
Hosted by Google Code