Here's an interesting thread on the Maven Users' list that started yesterday:
http://www.mail-archive.com/users@maven.apache.org/msg73451.html
and my contribution to it:
http://www.mail-archive.com/users@maven.apache.org/msg73613.html
It looks like there is a good array of tools coming to light from this
thread. I, myself, have been tackling the problem of making JS library
development more like Java development, as far as automated running of unit
tests, documentation, packaging, etc, in recent months.
I see a growing demand for a nice tool chain of things like jslint,
shrinksafe, jsunit + jscoverage, selenium, jsdoc, and dependency management.
Maybe it's because I just came back to JS after several years with a bunch
of Java development under my belt; but I see all these tools and feel like
they should be integrated. Especially when I make the connection between
web2.0 and people who promote Agile development practice. JS tools are
hardly in the state to accommodate good Agile, IMO. If integration were
better, it would be a different story.
My original approach was to create an Ant script that would download various
things using the <get> task, and use Maven Antlib for JSUnit, Selenium and
ShrinkSafe dependencies. But now I am getting to the point where I want to
break my library into multiple parts (project-core, project-ext,
project-ext-gui, etc) and Maven seems like the natural answer. And of course
when Maven comes into the picture, I want to manage my other JS dependencies
as such.
So last night I gave it a shot, and it seems to work well using war
packaging and their built-in overlay behavior. There are a few kinks to work
out, and probably Mojos to write, but I think it will work.
My immediate need is for JSUnit, which I have hacked into a series of
executions (see pom link below). I'll definitely be looking at some of these
tools and seeing how I can use them (namely the ShrinkSafe mojo!), and
hopefully getting a JSUnit mojo out of them at the very least. I've never
written a plugin (beyond hello world), but I'm eager to give it a shot.
I have high hopes that Maven can bring the state of JS development up to par
with the Agile way that so many web2.0 people want to develop. I'm looking
forward to hearing more of everyone's great ideas!
Harlan
ps.
Here's my main POM with JSUnit (in-progress proof of concept, by no means a
final product). The executions for JSUnit are basically a copy of
Selenium's:
http://soashable.googlecode.com/svn/xmpp4js/branches/maven/pom.xml
And here's my old Ant script "JSLibBuilder":
http://soashable.googlecode.com/svn/jslibbuilder/trunk/
Adios!