[Fwd: Re: Using maven for JavaScript projects]

Eric Dalquist eric.dalquist at doit.wisc.edu
Thu Sep 27 15:25:49 UTC 2007


Not sure what build systems fluid is currently using but it looks like 
the JavaScript tools are becoming available for Maven managed projects.

-Eric

-------- Original Message --------
Subject: 	Re: Using maven for JavaScript projects
Date: 	Thu, 27 Sep 2007 10:11:20 -0500
From: 	Harlan Iverson <h.iverson at gmail.com>
Reply-To: 	Maven Users List <users at maven.apache.org>
To: 	Maven Users List <users at maven.apache.org>
References: 
<4c39e3030709270350k35050986j1739f9a2b5e9a0c7 at mail.gmail.com> 
<9AEC5F50BD7E0F48891AE45ADC561184016CCA8D at ldnukms2.caplin.com> 
<4c39e3030709270656r461e48f2qfd3ab41522b6be23 at mail.gmail.com>



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/


On 9/27/07, nicolas de loof <nicolas.deloof at gmail.com> wrote:
>
> I myself make test based on scriptaculous and prototype. I'm not
> developer on this project so this is only a proof-of-concept.
> Prototype is based on multiple simple js files and requires some
> packaging, so maven fits naturally. scriptaculous has a dependency on
> prototype, so it's a good example for js dependencies.
>
> I'll soon setup a sample project to demonstrate building prototype
> using my plugin...
>
>
> I just added some initial (not yet working...) support for jsDoc in my
> plugin.
> You can checkout
>
> https://hammerfest.svn.sourceforge.net/svnroot/hammerfest/maven-javascript-plugin/trunk/
>
> I never saw any quality-metric tool for javascript. jslinker could be
> a very interesting contrib for this purpose. I also never wrote a
> report-Mojo, so cannot help much on that side...
>
>
> 2007/9/27, Richard Chamberlain < richard.chamberlain at caplin.com>:
> > Maybe we could create an example dev project (or archetype) that uses
> > these plugins if there isn't one already? It would be a good starting
> > point for people who want to use maven for JavaScript.
> >
> > -----Original Message-----
> > From: nicolas de loof [mailto:nicolas.deloof at gmail.com]
> > Sent: 27 September 2007 11:51
> > To: Maven Users List
> > Subject: Re: Using maven for JavaScript projects
> >
> > I just commited a second Mojo that does the merge of multiple js files.
> >
> > With this, a JS projet can be splitted into multiple js files and
> > merged into a main artifact.js
> > The CompressMojo also has been updated to allow attaching a compressed
> > version of the artifact on install/deploy.
> >
> > To Manos :
> > how do you integrate with jsDoc ? AFAIK this is a JS based tool, not
> > really simple to invoke from a Java Mojo. Or maybe you use a JS Mojo ?
> >
> > Would you like to colaborate on a common javascript plugin ? Would you
> > publish it as part of the Mojo project ?
> >
> > 2007/9/27, nicolas de loof <nicolas.deloof at gmail.com>:
> > > That was one goal of my plugin : provide a maven extention to allow
> > > "js" packaging type.
> > >
> > > I proposed for contrib on the mojo dev list but got fiew interest.
> > >
> > > My goal is to allow build projects like scriptaculous using maven :
> > > dependency on prototype, merging of multiple individual .js,
> > > attachement of compressed version...
> > >
> > > Your help is welcome if you have
> > > - ideas
> > > - experience on JS toolkits and/or maven
> > > - time !
> > >
> > > Nico.
> > >
> > >
> > >
> > > 2007/9/27, Richard Chamberlain <richard.chamberlain at caplin.com>:
> > > > Thanks for that. I'll look into it, have you had any experiences
> > with
> > > > dependency management in JavaScript? Our company has a lot of
> > > > JavaScript, some of which are common libraries, shared across
> > projects.
> > > >
> > > > Thanks,
> > > >
> > > > Richard
> > > >
> > > > -----Original Message-----
> > > > From: Manos Batsis [mailto:manos_lists at geekologue.com ]
> > > > Sent: 26 September 2007 12:41
> > > > To: Maven Users List
> > > > Subject: Re: Using maven for JavaScript projects
> > > >
> > > >
> > > > I've worked with Ross Simpson on a Maven Javascript Tools Plugin
> > [1].
> > > > Currently the plugin has two reporting mojos, for JSDoc Toolkit and
> > > > JSLint respectively. We intent to add support for stuff like JSUnit,
> > > > ECMAUnit etc. I just shared the code on CVS two days ago. It needs
> > more
> > > > work but it is usable.
> > > >
> > > > For compression you can use the MobilVox Maven JavaScript Plugin
> > [2],
> > > > works great. I use it myself for sarissa.
> > > >
> > > > [1] https://sourceforge.net/projects/mvn-jstools
> > > > [2] https://sourceforge.net/projects/maven-js-plugin
> > > >
> > > > Cheers,
> > > >
> > > > Manos
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe at maven.apache.org
> > > > For additional commands, e-mail: users-help at maven.apache.org
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe at maven.apache.org
> > > > For additional commands, e-mail: users-help at maven.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe at maven.apache.org
> > For additional commands, e-mail: users-help at maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe at maven.apache.org
> > For additional commands, e-mail: users-help at maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at maven.apache.org
> For additional commands, e-mail: users-help at maven.apache.org
>
>


-- 
Harlan Iverson
http://blog.devspan.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://fluidproject.org/pipermail/fluid-work/attachments/20070927/2831bc96/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3336 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://fluidproject.org/pipermail/fluid-work/attachments/20070927/2831bc96/attachment.bin>


More information about the fluid-work mailing list