You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Hilco Wijbenga <hi...@gmail.com> on 2006/11/24 18:44:19 UTC

Re: [HELP] How to use ant-contrib inside an ant plugin?

Hi Dharmesh,

On 11/24/06, Dharmesh Vyas <dh...@gmail.com> wrote:
> Hello,
>
> I got your id from one of the site, where you had suggested solution
> regarding using the ant-contrib. I have been facing the same issue for few
> days and have been trying to resolve it.

Please send your questions to the list so other people can reply as
well and the question&answer reach more people, hopefully preventing
future questions.

> The error that I get is:
> ***************************************************************************************
> D:\Projects\Ant-trials\ant-tasks\BuildTestEnv.xml:42: Could
> not create task or type of type: for.
:
<snip/>
:
> ****************************************************************************************
> I have the ant 1.6.3 and ant-contrib 1.0b3-bin on my machine. I have copied
> jar file of ant-contrib in to ant/lib .
>
> This is how I am using the "For" task in my build.xml file
>
>  <target name="useoffor">
>   <for param="i" begin="0" step="1" end="5">
>        <sequential>
>          <echo>i is @{i}</echo>
>         </sequential>
>      </for>
>   </target>
>
> To use "for" task do i need to define any thing else also in my build.xml
> file ? Please let me know where am I going wrong.

Maven doesn't use your locally installed Ant/Ant-contrib (which is
what I think you are referring to). The link in my original reply
shows you exactly how to use Ant-Contrib in an Ant task. (Well, the
example is for 'antlr' but I'm sure you can see how it would work for
'ant-contrib'.)

That link was:
http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html

I haven't checked whether a newer ant-contrib is available now in any
of the Maven repositories so you may still have to put it in your
local repository or use Proximity (or something like it).

> Thanks a tone in Advance,
> - Dharmesh Vyas

Cheers,
Hilco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org