Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-791

Add ability to disable the building of particular DSpace modules/interfaces from source code

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.8.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      1
    • Comments:
      5
    • Documentation Status:
      Needed

      Description

      For developers (and anyone who frequently rebuilds DSpace), it would be nice to have the ability to disable the building of DSpace modules which you are not currently using.

      For example, an institution may only be actively using the XMLUI, Discovery and SWORD. But, when they run 'mvn package', it will always rebuild all modules/interfaces (even those which they don't really care about).

      A simple way to allow institutions to disable the building of specific modules is to provide consistent "module profiles" across all our POMs, which can then be disabled from the command-line using Maven's "-P" option along with the "!" option (requires Maven 2.0.10 or above, see http://maven.apache.org/guides/introduction/introduction-to-profiles.html). For example, if you have profiles with IDs of "dspace-lni" and "dspace-oai", you can disable them by calling Maven as follows:

      mvn package -P !dspace-lni,!dspace-oai

      We currently already provide various interface-based profiles in the [dspace-src]/dspace/pom.xml. However, the [dspace-src]/dspace/modules/pom.xml always defaults to building/installing all modules.

      Simply put, with a small tweak to [dspace-src]/dspace/modules/pom.xml to add matching profiles (with the same IDs as in [dspace-src]/dspace/pom.xml), we can make things a lot easier on developers. See the attached patch for more details of the changes. This patch was built against current Trunk (r5997).

      With the patch applied, here's what build options are available:

      • By default, all DSpace modules are still built when running 'mvn package' on the full source code
      • If a developer chooses, he/she can disable the building of specific DSpace modules using the Maven "-P" option. He/She just needs to provide a listing of the modules to disable (see example above). The full list of modules is currently:
      • dspace-xmlui
      • dspace-lni
      • dspace-oai
      • dspace-jspui
      • dspace-sword
      • dspace-solr

      Please note that disabling the building of a webapp module also means it is not built/copied into [dspace-src]/dspace/target/dspace-[version]/webapps/ (which means it also would not be installed via 'ant update').

      Suggestions & comments are welcome. If others agree that this is a useful tweak to our current build process, I will commit it to Trunk for the 1.8.0 release.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tdonohue Tim Donohue
                Reporter:
                tdonohue Tim Donohue
              • Votes:
                3 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: