You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dave Syer <da...@hotmail.com> on 2006/08/20 12:06:13 UTC

Re: M2 antrun plugin problem

> Dont think refid can be passed to <taskdef>??

This is a limitation of the <ant> task - so if it is a problem it is an ant
problem, not a maven problem.  You can't define a task with a <taskdef> at
project scope if it needs a reference that is passed in fro the parent
project using <ant> - the reference resolution happens too late.

The workaround is to define your task inside the target that needs it, e.g:

<target name="foo">
    <taskdef name="foo" classname="Foo"
classpathref="maven.test.classpath"/>
    <foo/>
</target>

works, but

<taskdef name="foo" classname="Foo" classpathref="maven.test.classpath"/>
<target name="foo">
    <foo/>
</target>

does not.

-- 
View this message in context: http://www.nabble.com/M2-antrun-plugin-problem-tf1400135.html#a5892203
Sent from the Maven - Users forum at Nabble.com.


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