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 <[EMAIL PROTECTED]>:

> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to