[Anthill] Question on keeping build.properties when building

Tim Colson tcolson at cisco.com
Mon Dec 6 10:10:07 CST 2004


> My workaround is to check the build.properties files for all of my
> environments into source control, appending the environment to the end
> of the filename:
> build.properties.integration
> build.properties.development

I make it a point to not have build.properties in CVS... only
"default.properties" which are global and not developer-specific.

build.properties, in my case, contains developer-specific settings, for ex.
"db.password=timo_foo" so I don't want developers overwriting each others
settings in CVS.

So I had the same problem as Magnus - however, I solved it differently. I
realize this is the Anthill OS list, so not sure if this will work without
Anhill "Pro"...

1) make the project buildable, from clean checkout, with only
default.properties 
2) add non-cvs settings using Anthill Pro :-)

In the build track editor, I specify "Property File Property Name" =
"integration_props" and then list the properties in the "Property File"
block.
"db.password=real_pass"

In the build.xml file, I add these lines:

<!-- these props will come from AnthillPro -->
<property file="${integration_props}"/>
<!-- these props will be developer specific overrides -->
<property file="${build.dir}/build.properties"/>
<!-- these will be global defaults stored in CVS for all developers -->
<property file="${build.dir}/default.properties"/>

When AHP builds, the integration props override the defaults. Et voila! 

Cheers,
Timo
P.S. for environment specific (i.e. Integration/QA/Production) settings, I
have a custom Java component hooked in via Spring that pulls in the correct
setting, but that's a bit beyond the scope of this particular question.






More information about the Anthill mailing list