Chris, On Fri, Mar 15, 2019 at 4:56 PM Christopher Schultz < ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Igal, > > On 3/15/19 16:45, Igal Sapir wrote: > > <snip/> > > I looked deeper into build.xml and I found some interesting > > information and a simple solution for my issue. In build.xml we > > have the following: > > > > <property file="${user.home}/build.properties"/> <property > > file="build.properties"/> <property > > file="build.properties.default"/> > > > > So I can place my settings for test.threads in ~/build.properties. > > > > The current order of precedence, however, gives > > ${user.home}/build.properties a higher priority than the one at > > {tomcat}/build.properties. > > > > That is wrong IMHO and should be the other way around, i.e. > > {tomcat}/build.properties should > > override${user.home}/build.properties . I would like to change > > that order if everyone agrees. > > I do not agree. The local configuration (~/build.properties) should > override the default configuration (build.properties). That's why it's > called "local configuration". > > Besides, if you implement your proposed switch, then you will be > UNABLE to use ~/build.properties to customize this configuration that > you don't like. > Perhaps I'm missing something, but I think that the term "Local" is ambiguous here, so I will avoid using it to prevent confusion. We have (applied in order): 1) Project Default Config.: {tomcat}/build.properties.default 2) Instance Config........: {tomcat}/build.properties 3) System Config..........: {user.home}/build.properties Tomcat only ships with the Project Default Config file. The other two are optional and can be created by the user. Suppose that I usually want to run tests with 8 threads. I can set `test.threads=8` in the System Config file and each time I download a new version of Tomcat I simply run `ant test` in the directory of that instance. It will run with 8 threads, resolving my original issue here. But, if now I download a version and want to run only that one with 4 threads (a more likely scenario would be to set different versions or paths for OpenSSL), I can not simply set the new value for the Instance Configuration, {tomcat}/build.properties, to affect only that instance -- I have to modify the System Config, which will change the settings for all other instances. The way I see it, the System Config is Default for the system, and each instance should be able to specify its own Instance Configuration which will override both the Project's Defaults and the System Defaults. My proposal is therefore that the order of applying the settings will be: 1) Project Default Config.: {tomcat}/build.properties.default 2) System Config..........: {user.home}/build.properties 3) Instance Config........: {tomcat}/build.properties That way I do not need to add an Instance Config anywhere unless a specific instance requires unique settings. I can set my System Config (~/build.properties) with the values that I normally use, and only override them with an Instance Config, i.e. {tomcat}/build.properties where needed. What am I missing? Thanks, Igal