Hi all,
         I have 2100 jsp files in my system, and I use the following ant script 
to precompile my jsp files. It takes 10 minutes to complete. 10 minutes is too 
long for me, because I also need to run class obfuscation, js/css compressor 
and test case. It’s any tips for me to speed up the precompilation?
==============================================================================
The following is my ant script:
   <target name="common.compilejsp">
      <taskdef classname="org.apache.jasper.JspC" name="jasper2">
         <classpath id="jspc.classpath">
            <pathelement location="${java.home}/../lib/tools.jar" />
            <fileset dir="${tomcat.home}/bin">
               <include name="*.jar" />
            </fileset>
            <fileset dir="${tomcat.home}/server/lib">
               <include name="*.jar" />
            </fileset>
            <fileset dir="${tomcat.home}/common/lib">
               <include name="*.jar" />
            </fileset>
         </classpath>
      </taskdef>
 
      <delete failonerror="false" dir="${build.dir}/jspsrc"/>
      <mkdir dir="${build.dir}/jspsrc"/>
      <echo>${jsp.srcdir}</echo>
      <jasper2 validateXml="false" uriroot="${jsp.srcdir}"
         webXmlFragment="${basedir}/generated_web.xml"
         outputDir="${build.dir}/jspsrc" >
      </jasper2>        
     
      <javac destdir="${jsp.compilation.destdir}" optimize="off"
         debug="off" failonerror="${failonerror.during.compilation}" 
srcdir="${build.dir}/jspsrc"
         encoding="UTF-8" fork="true" memoryMaximumSize="1280M">
         <classpath>
            <pathelement location="${8th.classes.dir}" />
            <fileset dir="${8th.lib.dir}">
               <include name="*.jar" />
            </fileset>
            <pathelement location="${tomcat.home}/common/classes" />
            <fileset dir="${tomcat.home}/common/lib">
               <include name="*.jar" />
            </fileset>
            <pathelement location="${tomcat.home}/shared/classes" />
            <fileset dir="${tomcat.home}/shared/lib">
               <include name="*.jar" />
            </fileset>
            <fileset dir="${tomcat.home}/bin">
               <include name="*.jar" />
            </fileset>
         </classpath>
         <include name="**/*.java" />
      </javac>
   </target>
 
Regards,
Eric chen




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to