mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
Ignore local.cfg by default. Provide an EXAMPLE. Make sure Maven assembly handles local.cfg. Make sure Ant build reads local.cfg
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -24,8 +24,14 @@ nb-configuration.xml
|
|||||||
META-INF/
|
META-INF/
|
||||||
|
|
||||||
## Ignore all *.properties file in root folder, EXCEPT build.properties (the default)
|
## Ignore all *.properties file in root folder, EXCEPT build.properties (the default)
|
||||||
|
## KEPT FOR BACKWARDS COMPATIBILITY WITH 5.x (build.properties is now replaced with local.cfg)
|
||||||
/*.properties
|
/*.properties
|
||||||
!/build.properties
|
!/build.properties
|
||||||
|
|
||||||
|
# Ignore a local.cfg file in root folder, if it exists
|
||||||
|
/local.cfg
|
||||||
|
# Also ignore it under dspace/config
|
||||||
|
/dspace/config/local.cfg
|
||||||
|
|
||||||
##Mac noise
|
##Mac noise
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@@ -42,6 +42,14 @@
|
|||||||
<exclude>LICENSE_HEADER</exclude>
|
<exclude>LICENSE_HEADER</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
<!-- If local.cfg is in the root folder, copy it to config folder -->
|
||||||
|
<fileSet>
|
||||||
|
<directory>..</directory>
|
||||||
|
<outputDirectory>config</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>local.cfg</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
<!-- Copy necessary subdirectories to resulting directory -->
|
<!-- Copy necessary subdirectories to resulting directory -->
|
||||||
<!-- First, copy over our configurations -->
|
<!-- First, copy over our configurations -->
|
||||||
<fileSet>
|
<fileSet>
|
||||||
|
@@ -47,7 +47,6 @@ Common usage:
|
|||||||
<!-- ============================================================= -->
|
<!-- ============================================================= -->
|
||||||
<!-- Will be using various environment variables -->
|
<!-- Will be using various environment variables -->
|
||||||
<!-- ============================================================= -->
|
<!-- ============================================================= -->
|
||||||
|
|
||||||
<property environment="env" />
|
<property environment="env" />
|
||||||
|
|
||||||
|
|
||||||
@@ -62,30 +61,21 @@ Common usage:
|
|||||||
</not>
|
</not>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
|
<!-- Default configurations to use. This may be overridden. -->
|
||||||
<!-- Default configuration to use. This may be overridden. -->
|
<!-- First, the default localized config file -->
|
||||||
<property name="config" value="config/dspace.cfg" />
|
<property name="config" value="config/local.cfg" />
|
||||||
|
<!-- Next, the default dspace.cfg -->
|
||||||
|
<property name="dspace-config" value="config/dspace.cfg" />
|
||||||
|
|
||||||
<!-- Give user a chance to override without editing this file
|
<!-- Give user a chance to override without editing this file
|
||||||
(and without typing -D each time s/he compiles it) -->
|
(and without typing -D each time s/he compiles it) -->
|
||||||
<property file="${user.home}/.dspace.properties" />
|
<property file="${user.home}/.dspace.properties" />
|
||||||
|
|
||||||
<!-- First, set the dspace.dir property so it can be
|
<!-- Load the configurations -->
|
||||||
interpolated when loading the config file.
|
<!-- In Ant, properties are immutable, so the first one "wins". In this case,
|
||||||
This crudely mimics the way ConfigurationManager interpolates properties.
|
we load the local.cfg FIRST, so that its settings are used by default. -->
|
||||||
Note that it ONLY works for directories that interpolate ${dspace.dir}
|
|
||||||
but that _should_ cover all cases used in this build configuration.
|
|
||||||
-->
|
|
||||||
<loadproperties srcFile="${config}">
|
|
||||||
<filterchain>
|
|
||||||
<linecontainsregexp>
|
|
||||||
<regexp pattern="^\s*dspace\.dir\s+" />
|
|
||||||
</linecontainsregexp>
|
|
||||||
</filterchain>
|
|
||||||
</loadproperties>
|
|
||||||
|
|
||||||
<!-- Load the configuration -->
|
|
||||||
<property file="${config}" />
|
<property file="${config}" />
|
||||||
|
<property file="${dspace-config}" />
|
||||||
|
|
||||||
<!-- Timestamp date used when creating backup directories -->
|
<!-- Timestamp date used when creating backup directories -->
|
||||||
<tstamp>
|
<tstamp>
|
||||||
@@ -338,7 +328,7 @@ Common usage:
|
|||||||
<!--
|
<!--
|
||||||
Copy designated dspace.cfg
|
Copy designated dspace.cfg
|
||||||
-->
|
-->
|
||||||
<copy file="${config}" tofile="config-temp/dspace.cfg" preservelastmodified="true" />
|
<copy file="${dspace-config}" tofile="config-temp/dspace.cfg" preservelastmodified="true" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
If designated config isn't the one in config/dspace.cfg then lets put a copy of that next to it
|
If designated config isn't the one in config/dspace.cfg then lets put a copy of that next to it
|
||||||
@@ -351,7 +341,7 @@ Common usage:
|
|||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Prepare properly filtered files
|
Copy over all other config files (not including dspace.cfg)
|
||||||
-->
|
-->
|
||||||
<copy todir="config-temp" preservelastmodified="true" overwrite="true" failonerror="false">
|
<copy todir="config-temp" preservelastmodified="true" overwrite="true" failonerror="false">
|
||||||
<fileset dir="config" excludes="dspace.cfg" />
|
<fileset dir="config" excludes="dspace.cfg" />
|
||||||
@@ -771,7 +761,7 @@ Common usage:
|
|||||||
<fileset dir="config" excludes="dspace.cfg" />
|
<fileset dir="config" excludes="dspace.cfg" />
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<copy file="${config}" tofile="${dspace.dir}/config/dspace.cfg" preservelastmodified="true" />
|
<copy file="${dspace-config}" tofile="${dspace.dir}/config/dspace.cfg" preservelastmodified="true" />
|
||||||
|
|
||||||
<echo file='${dspace.dir}/config/ant.properties' message='ant.version = ${ant.version}'/>
|
<echo file='${dspace.dir}/config/ant.properties' message='ant.version = ${ant.version}'/>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user