ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Gies" <olivier.g...@bull.net>
Subject RE: Re setting a variable to a new value.
Date Tue, 27 May 2008 01:49:17 GMT
Oops, a typo when I sent my answer: <typedef ... /> is missing an 'e' in
your build.xml, i.e. "<typdef" ...

-----Message d'origine-----
De : Chris Green [mailto:chris.green100@googlemail.com] 
Envoyé : lundi 26 mai 2008 22:34
À : Ant Users List; avijayr@gmail.com
Cc : olivier.gies@bull.net
Objet : Re: Re setting a variable to a new value.

As can be seen below, relevant code is at beginning outside of relevant
targets

<project name="Build" default="all" basedir=".">
    <description>
        Skeleton Build.xml
    </description>

	<!--  all properties are in build.properties -->
	<property file="c:/build/build.properties" />
                <dirname property="basedir" file="${ant.file.vtaut}"/>

	<!-- path to the svnant libraries. Usually they will be located in
 ANT_HOME/lib -->
	<path id="project.classpath">
		<pathelement location="${svnjavahl.jar}" />
		<pathelement location="${svnant.jar}" />
		<pathelement location="${svnClientAdapter.jar}" />
	</path>

	<!-- load the svn task -->
  	<taskdef resource="svntask.properties"
classpathref="project.classpath"/>

        <typdef resource="net/sf/antcontrib/antlib.xml" />

	<!-- load ant-contrib-0.3 task -->
  	<taskdef resource="net/sf/antcontrib/antcontrib.properties">
                <classpath>
                       <pathelement
location="c:/ant/lib/ant-contrib-0.3.jar"/>
               </classpath>
        </taskdef>

        <property name="build.dir" value="c:/build"/>
        <property name="oracle.xlclient" value="C:/oracle/xlclient"/>
        <property name="oracle.xlclient.ext"
value="${oracle.xlclient}/ext"/>
        <property name="oracle.xlclient.lib"
value="${oracle.xlclient}/lib"/>

Hope this helps your means of grateful help.

Chris

On 5/26/08, Vijay Aravamudhan <avijayr@gmail.com> wrote:
> A common mistake is to have the taskdef line within another target, but
> failing to call that target before actually using the tasks defined in it.
> Could you please post your complete build file so that we can take a look?
>
> thanks,
> Vijay
>
> Chris Green wrote:
>> I alread had the taskdef in my ant script but added the typdef line
>>
>>                 <typdef
resource="net/sf/antcontrib/antcontrib.properties"
>> />
>>
>> 	<!-- load ant-contrib-0.3 task -->
>>   	<taskdef resource="net/sf/antcontrib/antcontrib.properties">
>>                 <classpath>
>>                        <pathelement
>> location="c:/ant/lib/ant-contrib-0.3.jar"/>
>>                </classpath>
>>                </taskdef>
>>
>> Still get :-
>>
>> Problem: failed to create a task or type var
>> Cause: The name is undefined.
>> Action: Check the spelling.
>> Action: Check that any custion tasks/types have been declared.
>> Action: Check that any <presetdef>/macrodef> declarations have taken
>> place.
>>
>> Before you ask, ant-contrib-0.3.jar does exist in my c:/ant/lib
>> directory. I'm obviously being blind to something here.
>>
>> Chris
>>
>> On 5/26/08, Olivier Gies <olivier.gies@bull.net> wrote:
>>
>>>  > Problem: failed to create a task or type var
>>>  > Cause: The name is undefined.
>>>  > Action: Check the spelling.
>>>  > Action: Check that any custion tasks/types have been declared.
>>>  > Action: Check that any <presetdef>/macrodef> declarations have
taken
>>> place.
>>>  >
>>>  > Please could someone make a suggestion.
>>>
>>>
>>> You haven't imported ant-contrib's tasks in your project.
>>>
>>> After making sure that ant-contrib's JAR is in your Ant's runtime
>>> classpath, add this to your root <project> tag:
>>>
>>> <typdef resource="net/sf/antcontrib/antlib.xml" />
>>>
>>>
>>> Calls to <var> should now work, as well as to any ant-contrib's task.
>>>
>>> BR,
>>>
>>> *Olivier Gies*
>>>
>>> *Delivery Manager
>>> Customs & Tax Software Engineering Center
>>> Bull, Architect of an Open World ^TM
>>> Phone: +86 (10) 65978001 - Ext 555 *
>>>
>>> *www.bull.com <http://www.bull.com/>*
>>>
>>> *This e-mail contains material that is confidential for the sole use of
>>> the intended recipient. Any review, reliance or distribution by others
>>> or forwarding without express permission is strictly prohibited. If you
>>> are not the intended recipient, please contact the sender and delete all
>>> copies.*
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message