You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2011/03/31 14:06:10 UTC

[Db-derby Wiki] Update of "siddharthsrivastava/QuickStartGuide_NewDevelopers" by siddharthsrivastava

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The "siddharthsrivastava/QuickStartGuide_NewDevelopers" page has been changed by siddharthsrivastava.
http://wiki.apache.org/db-derby/siddharthsrivastava/QuickStartGuide_NewDevelopers

--------------------------------------------------

New page:
##master-page:HomepageReadWritePageTemplate
##master-date:Unknown-Date
#format wiki
#language en
'''Introduction '''

This guide is for New Developers to get started quickly with establishing there build environment for Derby and contribute to Derby.

'''FLOW OF EVENTS'''

A Quick look at the phases a developer would go through with Derby:

{{attachment:E:\project\derby\flowchart_developer.png}}

'''GETTING STARTED'''

                               a)       __Setting the build environment__

                                         (i) Setting DERBY_HOME:

                             Assuming that you have checked out the trunk in C:\derby\trunk on Windows, /home/<username>/derby/trunk on Linux.


||<tablestyle="margin-left: 1.25in; border-collapse: collapse; border: medium none;"^  width="127px" style="width: 95.4pt; border: 1pt solid black; padding: 0in 5.4pt;">Operating System||<^  width="391px" style="width: 293.4pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: black black black -moz-use-text-color; padding: 0in 5.4pt;">Command||
||<^  width="127px" style="width: 95.4pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Linux||<^  width="391px" style="width: 293.4pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">export DERBY_HOME=/home/<username>/derby/trunk||
||<^  width="127px" style="width: 95.4pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Windows||<^  width="391px" style="width: 293.4pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">set DERBY_HOME=C:\derby\trunk||
||<^  width="127px" style="width: 95.4pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Mac OSX||<^  width="391px" style="width: 293.4pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">--||


     (ii)                   Make sure that java is included in your classpath. To test it run java –version from the command prompt(windows)/terminal(linux)  (iii)                 Set PATH variable
||<tablestyle="margin-left: 1.25in; border-collapse: collapse; border: medium none;"rowstyle="height: 17.05pt;"^  width="127px" style="width: 95.4pt; border: 1pt solid black; padding: 0in 5.4pt; height: 17.05pt;">Operating System||<^  width="391px" style="width: 293.4pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: black black black -moz-use-text-color; padding: 0in 5.4pt; height: 17.05pt;">Command||
||<^  width="127px" style="width: 95.4pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Linux||<^  width="391px" style="width: 293.4pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">export PATH="$DERBY_HOME/bin:$PATH"||
||<^  width="127px" style="width: 95.4pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Windows||<^  width="391px" style="width: 293.4pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">set PATH=%DERBY_HOME%\bin;%PATH%   You can also add %DERBY_HOME%\bin at   the of the system path from Control Panel.||
||<^  width="127px" style="width: 95.4pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Mac OSX||<^  width="391px" style="width: 293.4pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">--||


     (iv)                Setting CLASSPATH          Following are the jars that needs to be included in your classpath

||<tablestyle="margin-left: 0.75in; border-collapse: collapse; border: medium none;"^  width="283px" style="width: 2.95in; border: 1pt solid black; padding: 0in 5.4pt;">'''Jar name'''||<^  width="283px" style="width: 2.95in; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: black black black -moz-use-text-color; padding: 0in 5.4pt;">'''Purpose'''||
||<rowstyle="height: 19.75pt;"^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt; height: 19.75pt;">jakarta-oro-2.0.8.jar  (trunk\tools\java)||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt; height: 19.75pt;">Required for running Derby harness tests||
||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">derbyTesting.jar||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">test files and classes||
||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">derby.jar||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">main derby package classes||
||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">derbytools.jar||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">derby tools classes for tools like ij   and dblook    ||
||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">derbyrun.jar||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">executable jar file for tools like ij   and dblook||
||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">derbynet.jar||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">derby network server classes||
||<rowstyle="height: 20.2pt;"^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt; height: 20.2pt;">derbyclient.jar||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt; height: 20.2pt;">derby client classes||
||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">junit.jar||<^  width="283px" style="width: 2.95in; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">assertion-based test machinery. It needs to be   manually put into trunk/tools/java directory.     See BUILDING.html for details.   It is required for running JUnit tests in Derby||


                For Derby checked out from the trunk, the classpath should be set as follows:  Say, you want to add derbyclient.jar to the classpath:
||<tablestyle="margin-left: 54.9pt; border-collapse: collapse; border: medium none;"^  width="222px" style="width: 166.65pt; border: 1pt solid black; padding: 0in 5.4pt;">Operating System||<^  width="343px" style="width: 257.25pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: black black black -moz-use-text-color; padding: 0in 5.4pt;">Command||
||<^  width="222px" style="width: 166.65pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Linux||<^  width="343px" style="width: 257.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">export CLASSPATH=$DERBY_HOME/sane/jars/derbyclient.jar||
||<^  width="222px" style="width: 166.65pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Windows||<^  width="343px" style="width: 257.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;">set CLASSPATH=%DERBY_HOME%\jars\sane\derbyclient.jar||
||<^  width="222px" style="width: 166.65pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color black black; padding: 0in 5.4pt;">Mac OSX||<^  width="343px" style="width: 257.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; padding: 0in 5.4pt;"> ||


     b)     __  ____Building Derby from source:__   Refer to [[http://svn.apache.org/viewvc/db/derby/code/trunk/BUILDING.html?view=co|BUILDING.html]] for  detailed instructions.[ http://svn.apache.org/viewvc/db/derby/code/trunk/BUILDING.html?view=co]  c)      __ ____Running Regression Tests__    A quick introduction to get started:  There are two types of test in Derby: Harness Tests and JUnit[http://wiki.apache.org/db-derby/IntroToJUnit]  Tests. We are converting the harness tests to JUnit Tests . [[http://wiki.apache.org/db-derby/KillDerbyTestHarness#Goals|Why]] ? [link = [[/../db-derby/KillDerbyTestHarness#Goals|http://wiki.apache.org/db-derby/KillDerbyTestHarness#Goals]]]  Whenever you make changes to the code, these tests need to be run so as to make sure that the changes didn’t break any other part of Derby.  To run '''suites.All''' (the suite that runs all the JUnit tests in Derby), add junit.jar to your classpath and run:  ''java -XX:MaxPermSize=512m  junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All''(Note: It can take approximately 4-6 hours for regression tests to complete)
    To run derbyAll (the suite for running harness tests in Derby), add jakarta-oro-2.0.8.jar  to your classpath and run:  ''java org.apache.derbyTesting.functionTests.harness.RunSuite derbyall''
For detailed information about tests, refer [[http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/README.htm?view=co|Testing README]]    [link here] http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/README.htm?view=co  Developer Tips:  1)       While running tests, clean your current directory containing any artifacts from previous tests. Refer [[https://issues.apache.org/jira/browse/DERBY-5129|DERBY-5129]]  https://issues.apache.org/jira/browse/DERBY-5129  2)       When you rebuild Derby,  if you face issues related to the build procedure (buildjars), not being able to overwrite some of the existing jars, delete the existing jars from trunk/jars/sane directory in run the buildjars (ant –quiet buildjars) again.See [[https://issues.apache.org/jira/browse/DERBY-5128|DERBY-5128]]