might help if the jasper class extended ant Task :)
fixed the problem by defining JspC as a jellybean rather than taskdef
<define:taglib uri="JspC">
<define:jellybean
name="JspC"
className="org.apache.jasper.JspC"
method="execute"
/>
</define:taglib>
Nathan Coast wrote:
Hi
I have a tomcat plugin that works fine using the catalina-ant tasks
<taskdef name="start" classname="org.apache.catalina.ant.StartTask"/>
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask"/>
<taskdef name="undeploy"
classname="org.apache.catalina.ant.UndeployTask"/>
with
<dependency>
<groupId>tomcat</groupId>
<artifactId>catalina-ant</artifactId>
<version>5.0.18</version>
<properties>
<classloader>root</classloader>
</properties>
</dependency>
when I add the jasper compiler task:
<taskdef name="jasper2" classname="org.apache.jasper.JspC"/>
<dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
<version>5.0.18</version>
<properties>
<classloader>root</classloader>
</properties>
</dependency>
maven complains with the error:
[DEBUG] Adding reference: jspc.classpath ->
[taskdef] [DEBUG] Class org.apache.jasper.JspC loaded from parent
loader
File......
D:\apache\Maven-1.0-rc3\plugins\maven-tomcat-plugin-1.1\plugin.jelly
Element... taskdef
Line...... 24
Column.... 64
taskdef class org.apache.jasper.JspC cannot be found
would this error be reported due to a missing dependency of jasper?
I tried explicitly adding jars to the jasper taskdef classpath this but
made no difference.
<taskdef name="jasper2" classname="org.apache.jasper.JspC">
<classpath id="jspc.classpath">
<pathelement path="${plugin.getDependencyPath('jasper-compiler')}"/>
<pathelement path="${plugin.getDependencyPath('commons-logging')}"/>
<pathelement location="${tools.jar}"/>
</classpath>
</taskdef>
I had a look at the jasper build scripts to get an idea of the
dependencies and there are quite a few :(
<pathelement location="${ant.jar}"/>
<pathelement location="${servlet-api.jar}"/>
<pathelement location="${jsp-api.jar}"/>
<pathelement location="${tools.jar}"/>
<pathelement location="${xerces.jar}"/>
<pathelement location="${xercesImpl.jar}"/>
<pathelement location="${xmlParserAPIs.jar}"/>
<pathelement location="${commons-el.jar}"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-logging.jar}"/>
<pathelement location="${commons-daemon-launcher.jar}"/>
I guess some of these are available from the maven runtime? ant, xerces,
xml, tools etc
thanks
Nathan
---------------------------------------------------------------------
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]