Page History
...
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:
- A developer or user downloads a copy of DSpace to install
- He/She can edit the
[dspace-source]/build.properties
to specify the very basic settings for installing DSpace- 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)
- He/She can then build DSpace using the *.properties file they choose
- Running simply "mvn package" will always use the default "build.properties" settings.
- Passing in the "-Denv" flag, will cause the build process to use a custom properties file. Some examples:
- "mvn package -Denv=test" would build DSpace using a custom file named
[dspace-source]/test.properties
- "mvn package -Denv=local" would build DSpace using a custom file named
[dspace-source]/local.properties
- "mvn package -Denv=john" would build DSpace using a custom file named
[dspace-source]/john.properties
- "mvn package -Denv=test" would build DSpace using a custom file named
- No matter which build options are used, the values in the enabled properties file will be automatically copied over to your
file, so that they can be installed using the appropriate Apache Ant command.[dspace-source]/dspace/target/dspace-[version]-build/
dspace.cfg
Note | ||
---|---|---|
| ||
It is worth noting that the |
The dspace.cfg
Configuration Properties File
...