The problem is that ant needs to find your classes in the root classloader but 
by default they are in the sub-classloader.
http://maven.apache.org/maven-1.x/using/developing-plugins.html#Plugin_dependencies
A solution is to create another project for your ant task and to define in your 
plugin a dependency with the root classloader.

I have no other idea.

Arnaud
 

> -----Message d'origine-----
> De : Durfee, Bernard [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 17 novembre 2005 20:13
> À : users@maven.apache.org
> Objet : Plugin Classes
> 
> I've created a plugin with the following in the plugin.jelly file...
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns:ant="jelly:ant">
>   <goal name="uportal:update-web-xml" description="Updates 
> the web.xml for deploying into uPortal">
>     <ant:echo message="Invoking Portlet Application 
> Deployment Tool" />
> 
>     <ant:taskdef name = "deployer"
>                  classname    =
> "org.jasig.portal.container.deploy.DeployerTask"
>                  loaderref    = "cc.loader"
>                  classpathref = "maven.dependency.classpath">
>     </ant:taskdef>
>   
>     <deployer webmodule       = "${artifactId}"
>               webXML  = "${maven.war.build.dir}/WEB-INF/web.xml"
>               portletXML      =
> "${maven.war.build.dir}/WEB-INF/portlet.xml"
>     </deployer>
>   </goal>
> </project>
> 
> ...when I attempt to execute the plugin I get the following error...
> 
> BUILD FAILED
> File...... C:\Documents and
> Settings\durfeebe\.maven\cache\uportal-maven-plugin-0.1\plugin.jelly
> Element... ant:taskdef
> Line...... 11
> Column.... 62
> taskdef class org.jasig.portal.container.deploy.DeployerTask 
> cannot be found
> 
> ... which I believe is telling me that the ant taskdef tag 
> cannont find the DeployerTask class. The DeployerTask class 
> is packaged up with the plugin jar file, which I would assume 
> would be on the classpath in the plugin! Apparently it is 
> not, how do I reference the classes packaged up with the 
> Maven plugin jar file?
> 
> Thanks,
> Bernie
> 
> 
> ---------------------------------------------------------------------
> 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