ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: Task Submissions
Date Sun, 29 Jul 2001 02:30:03 GMT

----- Original Message -----
From: "Matthew Watson" <mattw@i3sp.com>
To: <ant-dev@jakarta.apache.org>
Sent: Thursday, July 19, 2001 11:35 PM
Subject: Re: Task Submissions


> Stefan Bodewig wrote:
>
> >>Buts its key weaknesses are
> >> -does not (yet) do dependency based invocation.
> >> -doesnt use any javac choice (a feature of the jasperc library
> >>  which I dont want to look at)
> >>
> >
> > I think both are important features - depending on the number of JSPs
> > of course.  Users will also want that the chosen javac is the same the
> > <javac> task would use.
>
>
> I'm not sure I follow what you guys are talking about here. What do you
> mean by dependency based invocation? What has javac got to do with
anything?

I was causing confusion here. I was under the mistaken impression that the
jasper code does the compile too -it doesnt seem to, so a handoff to javac
comes next in the process.

I dont know what jasperc does when you spec a -webapp <directory>  -either
it transforms everything or it does dependency based translation. I'll need
to test.

>
>
> >>One issue to worry about first: what use cases are we addressing
> >>with this task
> >>
> >>1. compilation of jsp pages purely as a syntax checker before
> >>bothering to deploy
> >>
> >>2. precompilation of jsp pages into java files /.class files for
> >>inclusion in war files
>
>
> For me, I definitely need this task for 2, and that is what my
> implementation does (We are not allowed to have things like
> javac/tools.jar on our production machines). I am simply running
> org.apache.jasper.JspC on the given fileset. I took the code from javac,
> added in a package="" attribute to pass to JspC and use that to
> calculate the generated .java file name from the fileset of jsp files. I
> only use the basename of the jsp file combined with the package name to
> get the generated file name and then do dependency checking based on
> that mapping to decide what to build.
> I run javac seperately. I have a seperate tree next to classes, usually
> called gensrc (I also use javacc and others) that these file go into and
> then run javac on both my source and generated source trees:
>
>      <jspc srcdir="${src.dir}/war"
>            destdir="${gensrc}"
>            package="com.i3sp.sso.jsp"
>            verbose="9">
>        <include name="**/*.jsp" />
>      </jspc>
>      <javac srcdir="${src.dir};${gensrc}"
>             destdir="${classes}"
>             debug="on"
>             optimize="off"
>             deprecation="on"
>             >
>        <include name="com/i3sp/**/*.java"/>
>        <exclude name="RegisterClient.java"/>
>      </javac>

If Matt had already been using his code for production generation of
servlets, rather than sanity checking, then it is much more mature than
mine. I would propose that we use that codebase (when we get to see it),
pulling in any extra parameters from my version. Then we need some complex
test case .jsp files to build -some with custom classpaths, taglibs, etc.
It'd be nice if we had some real stuff there -is there a collection of pages
for the tomcat/JSP test suite.



> I'm off to the snow for a week!
> Matt

I've been off in the hills too, maintaining strict email/radio silence. In
fact my return to civilisation is still an undocumented secret, till I find
out on monday whether the death march has slowed to a strolled or been
ramped up to a death jog. Its likely I wont have much time to work on this
in the next few weeks, but I may be able to scrape a bit of calm in here or
there.

Matt, now that you are back and reading this, can you post your source?

-steve


Mime
View raw message