You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chris Green <ch...@googlemail.com> on 2008/05/26 11:35:49 UTC

Re setting a variable to a new value.

I need to re set a variable to a new value during the execution of an
Ant script.

>From what I understand, this cannot be done by using the property command e.g.

<property name="component" value="initial value"/>
                       .
                       .
                       .
                       .
<property name="component" value="new value"/>

I have tryed using the var command e.g.

<var name="component" value="" value="initial value"/>
                       .
                       .
                       .
                       .
<var name="component" value="" value="initial value"/>

even placing a <var name="src.dir" value="" unset="true"/> between yet
I get the message

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.

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


Re: Re setting a variable to a new value.

Posted by Chris Green <ch...@googlemail.com>.
Still doesn't like it.

Downloaded the 1.0b3.jar but script still cant locate the antlib even if I
extract it from the jar

Appologies, I know it may seem like I'm being a bit stupid here but I am at
a bit of a loss.

Chris

On Tue, May 27, 2008 at 11:00 AM, Olivier Gies <ol...@bull.net>
wrote:

> The version I use is "ant-contrib-1.0b3.jar"
>
> I advise you use the latest version of ant-contrib:
> http://ant-contrib.sourceforge.net
>
> 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.*
>
>
>
>  -------- Original Message  --------
> Subject: Re: Re setting a variable to a new value.
> From: Chris Green <ch...@googlemail.com>
> To: Ant Users List <us...@ant.apache.org>
> Cc: olivier.gies@bull.net, avijayr@gmail.com
> Date: 27/05/2008 16:20
>
>> In principle, it works but it can't load the definitions from the
>> antlib.xml
>> because it can't find it. Where do I get it from ?
>>
>> It doesn't exist within the ant-contrib-0.3.jar
>>
>> Chris
>>
>> On Tue, May 27, 2008 at 3:49 AM, Olivier Gies <ol...@bull.net>
>> wrote:
>>
>>
>>
>>> 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 <av...@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 <ol...@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
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: Re setting a variable to a new value.

Posted by Olivier Gies <ol...@bull.net>.
The version I use is "ant-contrib-1.0b3.jar"

I advise you use the latest version of ant-contrib: 
http://ant-contrib.sourceforge.net

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.*



-------- Original Message  --------
Subject: Re: Re setting a variable to a new value.
From: Chris Green <ch...@googlemail.com>
To: Ant Users List <us...@ant.apache.org>
Cc: olivier.gies@bull.net, avijayr@gmail.com
Date: 27/05/2008 16:20
> In principle, it works but it can't load the definitions from the antlib.xml
> because it can't find it. Where do I get it from ?
>
> It doesn't exist within the ant-contrib-0.3.jar
>
> Chris
>
> On Tue, May 27, 2008 at 3:49 AM, Olivier Gies <ol...@bull.net> wrote:
>
>   
>> 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 <av...@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 <ol...@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
>>
>>
>>     
>
>   



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


Re: Re setting a variable to a new value.

Posted by Chris Green <ch...@googlemail.com>.
In principle, it works but it can't load the definitions from the antlib.xml
because it can't find it. Where do I get it from ?

It doesn't exist within the ant-contrib-0.3.jar

Chris

On Tue, May 27, 2008 at 3:49 AM, Olivier Gies <ol...@bull.net> wrote:

> 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 <av...@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 <ol...@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
>
>

RE: Re setting a variable to a new value.

Posted by Olivier Gies <ol...@bull.net>.
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 <av...@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 <ol...@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


AW: Re setting a variable to a new value.

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
 I too have sometimes problems with adding new tasks (e.g. antcontrib). I solved it by adding the jars into the current ANT/lib-path. I still havent find out why this sometimes fails.

I use this to add antcontrib:

  <!-- antcontrib Tasks (z.B. for-Task)-->
  <taskdef resource="net/sf/antcontrib/antlib.xml">
    <classpath>
      <pathelement location="${ant.contrib.jar}" />
    </classpath>
  </taskdef>

My jarname is D:/Programme/Ant/apache-ant-1.6.5/lib/ant-contrib-1.0b3.jar


You use: ant-contrib-0.3.jar

Is this the problem?

-- 
Jürgen Knuplesch 
-----Ursprüngliche Nachricht-----
Von: Chris Green [mailto:chris.green100@googlemail.com] 
Gesendet: Montag, 26. Mai 2008 16:34
An: Ant Users List; avijayr@gmail.com
Cc: olivier.gies@bull.net
Betreff: 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 <av...@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 <ol...@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


Re: Re setting a variable to a new value.

Posted by Chris Green <ch...@googlemail.com>.
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 <av...@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 <ol...@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


Re: Re setting a variable to a new value.

Posted by Vijay Aravamudhan <av...@gmail.com>.
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 <ol...@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
>
>   

Re: Re setting a variable to a new value.

Posted by Chris Green <ch...@googlemail.com>.
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 <ol...@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


Re: Re setting a variable to a new value.

Posted by Olivier Gies <ol...@bull.net>.
 > 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


RE: Re setting a variable to a new value.

Posted by Martin Gainty <mg...@hotmail.com>.
yes Properties are immutable
http://ant.apache.org/manual/CoreTasks/property.html
I think ant-optional has a mutable variable try
http://ant.apache.org/manual/install.html
 
HTHMartin ______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.> Date: Mon, 26 May 2008 12:11:06 +0200> From: chris.green100@googlemail.com> To: user@ant.apache.org> Subject: Re setting a variable to a new value.> > I need to re set a variable to a new value during the execution of an> Ant script.> > From what I understand, this cannot be done by using the property command e.g.> > <property name="component" value="initial value"/>> .> .> .> .> <property name="component" value="new value"/>> > I have tryed using the var command e.g.> > <var name="component" value="" value="initial value"/>> .> .> .> .> <var name="component" value="" value="initial value"/>> > even placing a <var name="src.dir" value="" unset="true"/> between yet> I get the message> > 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.> > ---------------------------------------------------------------------> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org> For additional commands, e-mail: user-help@ant.apache.org> 
_________________________________________________________________
E-mail for the greater good. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood

Re setting a variable to a new value.

Posted by Chris Green <ch...@googlemail.com>.
I need to re set a variable to a new value during the execution of an
Ant script.

>From what I understand, this cannot be done by using the property command e.g.

<property name="component" value="initial value"/>
                       .
                       .
                       .
                       .
<property name="component" value="new value"/>

I have tryed using the var command e.g.

<var name="component" value="" value="initial value"/>
                       .
                       .
                       .
                       .
<var name="component" value="" value="initial value"/>

even placing a <var name="src.dir" value="" unset="true"/> between yet
I get the message

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.

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