All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
property.name = property value
Some property defaults are "commented out". That is, they have a "#" preceding them, and the DSpace software ignores the config property. This may cause the feature not to be enabled, or, cause a default property to be used.
...
Certain characters in *.cfg
files are considered special characters, and must be escaped in any values. The most notable of these special characters include:
...
Because DSpace supports the Apache Commons Configuration properties file syntax, it is much easier to specify multiple values for a single setting. All you have to do is repeat the same property name multiple times in the same *.cfg
file.
For example:
Code Block |
---|
# The below settings define *two* AuthenticationMethods that will be enabled, LDAP and Password authentication # Notice how the same property name is simply repeated, and passed different values. plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.LDAPAuthentication plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.PasswordAuthentication # Alternatively, you can also define them as a comma-separated list # (In this scenario, you would NOT escape the comma, as you want them to be considered multiple values) # So, this single line is exactly equavalent to the settings above: plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.LDAPAuthentication, org.dspace.authenticate.PasswordAuthentication |
...
However, as you'll see below, the "local.cfg
" file always overrides settings elsewhere. So, if the above "AuthenticationMethod" plugin was specified in both your authentication.cfg
and your local.cfg
, the value(s) in your local.cfg
would override the defaults in your authentication.cfg
(more on that below).
Additional examples of creating lists or arrays of values are provided in the documentation of the Apache Commons Configuration properties file syntax.
Things you should know about editing dspace.cfg
files.
It is important to remember that there are * multiple dspace.cfg
files in serveral places after an installation of DSpace.* The only two you should notice are:
Because DSpace supports the Apache Commons Configuration properties file syntax, it also can include/embed property files within other property files by using the "include=
" setting.
For example, the dspace.cfg
includes/embeds all of the default config/modules/*.cfg
files via a series of "include=
" settings near the bottom of the dspace.cfg.
As an example, here's a small subset of those include calls:
Code Block |
---|
# defines our modules subdirectory
module_dir = modules
# The following lines include specific "authentication*.cfg" files inside your dspace.cfg
# This essentially "embeds" their configurations into your dspace.cfg by default,
# treating them as a single configuration file.
include = ${module_dir}/authentication.cfg
include = ${module_dir}/authentication-ip.cfg
include = ${module_dir}/authentication-ldap.cfg
include = ${module_dir}/authentication-password.cfg
include = ${module_dir}/authentication-shibboleth.cfg |
This ability to include properties files within others is very powerful, as it allows you to inherit settings from other files, or subdivide large configuration files. Be aware that this essentially causes DSpace to treat all included configurations as if they were part of the parent file. This means that, in the above example, as far as DSpace is concerned, all the settings contained within the authentication*.cfg
files "appear" as though they are specified in the main dspace.cfg
.
This ability to include other files is also possible with the local.cfg
file, should you want to subdivide your localized settings into several locally specific configuration files.
Things you should know about editing dspace.cfg
files.
It is important to remember that there are * multiple dspace.cfg
files in serveral places after an installation of DSpace.* The only two you should notice are:
[dspace-source]/dspace/config/dspace.cfg
[dspace]/config/dspace.cfg
[dspace-source]/dspace/config/dspace.cfg
[dspace]/config/dspace.cfg
dspace.cfg
in addition to the runtime file. The two files should always be identical, since the source dspace.cfg
will be the basis of your next upgrade....
[dspace]/config/
intact. Just copies new configs from[dspace-source]/dspace/config/
over to *.new files....
local.
...
cfg
Configuration Properties FileNote |
---|
|
As of DSpace 3.0, we now provide a [dspace-source]/build.properties
as an easy means of configuration a subset of properties before you build DSpace (by running "mvn package" or similar). 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.
...