You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ian Neruda <ia...@yahoo.com> on 2004/06/02 17:13:31 UTC
Adding custom Ant tasks inside Maven
Hi.
I need to extend ant with custom task(obfuscation) and
use that task inside Maven. I added jar in
MAVEN_HOME/lib, and added that jar to classpath(in
maven.bat).
After that I put task definition in maven.xml:
<goal name="crm:obfuscate">
<ant:taskdef name="obfuscate"
classname="com.yworks.yguard.ObfuscatorTask"/>
</goal>
I get error message "taskdef class
com.yworks.yguard.ObfuscatorTask cannot be found".
Do I need to put jar somewhere else or I have taskdef
in wrong file?
Thanks, Ian.
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Adding custom Ant tasks inside Maven
Posted by Brett Porter <br...@apache.org>.
Don't put the jar in the maven lib directory. Instead, add "classpath" to the
taskdef.
One way is to add it as a dependency of the project and add:
classpathref="maven.dependency.classpath"
to the taskdef
Quoting Ian Neruda <ia...@yahoo.com>:
> Hi.
>
> I need to extend ant with custom task(obfuscation) and
> use that task inside Maven. I added jar in
> MAVEN_HOME/lib, and added that jar to classpath(in
> maven.bat).
>
> After that I put task definition in maven.xml:
> <goal name="crm:obfuscate">
> <ant:taskdef name="obfuscate"
> classname="com.yworks.yguard.ObfuscatorTask"/>
> </goal>
>
> I get error message "taskdef class
> com.yworks.yguard.ObfuscatorTask cannot be found".
>
> Do I need to put jar somewhere else or I have taskdef
> in wrong file?
>
> Thanks, Ian.
>
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends. Fun. Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org