Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Enhance build.properties docs, based on pull #123

...

The build.properties Configuration Properties File

The primary way As of configuring DSpace is to edit the dspace.cfg, however, the 3.0, we now provide a [dspace-source]/build.properties file exists to provide as an easy means of configuring configuration a subset of properties before you build DSpace (by running "mvn package" or similar). Typically this would be done to allow different developers to maintain their own build.properties files within [dspace-source]. Each developer would need to edit [dspace-source]/pom.xml to reference their own build.properties file. Any common changes could be applied directly to dspace.cfg.  Any properties set in this build.properties file will be automatically copied over to your final dspace.cfg file as part of the Maven build process.

Users/Developers may also choose to copy the build.properties under a different name for different environments (e.g. development, test & production), and choose which environment to build DSpace for by passing a "-Denv" flag to the Maven build process (e.g. "mvn package -Denv=test" would build DSpace using a custom "test.properties" file).

Here's a basic example of how build.properties (or any *.properties) file may be used to simplify installation & development:

  1. A developer or user downloads a copy of DSpace to install
  2. He/She can edit the [dspace-source]/build.properties to specify the very basic settings for installing DSpace
    1. OR, alternatively he/she can copy/rename the "build.properties" to a different "*.properties" file & edit it.  For example, you could choose  to create a separate properties file for each environment (dev.properties, test.properties, prod.properties)
  3. He/She can then build DSpace using the *.properties file they choose
    1. Running simply "mvn package" will always use the default "build.properties" settings.
    2. Passing in the "-Denv" flag, will cause the build process to use a custom properties file.  Some examples:
      1. "mvn package -Denv=test" would build DSpace using a custom file named [dspace-source]/test.properties
      2. "mvn package -Denv=local" would build DSpace using a custom file named [dspace-source]/local.properties
      3. "mvn package -Denv=john" would build DSpace using a custom file named [dspace-source]/john.properties
  4. No matter which build options are used, the values in the enabled properties file will be automatically copied over to your [dspace-source]/dspace/target/dspace-[version]-build/dspace.cfg file, so that they can be installed using the appropriate Apache Ant command.

 

Note
titlebuild.properties file is only used with building/compiling DSpace

It is worth noting that the [dspace-source]/build.properties file (or custom properties file) is ONLY used in the act of building/installing/upgrading DSpace. During that build/install/upgrade process, any settings in your "build.properties" file (or custom properties file) are automatically copied over to the "dspace.cfg" file. Once DSpace is installed, it only uses the settings in your [dspace]/config/dspace.cfg file.

 

The dspace.cfg Configuration Properties File

...