db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject local.properties versus ant.properties
Date Tue, 11 Oct 2016 00:54:06 GMT

As Rick observed, my first attempt to build a release failed when it came
to the md5 and pgp signing process.

I think I'm getting a bit closer to understanding what went wrong.

I've mostly worked with the 'build.xml' in the Derby source root.

But for the release process, the build script is tools/release/build.xml

It's just now dawning on me that these two build scripts use quite different
ways of configuration themselves.

Here's the root build.xml's prologue:

   <property environment="env"/>
   <property file="local.properties"/>

   <property file="${user.home}/ant.properties"/>
   <!-- Set property lib dir -->
   <property name="properties.dir" value="${basedir}/tools/ant/properties"/>
   <!-- Significant dirs -->
   <property file="${properties.dir}/dirs.properties"/>
   <!-- Compiler settings -->
   <property file="${properties.dir}/sane${sanity}.properties"/>

Meanwhile, here's the prologue of tools/release/build.xml:

<!-- Set Properties -->
   <!-- User settings -->
   <property environment="env"/>
   <property file="${user.home}/ant.properties"/>
   <!-- Set property lib dir -->
   <property name="properties.dir" value="tools/ant/properties"/>
   <!-- Significant dirs -->
   <property file="${properties.dir}/dirs.properties"/>
   <property name="jirasoap.generated" value="${basedir}/tools/release/jirasoap/target"/>
   <!-- Compiler settings -->
   <property file="${properties.dir}/sane${sanity}.properties"/>
   <property file="${properties.dir}/defaultcompiler.properties"/>
   <property file="${properties.dir}/${build.compiler}.properties"/>
   <!-- Compile-time classpath properties files -->
   <property file="${properties.dir}/extrapath.properties"/>
   <property file="${properties.dir}/compilepath.properties"/>
   <!-- Release and version info -->
   <property file="${properties.dir}/release.properties"/>
   <property file="${properties.dir}/packaging.tmpl"/>

Note that 'local.properties' is present for the root's build.xml, but NOT
for tools/release/build.xml.

This is fine, but unfortunately I didn't realize this at the time, and
was led astray by these instructions in

	http://svn.apache.org/viewvc/db/derby/code/trunk/BUILDING.html?view=co#Customized Build

	You can customize the Derby build by setting variables in a
	file called ant.properties. The Ant tool looks for this file
	in your home directory. To find out where Ant thinks your
	home directory is, issue the following command and look
	for "user.home" in the output:

		ant -diagnostics

	Alternatively, or additionally, you can place properties in a file
	called 'local.properties' in the top of the source tree. Properties
	placed in this file have precedence over those in user.home/ant.properties.

And, you guessed it: I placed all my pgp and md5 configuration information into
'local.properties', which is why it didn't have any effect on my release build.

I guess the point of this email, other than to elicit a bit of sympathy, is
to wonder whether:

a) we should change tools/release/build.xml to allow for
    'local.properties' overrides
b) or, we should change BUILDING.html to note more explicitly that
    'local.properties' does NOT work for release builds, and so you should
    generally use ~/ant.properties unless you have a strong reason otherwise
c) or, we should remove 'local.properties' from both build.xml and
    BUILDING.html
d) or, we should just leave this alone; it's been carefully made this way.

thanks,

bryan

Mime
View raw message