Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
jspc task and the classpath

jspc task and the classpath

2004-02-10       - By Mariano Benitez

Do I need to include always the ant.jar in the classpath that I use to
invoke jspc? If I don't do it I get

    [jspc] Compiling 32 source
files/w/MT/local/build/portaladmin/jsp.precompilation
 [jasperc] Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/tools/ant/AntClassLoader
 [jasperc]     at org.apache.jasper.JspC.initClassLoader(JspC.java:420)
 [jasperc]     at org.apache.jasper.JspC.processFile(JspC.java:556)
 [jasperc]     at org.apache.jasper.JspC.execute(JspC.java:801)
 [jasperc]     at org.apache.jasper.JspC.main(JspC.java:823)

my piece of script is

       <path id="jspc.class.path">
               <path refid="project.class.path"/>
               <pathelement location="${build.dir}"/>
<!--
               <fileset dir="${lib.dir}">
                       <include name="servlet23.jar" />
               </fileset>
-->

               <fileset dir="${lib.dir}/tomcat">
                       <include name="jasper-compiler.jar" />
                       <include name="jasper-runtime.jar" />
               </fileset>
               <fileset dir="${external.lib.dir}">
                       <include name="ant.jar" />
               </fileset>
       </path>

             <mkdir dir="${build.dir}/jsp.precompilation"/>
             <jspc srcdir="${portaladmin.webapps}"
                     uriroot="${portaladmin.webapps}"
                     destdir="${build.dir}/jsp.precompilation"
verbose="1" compiler="jasper41">

                 <classpath refid="jspc.class.path" />

                 <include name="jsp/*.jsp" />
                 <exclude name="**/viewWizard.jsp" />
                 <exclude name="**/viewAttributes.jsp" />
                 <exclude name="**/adminDetail.jsp" />
                 <exclude name="**/batchErrorList.jsp" />
                 <exclude name="**/displayError.jsp" />
                 <exclude name="**/errorPage.jsp" />
                 <!-- <exclude name="**/calendar.jsp" /> -->

             </jspc>


any help?

Thanks,
MAriano

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.