VIVO-978 Move developer.properties into the config sub-directory.

This commit is contained in:
Jim Blake 2015-02-23 12:16:18 -05:00
parent 31c10db442
commit a7a894606b
3 changed files with 12 additions and 9 deletions

View file

@ -266,13 +266,13 @@
<copy todir="${vitrohome.image.dir}" >
<fileset dir="${appbase.dir}/config" >
<include name="example.runtime.properties" />
<include name="example.developer.properties" />
</fileset>
</copy>
<mkdir dir="${vitrohome.image.dir}/config" />
<copy todir="${vitrohome.image.dir}/config" >
<fileset dir="${appbase.dir}/config" >
<include name="example.applicationSetup.n3" />
<include name="example.developer.properties" />
</fileset>
</copy>
<copy todir="${vitrohome.image.dir}" >

View file

@ -3,8 +3,9 @@
#
# Runtime properties for developer mode.
#
# If the developer.properties file is present in your VIVO home directory, it
# will be loaded as VIVO starts up, taking effect immediately.
# If the developer.properties file is present in the config sub-directory of
# your VIVO home directory, it will be loaded as VIVO starts up, taking effect
# immediately.
#
# Each of these properties can be set or changed while VIVO is running, but it
# can be convenient to set them in advance.

View file

@ -28,10 +28,10 @@ import edu.cornell.mannlib.vitro.webapp.startup.StartupStatus;
*
* Start with an empty settings map.
*
* The Setup class will read "developer.properties" from the Vitro home
* directory, and load its settings. If the file doesn't exist, or doesn't
* contain values for certain properties, those propertiew will keep their
* default values.
* The Setup class will read "developer.properties" from the "config"
* sub-directory of the Vitro home directory, and load its settings. If the file
* doesn't exist, or doesn't contain values for certain properties, those
* properties will keep their default values.
*
* An AJAX request can be used to update the properties. If the request has
* multiple values for a property, the first value will be used. If the request
@ -196,8 +196,10 @@ public class DeveloperSettings {
StartupStatus ss = StartupStatus.getBean(ctx);
DeveloperSettings devSettings = DeveloperSettings.getInstance();
Path homeDir = ApplicationUtils.instance().getHomeDirectory().getPath();
File dsFile = homeDir.resolve("developer.properties").toFile();
Path homeDir = ApplicationUtils.instance().getHomeDirectory()
.getPath();
File dsFile = homeDir.resolve("config/developer.properties")
.toFile();
try (FileReader reader = new FileReader(dsFile)) {
Properties dsProps = new Properties();