hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: svn commit: r377463 - /lucene/hadoop/trunk/build.xml
Date Tue, 14 Feb 2006 14:26:52 GMT
Just a tidbit of Ant trivia, <property> with value="..." is an exact  
string assignment.   However, there is a variant that works better  
for directory references:

	<property name="prop" location="src/java"/>

Using _location_, the string value of the property "prop" becomes the  
absolute path to src/java, resolved relative to the base directory of  
the Ant project.  The top-level <project> element can specify a  
basedir=".." attribute if it needs to be different than the the  
location of build.xml itself.  The basedir value can be relative.   
I've often seen basedir=".." to specify that all relative paths be  
resolved from the parent directory.

	Erik


On Feb 13, 2006, at 12:03 PM, cutting@apache.org wrote:

> Author: cutting
> Date: Mon Feb 13 11:03:24 2006
> New Revision: 377463
>
> URL: http://svn.apache.org/viewcvs?rev=377463&view=rev
> Log:
> Fix for HADOOP-34: make build paths relative to location of  
> build.xml, not PWD.  Contributed by Jeremy Bensley.
>
> Modified:
>     lucene/hadoop/trunk/build.xml
>
> Modified: lucene/hadoop/trunk/build.xml
> URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/build.xml? 
> rev=377463&r1=377462&r2=377463&view=diff
> ====================================================================== 
> ========
> --- lucene/hadoop/trunk/build.xml (original)
> +++ lucene/hadoop/trunk/build.xml Mon Feb 13 11:03:24 2006
> @@ -13,15 +13,14 @@
>    <property name="final.name" value="${name}-${version}"/>
>    <property name="year" value="2006"/>
>
> -  <property name="basedir" value="./"/>
> -  <property name="src.dir" value="src/java"/>
> -  <property name="examples.dir" value="src/examples"/>
> -  <property name="lib.dir" value="lib"/>
> -  <property name="conf.dir" value="conf"/>
> -  <property name="docs.dir" value="docs"/>
> +  <property name="src.dir" value="${basedir}/src/java"/>
> +  <property name="examples.dir" value="${basedir}/src/examples"/>
> +  <property name="lib.dir" value="${basedir}/lib"/>
> +  <property name="conf.dir" value="${basedir}/conf"/>
> +  <property name="docs.dir" value="${basedir}/docs"/>
>    <property name="docs.src" value="${basedir}/src/web"/>
>
> -  <property name="build.dir" value="build"/>
> +  <property name="build.dir" value="${basedir}/build"/>
>    <property name="build.classes" value="${build.dir}/classes"/>
>    <property name="build.src" value="${build.dir}/src"/>
>    <property name="build.webapps" value="${build.dir}/webapps"/>
> @@ -30,14 +29,14 @@
>    <property name="build.javadoc" value="${build.docs}/api"/>
>    <property name="build.encoding" value="ISO-8859-1"/>
>
> -  <property name="test.src.dir" value="src/test"/>
> +  <property name="test.src.dir" value="${basedir}/src/test"/>
>    <property name="test.build.dir" value="${build.dir}/test"/>
>    <property name="test.build.data" value="${test.build.dir}/data"/>
>    <property name="test.build.classes" value="${test.build.dir}/ 
> classes"/>
>    <property name="test.build.javadoc" value="${test.build.dir}/ 
> docs/api"/>
>
> -  <property name="web.src.dir" value="src/web"/>
> -  <property name="src.webapps" value="src/webapps"/>
> +  <property name="web.src.dir" value="${basedir}/src/web"/>
> +  <property name="src.webapps" value="${basedir}/src/webapps"/>
>
>    <property name="javadoc.link.java"
>  	    value="http://java.sun.com/j2se/1.4.2/docs/api/"/>
>


Mime
View raw message