jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Stirling" <sstirl...@mediaone.net>
Subject RE: [ PROPOSAL ] Ant taglib
Date Sat, 16 Dec 2000 17:52:39 GMT
Thank you, Mike.  I'd be glad to receive your assistance.

Anyone else care to comment either way?

I know it's the weekend.  I myself am going up to my mother's in New
Hampshire for an early Christmas this afternoon.  I'll be back on Monday.
Look forward to further comments next week.

Scott Stirling
West Newton, MA
(BTW, for those who don't know me (and I don't expect any of you do) I work
on JRun at Allaire, and I wrote several chapters of a book on JSP for Ben
Forta and SAMS publishing)


-----Original Message-----
From: Mike Cannon-Brookes [mailto:mcannon@internet.com]
Sent: Saturday, December 16, 2000 1:38 AM
To: taglibs-dev@jakarta.apache.org
Subject: RE: [ PROPOSAL ] Ant taglib


Scott,

I for one think this is a fantastic idea. I already have hacked up versions
of many of the ant tags for personal use (file manipulation mainly, along
with CVS).

Using Ant code for these instead of my own poor attempts is a very smart
idea, I can't believe I didn't think of it sooner ;)

Count me as a +1 for this taglib, I'll even lend a hand if you want.

Mike

Technical Director, Asia Pacific
internet.com - mcannon@internet.com

> -----Original Message-----
> From: Scott Stirling [mailto:sstirling@allaire.com]
> Sent: Saturday, December 16, 2000 3:29 PM
> To: 'taglibs-dev@jakarta.apache.org '
> Subject: [ PROPOSAL ] Ant taglib
>
>
> Hey,
>
> The subject says a lot.  What I'm proposing here is an addition to the
> taglib project.
>
> I have a few of the easy tags implemented as prototypes all ready, namely:
>
> <ant:echo message=""/>
> <ant:fail message=""/>
> <ant:gunzip src="/path/to/file.gz" dest="[ filename | directory ]"/>
> <ant:gzip src="/path/to/file" zipfile="filename.zip"/>
> <ant:mkdir dir="/directory(ies)/to/create"/>
>
> So why the hell make a taglib out of Ant tasks, you ask?  I've
> thought about
> it a lot.  The main reason I've thought of is that so many of the
> Ant tasks
> make natural JSP tags that would allow people with Web scripting skills to
> do a lot of the same mundane backend stuff that CFML tags do, that PERL
> programmers scripts do, etc. such as copy files, delete files, ftp files,
> execute native programs, and so on.
>
> Being able to build and deploy ejb jars and wars online would allow you to
> easily make Web-based build systems.
>
> Ant is a Jakarta project, and much of the task code from Ant could be
> re-used.  So far I've written JSP tags that follow the semantics and
> functionality of the Ant tasks, but throwing JspTagExceptions in place of
> BuildExceptions, logging to ServletContext.log() and completely isolating
> the individual tasks from the whole back end Ant build system with its
> Project class and all its dependencies.
>
> Since the Ant tasks would all be implemented as JSP tags, they could be
> mixed with presentation tags, with scripting languages (via the
> BSF taglib),
> and so on.
>
> There are two main ways to do this that I've thought about, the latter of
> which would depend on some cooperation/interaction with the Ant dev group:
>
> 1. Implement all the tasks as regular JSP tags in a taglib,
> capable of being
> used in isolation (i.e., being able to use any task without having to nest
> it in a project tag, or without requiring a Project to be instantiated,
> etc.), just like any old tag.  Naturally some tags would be dependent on
> each other, like fileset and include tags inside of the tags like copy and
> javac.
>
> 2. Integrate the taglib with the Ant build system so that a
> build.xml could
> (essentially) be run as a JSP page by simply changing its file
> extension to
> .jsp, adding the appropriate taglib directive at the top and adding a tag
> prefix to the XML tags.  This is pie in the sky, but an
> interesting goal, I
> think.  And if Ant had a nice clean interface API for us, it would be easy
> to tie into the whole Ant system from an app server without doing
> something
> kludgey like using a Runtime.exec() or instantiating Ant's main() method.
> Such an interface could also help with goal #1 above, allowing
> Ant tasks to
> be instantiated as standalone entities (perhaps having Tags that
> implemented
> an Ant Task interface).
>
> I guess that's it.  I've been thinking about this for a couple weeks.  I
> wanted to have more of the tags done before proposing this, but I really
> wanted to get it off my chest.  I'd like to pursue this as an open source
> project under the Jakarta Taglib project if you'll vote for it.
>
> Best regards,
>
> Scott Stirling
> West Newton, MA


Mime
View raw message