You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Walker Joe <Jo...@barclaycard.co.uk> on 2000/08/07 09:43:18 UTC

Prototype JspcTask

Hi,

Attached is my prototype JspcTask. It does work, but there are restrictions,
and right now it is not much better than using <exec command="jspc.sh ... />

There are 2 jobs to be done.

Make it inherit from MatchingTask (not sure if the name is right - I didn't
spend too long playing)
The real problem behind <exec command="jspc.sh ... /> is that is recompiles
all the source all the time, and that kicks off every other build task in
sight.
Where is the best place to start? I had a look at JavacTask and RmicTask but
it wasn't obvious what I needed and what was only relevant to javac. Or are
there some good docs somewhere?

More importantly, sort out some complex CLASSPATH issues.

There are 2 modes in the code below, fork="[true|false]". The reason is that
jspc requires jasper.jar to be in the ANT classpath, and jasper.jar requires
the tomcat webserver.jar, which in turn requires servlet.jar.
Now all this would be OK (if a little topsy) EXCEPT the whole reason to use
jspc for me is to have JSPs working on servlet 2.0 engines, requiring a
different servlet.jar. Foom.

Can anyone think of a better solution than my fork hack?


 <<JspcTask.java>> 
Joe.



Legal Disclaimer:-

Please be aware that messages sent over
the Internet may not be secure and should
not be seen as forming a legally binding
contract unless otherwise stated.

Re: Prototype JspcTask

Posted by "William G. Thompson, Jr." <wg...@softcom.com>.
Walker Joe wrote:
> 
> Hi,
> 
> Attached is my prototype JspcTask. It does work, but there are restrictions,
> and right now it is not much better than using <exec command="jspc.sh ... />
> 
> There are 2 jobs to be done.
> 
> Make it inherit from MatchingTask (not sure if the name is right - I didn't
> spend too long playing)
> The real problem behind <exec command="jspc.sh ... /> is that is recompiles
> all the source all the time, and that kicks off every other build task in
> sight.
> Where is the best place to start? I had a look at JavacTask and RmicTask but
> it wasn't obvious what I needed and what was only relevant to javac. Or are
> there some good docs somewhere?
The best docs is the source! ;)

Joe,

I've had good success with paring down JavacTask for XMLCTask, it does
compilation based on Timestamp (just like JavacTask).  XMLCTask is much
smaller and may be easier to grok since I've cleared out all the Javac
stuff.   I've attached it for your convenance.

later.
Bill
--
Bill Thompson | geek
"I'd rather write programs to write programs than write programs" 
bill@softcom.com | t: 732 283 5900 | f: 732 283 5757
http://www.softcom.com | Making Video Interactive