ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nanda Kishore MVS" <nandakishore...@renaissance-it.com>
Subject RE: <for> -Build Failed:problem
Date Mon, 02 Aug 2004 15:40:57 GMT
Yeah, that's right. Thanks.

Best Regards,
Nanda Kishore 


-----Original Message-----
From: Inger, Matthew [mailto:Inger@Synygy.com]
Sent: Monday, August 02, 2004 9:03 PM
To: 'Ant Users List'
Subject: RE: <for> -Build Failed:problem


the part about ant-contrib.jar needing to be in ant/lib folder is not
necessary.  You can specify a classpath element under the taskdef
to get the stuff in the classpath:

<taskdef resource="net/sf/antcontrib/antlib.xml">
  <classpath>
      <fileset dir="path.to.antcontrib" includes="ant-contrib.jar" />
  </classpath>
</taskdef>

-----Original Message-----
From: Nanda Kishore MVS [mailto:nandakishoremvs@renaissance-it.com]
Sent: Monday, August 02, 2004 11:25 AM
To: Ant Users List
Subject: RE: <for> -Build Failed:problem


Hi,
	This is for the <for> task part of the problem. To clear a bit of
confusion, I'll list the settings required for the <for> or <for-each> task
to run at the risk of being repetitive:

1. ANT_HOME=<<Ant_Installation_Folder>>
2. JAVA_HOME=<<JDK_Folder>>
3. PATH=${ANT_HOME}\bin;${JAVA_HOME}\bin
4. CLASSPATH=${ANT_HOME}\lib
5. The ${ANT_HOME}\lib folder should contain the ant.jar and ant-contrib jar
files.

If you have all this and still the same "taskdef class cannot be found"
problem persists, you could try moving the ${ANT_HOME}\lib entry to the
begining of the classpath. And you could check if there are any older
versions of Ant also in the way somewhere on the system.

I'm sorry if you did all this already, but it's real surprise if the
problem's still there.

Best Regards,
Nanda Kishore 


-----Original Message-----
From: Angeshwar Deepak [mailto:angeshwar@yahoo.com]
Sent: Monday, August 02, 2004 10:48 AM
To: Ant Users List
Subject: RE: <for> -Build Failed:problem


Hi,

I tried with the XML file as well.

BUILD FAILED
D:\deepak\buildProcess_2\_lib\build\apache-forrest-0.5.1-bin\forrest.build.x
ml:38:
taskdef class  cannot be found

Total time: 1 second

D:\deepak\buildProcess_2\logging>ant -version
Apache Ant version 1.6.2 compiled on July 16 2004

The Ant version is also the latest, where could the
problem be???

Any way I left the for and decided to use <for-each>,
but I have 1 problem here. I have already posted the
problem anyway lets hop I am more clear this time

I am using <for-each> task to set the properties
and I want them to be global. i.e. I want the value
of the property in any ant target I call.


<project default="site" basedir="." name="forrest">
....
....
<taskdef
resource="net/sf/antcontrib/antcontrib.properties"/>
	<target name="init-props">
	<foreach list="logging,app,add" param="archive"
target="base" 
		inheritall="true" inheritrefs="true"> 
	</foreach>
....
....
<antcall target="a" />
</target>

<target name="a" depends="init-props">
....
<antcall target="b" />
</target>

<target name="b" depends="init-props">
</target>

<target name="base">
<echo>****${archive}****</echo>
<property name="current.archive" value="${archive}" />
<echo>****${current.archive}****</echo>
</target>


The problem is I am not able to use the 
${current.archive} or ${archive} in other
ant tasks. Inside the 'base' ant task, they work
fine, but in other ant task its not visible.
How can I make them global?

Any help reg this will be great.

bye,
with regards,
Deepak.



bye,
with regards,
Deepak.
--- "Inger, Matthew" <Inger@Synygy.com> wrote:

> taskdef takes several different types of parameters.
> 
> Prior to ant 1.6, you could either specify a
> classname, or a
> resource name.  The resource name indicated the name
> of a properties
> file which could specify tasks.  The property name
> was the task name,
> and the value was the class which defined the task.
> 
> Ant 1.6 added the ability to load an xml file with
> the task
> definitions as well.  This is the preferred way to
> load multiple
> tasks in Ant 1.6, though the .properties file is
> still supported,
> and individual task definitions are still supported
> as well.
> 
> <taskdef resource="net/sf/antcontrib/antlib.xml" />
> 
> 
> -----Original Message-----
> From: Angeshwar Deepak [mailto:angeshwar@yahoo.com]
> Sent: Monday, August 02, 2004 10:28 AM
> To: Ant Users List
> Subject: RE: <for> -Build Failed:problem
> 
> 
> Hi,
> 
> I searched for the xml file u mentioned to. Its
> available onliny in ant-contrib-1.0b1 (the latest
> version). In the previous versions there is no such
> xml file.
> 
> Also the taskdef task takes only a classfile as
> attribute. I cannot understand how it takes a xml
> file. Could u please give me an example of how u
> used
> it.
> 
> bye,
> with regards,
> Deepak.
> 
> 
> --- "Khehra, Sukh" <Sukh.Khehra@wsj.com> wrote:
> 
> > properties file is needed in ant 1.5 versions i
> > think. try it with the xml file. i have it running
> > quite well.
> > 
> > 
> > -----Original Message-----
> > From: Angeshwar Deepak
> [mailto:angeshwar@yahoo.com]
> > Sent: Monday, August 02, 2004 10:00 AM
> > To: Ant Users List
> > Subject: RE: <for> -Build Failed:problem
> > 
> > 
> > Hi,
> > 
> > In the site
> > 
> > http://ant-contrib.sourceforge.net/
> > 
> > Under installation its mentioned to include the
> line
> > 
> > <taskdef
> >
> resource="net/sf/antcontrib/antcontrib.properties"/>
> > 
> > If u want to use ant-contrib tasks.
> > kindly correct me if I am wrong.
> > 
> > 
> > bye,
> > with regards,
> > Deepak.
> > 
> > 
> > --- "Khehra, Sukh" <Sukh.Khehra@wsj.com> wrote:
> > 
> > > shouldn't you say <taskdef
> > > resource="net/sf/antcontrib/antlib.xml"> ?
> > > 
> > > -----Original Message-----
> > > From: Angeshwar Deepak
> > [mailto:angeshwar@yahoo.com]
> > > Sent: Monday, August 02, 2004 6:14 AM
> > > To: Ant Users List
> > > Subject: RE: <for> -Build Failed:problem
> > > 
> > > 
> > > Hi,
> > > 
> > > I tried that too, but still it does'nt work. But
> > > for-each task works, the problem is only with
> for
> > > task.
> > > 
> > > So I am still breaking my head.
> > > 
> > > bye,
> > > with regards,
> > > Deepak.
> > > --- Nanda Kishore MVS
> > > <nandakishoremvs@renaissance-it.com> wrote:
> > > 
> > > > Hi,
> > > > 	No, I meant the lib folder straight. In your
> > case
> > > > like:
> > > > SET
> > > >
> > >
> >
>
CLASSPATH=D:\deepak\buildProcess_2\_tools\ant-1.6.2\lib;%CLASSPATH%
> > > > The lib folder itself should be in classpath,
> > not
> > > > the contrib jar alone.
> > > > As for why it's so, I've not looked into that,
> > but
> > > > this is how the contrib tasks are working for
> me
> > > > now.
> > > > 
> > > > Regards,
> > > > Nanda Kishore
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Angeshwar Deepak
> > > [mailto:angeshwar@yahoo.com]
> > > > Sent: Monday, August 02, 2004 3:12 PM
> > > > To: Ant Users List
> > > > Subject: RE: <for> -Build Failed:problem
> > > > 
> > > > 
> > > > Hi,
> > > > 
> > > > Do you mean to say this?-I have it I guess.
> > > > 
> > > > SET
> > > >
> > >
> >
>
CLASSPATH=D:\deepak\buildProcess_2\_tools\ant-1.6.2\lib\ant-contrib-0.6.jar;
> > > > 
> > > > and my complete set of classpath is
> > > > 
> > > > SET
> > > >
> > >
> >
>
PATH=c:\j2sdk1.4.2_04\bin;D:\deepak\buildProcess_2\_tools\ant-1.6.2\bin;D:\d
>
eepak\buildProcess_2\_lib\build\apache-forrest-0.5.1-bin\bin
> > > > set JAVA_HOME=c:\j2sdk1.4.2_04
> > > > set
> > > >
> > ANT_HOME=D:\deepak\buildProcess_2\_tools\ant-1.6.2
> > > > set
> > > >
> > >
> >
> PATH=%PATH%;%ANT_HOME%\bin;%PATH%;%FORREST_HOME%\bin
> > > > 
> > > > set
> > > >
> > >
> >
>
FORREST_HOME=D:\deepak\buildProcess_2\_lib\build\apache-forrest-0.5.1-bin
> > > > SET
> > > >
> > >
> >
>
CLASSPATH=D:\deepak\buildProcess_2\_tools\ant-1.6.2\lib\ant-contrib-0.6.jar;
> > > > 
> > > > bye,
> > > > with regards,
> > > > Deepak.
> > > > 
> > > > --- Nanda Kishore MVS
> > > > <nandakishoremvs@renaissance-it.com> wrote:
> > > > 
> > > > > Hi,
> > > > > 	I think you will need the ant's lib folder
> > > > > "${ANT_HOME}\lib" added to your classpath to
> > run
> > > > the
> > > > > ant contrib tasks. And this lib folder needs
> > to
> > > be
> > > > > in the classpath before your weblogic or
> other
> > > > such
> > > > > jars. Can you check that out?
> > > > > 
> 
=== message truncated ===



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

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


Mime
View raw message