ant-user mailing list archives

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

Hi

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?

Thanks,
   Noel Grandin

<target name="jsp_one_file" description="">
    <jspc srcdir="${path.base}/jsp"
        destdir="${path.base}/work"
        compiler="jasper41"
        uriroot="${path.base}"
        verbose="9">
        <include name="${param.file}" />
    </jspc>
    </target>

    <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">
            <path>
                <fileset dir="${path.base}/jsp">
                    <include name="**/*.jsp" />
                </fileset>
            </path>
        </foreach>
    </target>


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


Mime
View raw message