ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hirsch, Barbara" <BARBARA.HIR...@saic.com>
Subject how to use jasper to compile jsps for validation
Date Thu, 25 Mar 2004 02:29:19 GMT
I'm having difficulty using jasper to compile my jsps.

In my build.xml I have:

<target name="-compileJspSrc" unless="compileJspSrc.notRequired"
depends="-compileWebSrc,-checkJspSrc">
    <delete includeEmptyDirs="true" quiet="true">
      <fileset dir="${build.jsp.dir}"/>
    </delete>
    <mkdir dir="${build.jsp.dir}"/>
    <mkdir dir="${build.jsp.javaSrc.dir}"/>
    <!-- This wacky split of the jspc target is a
         workaround for jspc's tendency to run out of memory. -->
    <jspc destdir="${build.jsp.javaSrc.dir}"
          compiler="${jasper.compiler}"
          verbose="1"
          srcdir="${build.war.dir}">
        <classpath refid="webapp.compile" />
        <classpath>
          <pathelement location="${jasper.compiler.lib}"/>
          <pathelement location="${jasper.runtime.lib}"/>
          <pathelement location="${ant.lib}"/>
          <pathelement location="${ant.optional.lib}"/>
        </classpath>
        <include name="WEB-INF/tiles/r*/**/*"/>
    </jspc>
    <jspc destdir="${build.jsp.javaSrc.dir}"
          compiler="${jasper.compiler}"
          verbose="1"
          srcdir="${build.war.dir}">
        <classpath refid="webapp.compile" />
        <classpath>
          <pathelement location="${jasper.compiler.lib}"/>
          <pathelement location="${jasper.runtime.lib}"/>
          <pathelement location="${ant.lib}"/>
          <pathelement location="${ant.optional.lib}"/>
        </classpath>
        <exclude name="WEB-INF/tiles/r*/**/*"/>
    </jspc>
    <mkdir dir="${build.jsp.javaSrc.dir}/WEB-INF"/>
    <move todir="${build.jsp.javaSrc.dir}/WEB_0002dINF"
          preservelastmodified="true"
          includeEmptyDirs="false">
      <fileset dir="${build.jsp.javaSrc.dir}/WEB-INF"/>
    </move>
    <mkdir dir="${build.jsp.classes.dir}"/>
    <javac srcdir="${build.jsp.javaSrc.dir}"
destdir="${build.jsp.classes.dir}"
           debug="true" deprecation="true">
        <classpath refid="webapp.compile" />
        <classpath>
          <pathelement location="${war.classes.dir}"/>
          <pathelement location="${jasper.runtime.lib}"/>
        </classpath>
    </javac>
    <echo file="${build.jsp.dir}/JSPs.built" append="false">Dummy
file</echo>
  </target>

and when I run ant, I don't see any output indicating the jsps have been
compiled.  I do see:

-compileJspSrc:

In my build.properties I have:
#JASPER settings
jasper.libs=${tomcat.home}/common/lib
jasper.compiler=jasper41
jasper.compiler.lib=${jasper.libs}/jasper-compiler.jar
jasper.runtime.lib=${jasper.libs}jasper-runtime.jar

And in user.build.properties, I have:

compileJspSrc.notRequired=0


Is there something I need to change?

Thanks!

Barb



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message