You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@iseran.com> on 2001/07/18 09:17:14 UTC

[work in progress] jasperc task

Here is a drop -for anyone interested- of where I have got to in calling the
jasper jspc class from ant. It is up the level where basic webapps and jsp
pages can be compiled, but it is still very raw, some of which can be
attributed to jasper -I'm using the tomcat 4.0b5 build and some things arent
working there (the ieplugin tag).

One thing which causes big time trouble for jasper is when ant builds the
list of files down a directory tree :-

        <jasperc  dest="build" >
            <source dir="jsp" includes="**/*.jsp" />
        </jasperc>

fails with some internal exceptions *which it doesnt report upstream to my
task*. If you hand it off to jasper to do the build, things work:

        <jasperc   dest="build"
            <webapp dir="jsp" />
        </jasperc>


I am not going to touch it for a couple of weeks, so if anyone else wants to
a) fix my code, b) fix jasperc or c) write the unit test to go with the
jasperc.xml, then they are welcome to do so. What I have so far seems
adequate to my needs of verifying jsp page syntax before deploying and
fetching all the jsp pages, it is just a bit raw.

What I havent done yet is any demand generation/compilation of files as and
when needed; if jasper doesnt do that then it wont happen. In 'webapp' mode
it must be left to jasper; with <source> parameters we'd have to determine
what the real filename/location of output java files were. java to class
dependencies are addressed already, of course, with <depends>

Given the tight coupling of this task to jasper, I think a jasperc task
should go into jasper itself, unless we felt it was better to provide an ant
facade for multiple jspc compilers (which will ultimately happen, I guess).
This would help keep the ant task in perfect sync with the rest of the
libraries.

attached
-java file (to go into optional.jspc)
-html doc file (optional)
-jasperc.xml (to go into src\etc\testcases\taskdefs\optional)
-jsp files to go into src\etc\testcases\taskdefs\optional\jsp beneath
jasper.c, except for test4.jpc which goes into jsp\subdir (to test subdir
inclusion)

I will get back to working on this eventually, but am somewhat distracted
right now.

-steve