Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated instructions for running webapps to list new -Ddspace.dir property
Note
titleInstructions for DSpace 1.5 and above
  • These instructions assume you are using DSpace 1.5.x (or higher) in the NetBeans IDE.
  • DSpace 1.4.x and previous are not covered.

Table of Contents:

Table of Contents
outlinetrue
stylenone

Installing NetBeans

NetBeans 7.1 (or latest version) is recommended for both performance and features (plus, >7.1 includes Git support out-of-the-box). Download it from http://www.netbeans.org/.

...

  1. Fork your own Repo to store your local changes: As recommended above, you really should think about forking your own copy of the DSpace GitHub repository. As GitHub describes in their "Fork a Repo" guide, forking lets you create your own personal copy of the codebase. It not only provides you a place to put your local customizations. It also provides an easier way to contribute your work back to the DSpace community (via a GitHub Pull Request).
  2. For easier Fetch/Merge, setup an "upstream" repository location: This is only really relevant if you have your own personal "fork" (see #1). If you have forked the DSpace GitHub repository, then you may want to setup an "upstream" remote that points at the central DSpace GitHub repository. This is described in more detail in the GitHub "Fork a Repo"guide. Perform the following:
    • On the command-line, change directory to your local machines' cloned DSpace git repository, which is also your DSpace source directory (e.g. cd [dspace-src])
    • Run the following 'git' command from that directory:

      Code Block
      git remote add upstream git://github.com/DSpace/DSpace.git

      (Technically you can name it something other than "upstream". But, "upstream" is just the GitHub recommended naming convention).

    • For more information about how this comes in handy, see the section below on "#Fetch & Merge Example via NetBeans".

...

  1. The easiest way to install DSpace may be to just follow the normal installation procedure in the DSpace System Documentation. NetBeans doesn't seem to have an efficient way to perform this installation, so it's easiest to just do it from the command line, as normal.
  2. Alternatively, you can use NetBeans to run the ant fresh_installcommand as follows: (You need to create a database and a database owner first.)
    • Go to your start browser, open pgAdmin (Assuming you install PostGreSQL)
    • Connect to PostGreSQL 9.0
    • Right click login roles, select new login role
    • Type dspace for the following fields: Role name/ password/ password again
    • Click Ok
    • Right click database, select new database
    • Type dspace in the following field: Name. Select dspace from dspace owner field
    • Click Ok
    • Return to project folder in Netbeans
    • Click over to the "Files" tab in the left hand window
    • Browse under the "DSpace Assembly and Configuration" project. You are looking for the target/dspace-[version]-build.dir/build.xml Ant configuration file.
    • Right click on the build.xmlfile and select "Run Target" => "fresh_install"
      • The above command will perform a fresh install of DSpace based on the settings specified in your target/dspace-[version]-build.dir/config/dspace.cfg file.
      • The default installation url is C:\dspace.
    • After installation, open cmd
    • Navigate to your to your installation folder\bin. Default is C:\dspace. Example command: cd C:\dspace\bin
    • Type the following command: dspace.bat create-administrator
    • Key in the information specified by the command prompt instructions

...

  • Select the project for the Web Application you wish to run through Tomcat (e.g. "DSpace XML-UI (Manakin) :: Web Application Resources" for the XMLUI). This project must be a "war" based project, as Tomcat only runs WAR files.
  • Right click on your selected project and click "Properties"
  • From the Properties window, select the "Run" category.
    • From these Run settings, you'll want to specify the Server which this application should run on. Select your newly configured Tomcat server.
    • Also, specify a "Context Path". This should be the ending path on the URL. For example, specifying "/xmlui" will mean your web application will be available from "http://localhost:8080/xmlui"
  • Now, click over to the "Actions" category on the left.
    • You'll see a list of Actions on the right. Click on the "Run Project" action (as this is the one used to run your web application).
    • In that Action's "Set Properties" section, add a property to point it to your DSpace installation's configuration file (dspace. cfg). The following is an example on Windows, assuming that you've installed DSpace to "C:/dspace/":
      • For DSpace 3.0 or above, set the property:  dspace.dir=C:/dspace/ (make sure to include this entire line – also, do NOT include quotes around the file path)
      • For DSpace 1.8.x or lower, set the property: dspace.config=C:/dspace/config/dspace.cfg (make sure to include this entire line – also, do NOT include quotes around the file path)
  • Finally, click "OK" at the bottom to save all your new project settings.

...

  • Select the project for the Web Application you wish to run through Tomcat (e.g. "DSpace XML-UI (Manakin) :: Web Application Resources" for the XMLUI). This project must be a "war" based project.
  • Right click on your selected project and click "Properties"
  • From the Properties window, select the "Actions" category on the left.
    • You'll see a list of Actions on the right. Click on the "Debug Project" action (as this is the one used to debug your web application).
    • In that Action's "Set Properties" section, add a property to point it to your DSpace installation's configuration file (dspace. cfg). Make sure to keep all existing properties in tact, and just add your new property. The following is an example on Windows, assuming that you've installed DSpace to "C:/dspace/":
      • For DSpace 3.0 or above, set the property:  dspace.dir=C:/dspace/ (make sure to include this entire line – also, do NOT include quotes around the file path)
      • For DSpace 1.8.x or lower, set the property: dspace.config=C:/dspace/config/dspace.cfg (make sure to include this entire line – also, do NOT include quotes around the file path)
  • Finally, click "OK" at the bottom to save all your new project settings.

...