Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Build DSpace from NetBeans

Note
titleTwo Ways to Build DSpace

As of DSpace 1.8, there are now two options to building DSpace Source Code as detailed in the Advanced Customisation Documentation. They are as follows:

  • Wiki Markup
    *Full Build:* Running {{mvn package}} from the root {{\[dspace-src\]}} directory (Or run "Build" on the "DSpace Parent Project" in NetBeans). This option will rebuild all DSpace modules from their Java Source code, then apply any Maven WAR Overlays. In other words, all subdirectories of {{\[dspace-src\]}} are recompiled/rebuilt.
  • Wiki Markup
    *Quick Build:* Running {{mvn package}} from the {{\[dspace-src\]/dspace/}} directory (Or run "Build" on the "DSpace Assembly and Configuration" project in NetBeans).  This option performs a "quick build". It does not recompile/rebuild all DSpace modules. All it does is rebuild and re-apply any Maven WAR Overlays to the previously compiled source code. In other words, the ONLY code that will be recompiled/rebuilt is code that exists in {{\[dspace-src\]/dspace/modules/*}} (the Maven WAR Overlay directories)

Wiki Markup
As described in the note above, as of DSpace 1.8, there are two options to build DSpace. Traditionally (before 1.8), you could only
Wiki Markup
Remember, you build DSpace from within the _dspace_ sub-folder (e.g. {{\[dspace-src\]/dspace}}).  In NetBeans, this project is named "DSpace Assembly and Configuration", based on the name specified in its Maven configuration file (pom.xml).

If you do not see the "DSpace Assembly and Configuration" proper project opened (NetBeans may not have opened it by default), then open it manually:

  • Right click in your "Projects" window
  • Wiki Markup
    Select "Open Project", and browse to either the {{\[dspace-src\]}} OR {{\[dspace-src\]/dspace/}} directory (based on the build option you wish to use).  You should see the Project Name (on the right) specified as either "DSpace Parent Project" or "DSpace Assembly and Configuration", respectively.
  • Click the "Open Project" button.

Once that project is opened, you can build DSpace by doing the following:

  1. Right-click on the "DSpace Assembly and Configuration" project
  2. Wiki Markup
    Select the "Build" option (alternatively you may select "Clean & Build" to first clean out previous builds).
    You should be able to watch the status in the "Output" window at the bottom of NetBeans.   The end result is that DSpace is built into the {{\[dspace-src\]/dspace/target/dspace-\[version\]-build.dir/}} directory (you can verify this from the "Files" window in NetBeans, if you wish).

After building DSpace for the first time, you may still see red exclamation point icons (warning) (!) next to some projects. In most cases, this is caused by NetBeans being unable to locate some of the DSpace third-party dependencies on your local file system. To fix this problem, do the follow for each project which has a red icon next to it:

...