DSpace/DSpace — pull request #123 by tdonohue (2012-11-01 21:31:19+00:00)
Title: DS-1208 "Fix" to add in a "-Denv" flag to allow users to specify a different *.properties file

DS-1208 (Addition of "build.properties") initially claimed that it was a providing an option for developers to have their own local environment settings which were *NOT* in source control (or at least not by default).

Although "build.properties" allows for local developer settings, the file itself is stored in source control. So, if you change it locally, Git will keep bugging you to commit your local changes.

This pull request makes a small tweak to our 'dspace-parent' POM & .gitignore which allows developers to create their own custom "*.properties" file which is not under source control (they can also still choose to use "build.properties" if they want).

Essentially an "env" (environment) flag is added that takes any value, and loads up the *.properties file of that name. Here's some examples:

* mvn package (still builds using "build.properties", the default)
* mvn package -Denv=test (builds using a "test.properties" file instead of "build.properties")
* mvn package -Denv=tim (builds using a "tim.properties" file)
* mvn package -Denv=awesome (builds using an "awesome.properties" file)

You get the idea :)

Finally, it should be noted that the .gitignore settings are tweaked such that all *.properties files are ignored EXCEPT for "build.properties" (which is our default build settings).

I'll readily admit this change is in a bit of a gray area between "bug fix" and "small improvement". I'll leave it up to someone else whether we add this small tweak to 3.0 or wait until a future release. (However, I have tested this, and it seems to work perfectly fine.)