db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "BuildingDerby" by JohnHEmbretsen
Date Mon, 24 Sep 2007 14:29:21 GMT
Dear Wiki user,

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

The following page has been changed by JohnHEmbretsen:
http://wiki.apache.org/db-derby/BuildingDerby

The comment on the change is:
Added NetBeans 6.0 instructions

------------------------------------------------------------------------------
  [[Anchor(UsingNetBeansToBuildDerby)]]
  = Using NetBeans to Build Derby =
  
- This section describes how to checkout and build Derby using [http://www.netbeans.org/ NetBeans
5.5]. (Similar steps should work on other !NetBeans versions as well, though there will most
likely be some differences).
+ This section describes how to checkout and build Derby using [http://www.netbeans.org/ NetBeans]
versions 5.5 and 6.0. Similar steps should work on other !NetBeans versions as well, though
there will most likely be some differences.
  
  Steps 1, 2 and 3 below describe checking out the Derby source code with Subversion from
within !NetBeans. If you would rather like to build source code obtained by other means (for
example distributed as an official release), or you have already checked out the source, proceed
to Step 4.
    
-   1. Install Subversion
+   1. '''Install Subversion'''
  
-     Set up Subversion on your machine if you have not already done so. This is described
in the !NetBeans 5.5 IDE help under "''IDE basics''"->"''Working with Subversion''". 
+     Set up Subversion on your machine if you have not already done so. This is described
in the !NetBeans 5.5 IDE help under "''IDE basics''"->"''Working with Subversion''", and
in the !NetBeans 6.0 IDE help under "''IDE basics''"->"''Version Control and File History''"->"''Working
with Subversion''". 
  
-   1. Install !NetBeans' Subversion module (!NetBeans 5.5 only)
+   1. (!NetBeans 5.5 only) '''Install !NetBeans' Subversion module'''
  
-     Visit the Update Center ("''Tools''"->"''Update Center''") and download the Subversion
module listed in the Version Control category. If you are using !NetBeans 6 (dev), you already
have this module. If you are using !NetBeans 5.0 or earlier, you cannot use the IDE to checkout
Derby.
+     Visit the Update Center ("''Tools''"->"''Update Center''") and download the Subversion
module listed in the Version Control category. If you are using !NetBeans 6, you already have
this module. If you are using !NetBeans 5.0 or earlier, you cannot use the IDE to checkout
Derby.
  
-   1. Check out the Derby source code
+   1. '''Check out the Derby source code'''
  
      '''Note:''' If you have already checked out the Derby repository outside of the IDE,
!NetBeans will automatically recognize the files as being under version control; proceed to
step 4. 
  
-     I. Use the "''Subversion''"->"''Checkout...''" menu item. Enter the URL for the repository
(folder) you want to check out in the "''Repository URL''" field. Normally this would be the
URL for the latest development trunk, https://svn.apache.org/repos/asf/db/derby/code/trunk/.
If you want to build a specific branch instead, you may browse to the desired folder after
clicking the "''Next''" button, or you may specify the branch URL directly (see [http://db.apache.org/derby/dev/derby_source.html#Derby+source+code
the Derby web site] for further info). Leave the user and password fields blank (unless you
are a committer and want to commit patches using !NetBeans' Subversion interface). Enter your
proxy information if you are using a proxy to connect to the Internet. Click "''Next''".
+     I. With NB 5.5, use the "''Subversion''"->"''Checkout...''" menu item. In NB 6.0
you will find this as "''Versioning''"->"''Subversion''"->"''Checkout...''". Enter the
URL for the repository (folder) you want to check out in the "''Repository URL''" field. Normally
this would be the URL for the latest development trunk, https://svn.apache.org/repos/asf/db/derby/code/trunk/.
If you want to build a specific branch instead, you may browse to the desired folder after
clicking the "''Next''" button, or you may specify the branch URL directly (see [http://db.apache.org/derby/dev/derby_source.html#Derby+source+code
the Derby web site] for further info). Leave the user and password fields blank (unless you
are a committer and want to commit patches using !NetBeans' Subversion interface). Enter your
proxy information if you are using a proxy to connect to the Internet. Click "''Next''".
  
-     I. Verify that the correct folder shows up in the "''Repository Folder(s)''" field.
For trunk, this would be db/derby/code/trunk. Specify the local folder in which you want to
place your working copy of the repository, for example /home/user/dev/derby/svn. Leave other
fields/checkboxes blank. Click "''Finish''".
+     I. Verify that the correct folder shows up in the "''Repository Folder(s)''" field.
For trunk, this would be db/derby/code/trunk. Specify the local folder in which you want to
place your working copy of the repository, for example /home/user/dev/derby/svn. Leave other
fields/checkboxes as-is. In NB 6.0, if you leave the checkbox for "''Scan for Netbeans Projects
after Checkout''" checked, you will be asked later if you want to use one of the Derby !NetBeans
projects checked into the subversion repository (if available). Click "''Finish''".
  
-     I. Observe the progress in the "''Output''" section of the !NetBeans window. This may
take a few minutes. You will be prompted to create a new Project once the checkout has finished.
+     I. Observe the progress in the "''Output''" section of the !NetBeans window. This may
take a few minutes. Once the checkout has finished, you will either be prompted to create
a new Project, or to open a Project that was checked out from the Subversion repository (available
from the head of the trunk).
  
-   1. Add Derby as a !NetBeans Project
+   1. '''Add Derby as a !NetBeans Project'''
  
      (Parts of the following description may be specific for trunk, but the process should
not be too different for branches, releases or snapshots).
  
-     I. If you did not check out Derby via !NetBeans, or for some other reason have not been
prompted to create a Project based on the checked out sources, select "''File''"->"''New
Project...''" on the menu.
+     I. Create (or open) a new Derby Project
  
-     I. Select Category "''General''" and Project "''Java Project with Existing Ant Script''".
Click "''Next''".
+         a. If you checked out a recent version of the trunk using Subversion and want to
get started developing Derby as quickly as possible, you can simply open a !NetBeans Project
that comes with the source code (not available in branches at the time of this writing).
+             1. If you used NB 6.0 to check out Derby, and the check box for "''Scan for
Netbeans Projects after Checkout''" was checked, !NetBeans will tell you that it has checked
out a number of projects (if available in that part of the Derby SVN repository), and will
ask you if you want to open one of them.
+             1. Otherwise, select "''File''"->"''Open Project...''"
+             1. Browse to your checked out working copy of the Derby repository and select
the !NetBeans Project folder matching your !NetBeans version, under ''trunk''->''tools''->''ide''->''netbeans''.
For example, if you are using !NetBeans 6.0, this folder is called ''6.0''.
+             1. Complete the ''Open Project'' dialogue/wizard. You will now have a new Project
called "'''derby'''" in your Projects window.
+             1. Wait until the IDE completed its work (e.g. compiling sources), then customize
your project settings by right-clicking on the project name and selecting "''Properties''"
(see below for details).
  
-     I. For "''Location''", browse to the trunk folder of your working copy of the repository
(or, if you are not using SVN, the top level directory of your source distribution, containing
the top level build.xml file). !NetBeans will automatically fill in the field for "''Build
Script''" (e.g. .../trunk/build.xml) when you specify the correct location. Specify a Project
Name (for example "!DerbyTrunk") and a !NetBeans Project folder (to avoid mixing repository/source
files with !NetBeans project files, you may want to use a folder in a different location than
the Derby source, but this is not a requirement). Leave "''Set as Main project''" checked
if you want to (this is easy to change later on). Click "''Next''".
+         a. If you are using Derby source that does not include !NetBeans Project folders,
or if you for some other reason would like to create a completely new Project, select "''File''"->"''New
Project...''" on the menu.
  
+             I. Select Category "''General''" and Project "''Java Project with Existing Ant
Script''". Click "''Next''".
-     I. For the Build and Run actions, select the following ant targets:
-       * Build Project: {{{all}}}
-       * Clean Project: {{{clobber}}}
-       * Generate Javadoc: {{{javadoc}}}
-       * Run Project: <blank>
-       * Test Project: {{{junitreport}}}
  
-     You may specify additional targets later, as needed. Click "''Next''".
+             I. For "''Location''", browse to the trunk folder of your working copy of the
repository (or, if you are not using SVN, the top level directory of your source distribution,
containing the top level build.xml file). !NetBeans will automatically fill in the field for
"''Build Script''" (e.g. .../trunk/build.xml) when you specify the correct location. Specify
a Project Name (for example "!DerbyTrunk") and a !NetBeans Project folder (to avoid mixing
repository/source files with !NetBeans project files, you may want to use a folder in a different
location than the Derby source, but this is not a requirement). Leave "''Set as Main project''"
checked if you want to (this is easy to change later on). Click "''Next''".
  
-     I.#5 Click the "''Add Folder...''" button next to the "''Source Package Folders''" area.
Select and add all the folders within the "java" folder (or just the "java" folder itself;
the only difference is how it looks in your Project view). 
+             I. For the Build and Run actions, select the following ant targets:
+               * Build Project: {{{all}}}
+               * Clean Project: {{{clobber}}}
+               * Generate Javadoc: {{{javadoc}}}
+               * Run Project: <blank>
+               * Test Project: {{{junitreport}}}
  
-     I. Select source level "''JDK1.4''" if you are working with the trunk or a Derby version
number that is 10.3 or higher. Select "''JDK 1.3''" if you are working with a branch for (or
release/snapshot of) Derby 10.2 or older. Click "''Next''".
+             You may specify additional targets later, as needed. Click "''Next''".
  
-     I. Uncheck the "''Separate Classpath for Each Source Package Folder''" checkbox. 
+             I.#4 Click the "''Add Folder...''" button next to the "''Source Package Folders''"
area. Select and add all the folders within the "java" folder (or just the "java" folder itself;
the only difference is how it looks in your Project view). 
  
-     I. Read [http://svn.apache.org/repos/asf/db/derby/code/trunk/BUILDING.txt BUILDING.txt]
in the top level source folder in order to identify which external jars you need in order
to build Derby, and the contents and location of your ant.properties file, as well as other
requirements (Java versions, etc.). Place the required jars in the location(s) indicated in
BUILDING.txt. For Derby versions 10.2 or newer this includes for example junit.jar.
+             I. Select source level "''JDK1.4''" if you are working with the trunk or a Derby
version number that is 10.3 or higher. Select "''JDK 1.3''" if you are working with a branch
for (or release/snapshot of) Derby 10.2 or older. Click "''Next''".
  
+             I. Uncheck the "''Separate Classpath for Each Source Package Folder''" checkbox.

-     I. (Optional) The following is useful in order to enjoy the full set of !NetBeans features,
such as code completion and refactoring, but is not necessary in order to build Derby: Use
the "''Add JAR/Folder...''" button to select and add the external jars you need (usually located
in .../tools/java/) to your "Java Sources Classpath". See also http://db.apache.org/derby/dev/derby_source.html
for details. 
-     
-     I. Click "''Finish''".
  
+             I. Read [http://svn.apache.org/repos/asf/db/derby/code/trunk/BUILDING.txt BUILDING.txt]
in the top level source folder in order to identify which external jars you need in order
to build Derby, and the contents and location of your ant.properties file, as well as other
requirements (Java versions, etc.). Place the required jars in the location(s) indicated in
BUILDING.txt. For Derby versions 10.2 or newer this includes for example junit.jar.
+ 
+             I. (Optional) The following is useful in order to enjoy the full set of !NetBeans
features, such as code completion and refactoring, but is not necessary in order to build
Derby: Use the "''Add JAR/Folder...''" button to select and add the external jars you need
(usually located in .../tools/java/) to your "''Java Sources Classpath''". See also http://db.apache.org/derby/dev/derby_source.html
for details. 
+          
+             I. Click "''Finish''".
+ 
-   1. Specify the ant.library.dir property
+   1. '''Specify the ant.library.dir property'''
-     Select "''Tools''"->"''Options''" from the menu. Enter the "''Miscellaneous''" section
and expand the "'''Ant'''" line. Click "''Manage Properties...''" and add the line
+     Select "''Tools''"->"''Options''" from the menu. Enter the "''Miscellaneous''" section
and
+       * (!NetBeans 5.5) expand the "'''Ant'''" line. Click "''Manage Properties...''".
+       * (!NetBeans 6.0) make sure the "'''Ant'''" tab is selected. Click in the "'''Properties'''"
text field.
+     Then and add the line
      {{{
      ant.library.dir=<path>
      }}}
-     where {{{<path>}}} is the full path to the lib folder of your ant installation.
!NetBeans bundles a version of Ant which should be good enough for Derby, so you may specify
the lib/ folder of the bundled ant (for example {{{/opt/netbeans-5.5/ide7/ant/lib}}}).
+     where {{{<path>}}} is the full path to the lib folder of your ant installation.
!NetBeans bundles a version of Ant which should be good enough for Derby, so you may specify
the lib/ folder of the bundled ant (for example {{{/opt/netbeans-5.5/ide7/ant/lib}}} or {{{/opt/netbeans-6.0/java1/ant/lib}}}).
  
      Alternatively, you can specify this property in your ant.properties file instead.
  
-   1.#5 Add a target for building the jar files (optional)
+   1.#5 (Optional) '''Add a target for building the jar files'''
  
      Right click your Derby project in !NetBeans' Projects view and select "''Properties...''".
Under "''Build and Run''", click the "''Add''" button. Click in the field below the "''Ant
target''" heading and select the {{{buildjarsclean}}} target (this target will delete any
old jars before building new ones). Click in the field below "''Label''" and type the IDE
command name you want to use for this target, for example "Build clean jars". Set focus (click)
somewhere else in the window to save your label name. Click "''OK''".
  
+   1. (!NetBeans 6 only) '''Add classpath reference to ant.jar'''
+      * In NB 6.0, you need to add {{{ant.jar}}} to your "''Java Sources Classpath''" (in
you Project properties) in order to get rid of warning symbols in the editor and the File
and Projects windows. If you decided to use (open) a Project folder available from a Derby
Subversion repository checkout, all you have to do is to copy (or add a symlink to) ant.jar
to {{{tools/java/}}} (or {{{tools\java\}}} on Windows). You can find {{{ant.jar}}} in Ant's
library directory, see step 5. See also [http://www.nabble.com/Re%3A-Trying-out-NB6.0-project-in-Derby...-t4475681.html
this mail thread] for details.
+ 
-   1. Build the Derby classes
+   1. '''Build the Derby classes'''
  
      If your Derby Project is set as main project: Press '''F11''', or select the "''Build''"->"''Build
Main Project''" menu item, or right-click your Derby project and select "''Build Project''".
  
@@ -124, +139 @@

  
      If the build fails, right-click the Derby project and select "''Clean Project''" before
you try again (after fixing the issues (errors) reported) - or run "''Clean and Build Project''"
instead on the next try. If you get an error message complaining about not finding ant classes,
revisit Step 5. Warnings can be ignored. The "''BUILD SUCCESSFUL''" message indicates that
all went well.
  
-   1. Build the Derby jars (optional)
+   1. (optional) '''Build the Derby jars'''
  
      Right-click your Derby project and select the label you created in Step 6. Depending
on the settings in your ant.properties file, the Derby jars will end up in the jars/sane/
or the jars/insane/ directory.
  
-   1. Congratulations, you have now built Derby! Now it's time to update the "Output" and
"Java Sources Classpath" properties of your Derby project if needed for code completion, debugging,
etc. and start hacking some Derby code (or create tests, or review code, or...)!
+   1. '''Congratulations, you have now built Derby!''' Now it's time to update the "Output"
and "Java Sources Classpath" properties of your Derby project if needed for code completion,
debugging, etc. and start hacking some Derby code (or create tests, or review code, or...)!
  

Mime
View raw message