[ 
https://issues.apache.org/jira/browse/DERBY-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835317#action_12835317
 ] 

Myrna van Lunteren commented on DERBY-4548:
-------------------------------------------

My empirical information (that is, I did various experiments) shows that that's 
how the properties work.
(for instance, not specifying sane at all in user.home/ant.properties, but 
switching it to true vs. false in the local ant.properties showed it getting 
set from the local ant.properties; after setting it in user.home/ant.properties 
the setting in local ant.properties would get ignored).

I thought about swapping the order of the property files, i.e. make the local 
one first, (that's what I put in the initial suggestion) but I thought it might 
be more likely to cause trouble *if* someone has - say for safe-keeping - put 
an ant.properties file in their local tree. 

Both ways have disadvantages/advantages.
For instance, to ensure that old branches build correctly, regardless of what's 
in user.home/ant.properties, you'd want the local ant.properties file to take 
precedence (i.e. be first in build.xml).

However, I can see setting some general properties in user.home/ant.properties 
and managing the sane/insane stuff in a local ant.properties file...

In the end I decided less possible impact for unsuspecting developers if we 
kept the user.home/ant.properties as the 'primary' one. 
By *not* having any user.home/ant.properties file I can get my multiple 
ant.properties files to work...

Thoughts/opinions?

> would like an alternative location for ant.properties
> -----------------------------------------------------
>
>                 Key: DERBY-4548
>                 URL: https://issues.apache.org/jira/browse/DERBY-4548
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.0.2.2, 10.1.3.3, 10.2.2.1, 10.3.3.1, 10.4.2.1, 
> 10.5.3.1, 10.6.0.0
>            Reporter: Myrna van Lunteren
>         Attachments: DERBY-4548.diff
>
>
> The current build.xml directs ant to look for a file ant.properties in 
> user.home. 
> This can get confusing when you have multiple versions on the same machine.
> I've worked around this in the past by pointing ant at other directories with 
> -Duser.home=..., but it would be easier to have another place set up - I 
> don't really like changing user.home.
> We could add another line to build.xml, e.g., for trunk's current build.xml:
> @@ -20,6 +20,7 @@
>  <!-- Set Properties -->
>    <!-- User settings -->
> +  <property file="ant.properties"/>
>    <property file="${user.home}/ant.properties"/>
>    <!-- Set property lib dir -->
>    <property name="properties.dir" value="tools/ant/properties"/>
> This would make ant look first for ant.properties in the same directory as 
> the top level build.xml, and secondly for the one in user.home.
> If the community agrees this would be ok, I'd like to make this change and 
> backport it all the way to 10.0.
> By having an additional place we'd not cause incompatibilities to other build 
> processes (except if someone has put an ant.properties file in the top of the 
> checked out tree).
> If we do this, I think it's up to the developers to ensure that there's not 2 
> ant.properties files that are conflicting. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to