ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Noel Grandin)
Subject foreach and jspc and directory based tasks
Date Thu, 19 Jun 2003 08:42:16 GMT


I'm trying to compile my JSP files in my build process (to catch silly
errors). I have to do it one file at a time, because Tomcat4.1.24 seems to
have a bug in Jasper when I compile lots
of files at once.
But I can't seem to find a way of getting the FileSet in the JSPC task to
work the way I want it to.
I'm passing the file I need to compile in as an argument, but then it fails
because the FileSet scanner uses srcdir as the "base" directory. I can't
specify srcdir as empty because then it complains about "attribute not set".
I've also tried specifying srcdir as "/" and as "c:/

Any ideas?

   Noel Grandin

<target name="jsp_one_file" description="">
    <jspc srcdir="${path.base}/jsp"
        <include name="${param.file}" />

    <target name="jsp_compile" description="Compiles the JSP files">
    <!-- I have to compile them one at a time because of a bug in the Tomcat
4.1.24 compiler -         it throws an NPE when I do all my files at once
        <foreach target="jsp_one_file" param="param.file" inheritall="true">
                <fileset dir="${path.base}/jsp">
                    <include name="**/*.jsp" />

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message