Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: adding a note about NetBeans maven builds and avoiding license checks

...

  • Right click on the project
  • Select "Show and Resolve Problems..." (near bottom of pop-up menu)
  • Click on "Download Libraries" (assuming the problem is that "Some dependency artifacts are not in the local repository").
    NetBeans should then use Maven to find all the DSpace dependencies and download them to your local Maven repository (in your user's ~/.m2/ folder)
Info
titleBy default NetBeans builds using "mvn install" instead of "mvn package"

By default, NetBeans builds all Maven-based projects using mvn install instead of mvn package (which DSpace recommends). The resulting build is identical, except that the "install" command will take longer as it also attempts to verify that all source file headers match our DSpace license. If you'd like to speed up your NetBeans build & avoid these license checks you can do the following:

  1. Right click on the project you are attempting to Build (e.g. "DSpace Assembly and Configuration"), and select "Properties"
  2. Go to the "Actions" category on the left
  3. Select the "Build project" action.
  4. In the "Execute goals" change "install" to "package"
  5. Now select the "Clean and Build Project" action
  6. In the "Execute goals" change "clean install" to "clean package"
  7. Finally, select the "Build with Dependencies" action
  8. In the "Execute goals" change "install" to "package"
    Now, for that project, each time you run any of the 3 build commands (Build, Clean & Build, or Build with Dependencies) NetBeans will use the Maven 'package' command instead of the 'install' command. You'd have to do this customization for any NetBeans project that you want to build using those commands.

As an alternative, you could also create your own custom NetBeans commands (which can be run across any/all projects) by doing the following:

  1. Right click on any project.
  2. Select "Custom -> Goals..."
  3. In the "Goals:" field type "package"
  4. Select "Remember as:" (at bottom) and enter in "Package" (or some name you will remember)
  5. Click OK
    Now, you can right click on any project, and go to "Custom -> Package" to run a Maven "package" of that project. You can use this new custom command instead of the default "Build" command.

Install DSpace normally

After building DSpace, we need to use Apache Ant to install it. Unfortunately, this is an area where NetBeans is not very helpful (as we built DSpace using Maven, it will continue to assume all of our projects are Maven-based projects).

...