Re: Using maven for JavaScript projects
. 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 [EMAIL PROTECTED] : 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:[EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] ] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Harlan Iverson http://blog.devspan.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
RE: Using maven for JavaScript projects
This looks good. I'm looking forward to contributing. If we can produce a unified view on how to develop js I don't see any reason not to adopt this. Rich -Original Message- From: nicolas de loof [mailto:[EMAIL PROTECTED] Sent: 01 October 2007 06:10 To: Maven Users List Subject: Re: Using maven for JavaScript projects I've created a wiki entry (http://hammerfest.wiki.sourceforge.net/mavan-javascript-tools) to resume the ideas exposed in this thread. please be nice and don't blame me for my ugly english ;-) (any native english reader is welcome to fix my linguistics errors) Nico 2007/9/27, Adam Altemus [EMAIL PROTECTED]: Hey all, Sorry for coming into this discussion late. If anyone wants to use anything from our JavaScript plugin, feel free to help yourself. It can be found at http://ossi.mobilvox.com/maven-js-plugin or http://sf.net/projects/maven-js-plugin We're using a modded version of JsMin, which has shown a higher compression ratio than DOJO's Shrinksafe. Also, we put in a few other features to customize the compression and what can be done with it. I'd like to contribute more to this but, time is not on my side so to speak right now. This is definitely cool stuff though. Thanks, Adam http://www.mobilvox.com On 9/27/07, Harlan Iverson [EMAIL PROTECTED] wrote: Yea, definitely alright and encouraged :) The first project is GPL soon to be LGPL, but the POM I'd consider to be whatever Selenium is since I mostly took my executions from there; and the second is MIT. Harlan On 9/27/07, nicolas de loof [EMAIL PROTECTED] wrote: Thanks a lot for those links, i'll take a look tomorow. Is it ok with you that I pick up code and/or ideas from this projects ? I didn't found a License notice on the first one. The second one is MIT-licensed, not sure if I can get code an re-package it under apache license ? Nico. 2007/9/27, Harlan Iverson [EMAIL PROTECTED]: 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 [EMAIL PROTECTED] 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
Re: Using maven for JavaScript projects
I've created a work-in-progress page : http://hammerfest.wiki.sourceforge.net/maven-javascript-plugin++Work+in+Progress The proposed lifecycle is : process-sources : ability to merge multiple individual js files into one (or more ?) js using a assembly schema. compile : copy js to target/scripts test : run jsunit (or other ?) tests package : archiva target/scripts into a custom .jsar archive format install deploy also provide a copydependency mojo to be used in web application to handle jsar dependencies. 2007/10/1, Richard Chamberlain [EMAIL PROTECTED]: This looks good. I'm looking forward to contributing. If we can produce a unified view on how to develop js I don't see any reason not to adopt this. Rich -Original Message- From: nicolas de loof [mailto:[EMAIL PROTECTED] Sent: 01 October 2007 06:10 To: Maven Users List Subject: Re: Using maven for JavaScript projects I've created a wiki entry (http://hammerfest.wiki.sourceforge.net/mavan-javascript-tools) to resume the ideas exposed in this thread. please be nice and don't blame me for my ugly english ;-) (any native english reader is welcome to fix my linguistics errors) Nico 2007/9/27, Adam Altemus [EMAIL PROTECTED]: Hey all, Sorry for coming into this discussion late. If anyone wants to use anything from our JavaScript plugin, feel free to help yourself. It can be found at http://ossi.mobilvox.com/maven-js-plugin or http://sf.net/projects/maven-js-plugin We're using a modded version of JsMin, which has shown a higher compression ratio than DOJO's Shrinksafe. Also, we put in a few other features to customize the compression and what can be done with it. I'd like to contribute more to this but, time is not on my side so to speak right now. This is definitely cool stuff though. Thanks, Adam http://www.mobilvox.com On 9/27/07, Harlan Iverson [EMAIL PROTECTED] wrote: Yea, definitely alright and encouraged :) The first project is GPL soon to be LGPL, but the POM I'd consider to be whatever Selenium is since I mostly took my executions from there; and the second is MIT. Harlan On 9/27/07, nicolas de loof [EMAIL PROTECTED] wrote: Thanks a lot for those links, i'll take a look tomorow. Is it ok with you that I pick up code and/or ideas from this projects ? I didn't found a License notice on the first one. The second one is MIT-licensed, not sure if I can get code an re-package it under apache license ? Nico. 2007/9/27, Harlan Iverson [EMAIL PROTECTED]: 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
Re: Using maven for JavaScript projects
On Today at 7:09am, ndl=nicolas de loof [EMAIL PROTECTED] wrote: ndl I've created a wiki entry ndl (http://hammerfest.wiki.sourceforge.net/mavan-javascript-tools) ndl to resume the ideas exposed in this thread. ndl ndl please be nice and don't blame me for my ugly english ;-) ndl (any native english reader is welcome to fix my linguistics errors) ndl Hi Nico, Could you add another js tool to the list? I haven't started using it, but it also looks promising in the link/compress category. Its the yuicompressor-maven-plugin http://alchim.sourceforge.net/yuicompressor-maven-plugin/overview.html based on YUICompressor: http://www.julienlecomte.net/blog/2007/09/28/yui-compressor-version-221-now-available/ http://www.julienlecomte.net/yuicompressor/ ndl Nico ndl Later, -- Haroon Rafique [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
On Today at 9:56am, HR=Haroon Rafique [EMAIL PROTECTED] wrote: HR HR Hi Nico, HR HR Could you add another js tool to the list? I haven't started using it, but HR it also looks promising in the link/compress category. HR HR Its the yuicompressor-maven-plugin HR http://alchim.sourceforge.net/yuicompressor-maven-plugin/overview.html HR based on YUICompressor: HR http://www.julienlecomte.net/blog/2007/09/28/yui-compressor-version-221-now-available/ HR http://www.julienlecomte.net/yuicompressor/ HR Sorry for the noise. I looked up my sourceforge ID and reset the password and updated the wiki with an entry for YUI Compressor Maven Plugin. Cheers, -- Haroon Rafique [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
I plan to add support for the yahoo compressor. I have some issues with the dojo one (needs to reset the rhino context, and found no way to do so) I'll look at the plugin you pointed, thanks. 2007/10/1, Haroon Rafique [EMAIL PROTECTED]: On Today at 9:56am, HR=Haroon Rafique [EMAIL PROTECTED] wrote: HR HR Hi Nico, HR HR Could you add another js tool to the list? I haven't started using it, but HR it also looks promising in the link/compress category. HR HR Its the yuicompressor-maven-plugin HR http://alchim.sourceforge.net/yuicompressor-maven-plugin/overview.html HR based on YUICompressor: HR http://www.julienlecomte.net/blog/2007/09/28/yui-compressor-version-221-now-available/ HR http://www.julienlecomte.net/yuicompressor/ HR Sorry for the noise. I looked up my sourceforge ID and reset the password and updated the wiki with an entry for YUI Compressor Maven Plugin. Cheers, -- Haroon Rafique [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
/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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] ] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Harlan Iverson http://blog.devspan.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Harlan Iverson http://blog.devspan.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
recommandation for JS packaging ? (was Using maven for JavaScript projects)
What would be the better way to package JS libs ? - option 1 : use existing WAR packaging with war overlay good : Works today with no change, just requires us to agree on a common folder for scripts bad : cannot be used with jetty:run as the weapp is not packaged - option 2 : use js packaged into a jar, and a custom plugin to unpack. js:inplace to unpack into src/main/webapp, prior to lauching jetty:run js:unpack to unpack during the package phase. - other ? Nico. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: recommandation for JS packaging ? (was Using maven for JavaScript projects)
nicolas de loof wrote: What would be the better way to package JS libs ? - option 1 : use existing WAR packaging with war overlay good : Works today with no change, just requires us to agree on a common folder for scripts bad : cannot be used with jetty:run as the weapp is not packaged - option 2 : use js packaged into a jar, and a custom plugin to unpack. js:inplace to unpack into src/main/webapp, prior to lauching jetty:run js:unpack to unpack during the package phase. Option 2 is the preferred way for me, mostly because WAR overlaying can only help with, well, web apps. I'm working on that along with a ServletFilter that can be used as a dependency (maybe war overlay?) in web projects. I'm not through with the details though and was going to ask here for suggestions. So, a very rough outline: - Provide JS packaging of projects as JAR artifacts - Provide a library that can be used as a dependency by web apps. The lib contains, basically, a Servlet Filter listening to *.js and builds/caches the HTTP response after pulling and maybe compressing the JS code from the classpath - Provide something equally useful for non-webapp projects Some questions: - What kind of metadata would be useful in what one would consider as the standard way to package JS-based JAR artifacts? - What kind of metadata would be useful for libs utilizing that packaging? - Can WAR overlaying be used to bring that Servlet Filter in a web-app, along with the appropriate web.xml markup? There more details but that gives the general idea. I have not yet formed an opinion on how useful knowledge on JS dependencies (i.e. script1.js was requested but the client has not received a dependency, sript2.js yet) is on runtime. WDYT? Many thanks, Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: recommandation for JS packaging ? (was Using maven for JavaScript projects)
I agree with the js packaging. It works fine for js libs like prototype that is build based on multiple JS but pakcage as a single file. It works less with scriptaculous, dojo or yahooUI that comes with multiple JS with a internal JS-level dependency loading strategy. For those one, this would require one artifact per js file, and maybe a parent POM to declare all of them as dependencies. I'm writing a js:inplace Mojo based on this idea. Nico. 2007/9/28, Richard Chamberlain [EMAIL PROTECTED]: This is definitely I'm struggling with at the moment: We have 2 artefacts for each js module: 1) one compressed module.js file 2) the source in multiple files, containing a module.js that document.writes out script tags for each file. This is used for debugging. Currently I package with a zip and a task to unzip when retrieved. I'd be interested if this could be made neater. One option (touched on before on this list) is to only ever produce a single .js file for each module and have js packaging. Unfortunately there would still need to be a copy task to move it from your local repository under your web context. Cheers, Rich -Original Message- From: nicolas de loof [mailto:[EMAIL PROTECTED] Sent: 28 September 2007 15:10 To: Maven Users List Subject: recommandation for JS packaging ? (was Using maven for JavaScript projects) What would be the better way to package JS libs ? - option 1 : use existing WAR packaging with war overlay good : Works today with no change, just requires us to agree on a common folder for scripts bad : cannot be used with jetty:run as the weapp is not packaged - option 2 : use js packaged into a jar, and a custom plugin to unpack. js:inplace to unpack into src/main/webapp, prior to lauching jetty:run js:unpack to unpack during the package phase. - other ? Nico. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: recommandation for JS packaging ? (was Using maven for JavaScript projects)
I started tinkering with the war overlay method just a few days ago, so I may be missing some things. But so far it seems like a flexible enough solution that it would be a good way to go. I like it because: * can use it today * flexibility to put resources anywhere in the app one might need * there needs to be an accepted convention, as you say, which may be an argument for custom packaging plug-in * solution could be a 'scriptDirectory' or similar attribute in war plugin configuration. * webapp and script artifact can use the same testing tools (jsunit, selenium, etc) without duplicating effort. The first is important for me because I have software that I want to ship. The second is important because there are lots of use cases to take into consideration for packaging. What if somebody wants resources outside of their script directory? That may not be accepted for a general purpose script artifact, but I can see that being a common want for in-house or application-specific artifacts. What if somebody wants a servlet that goes with their script, with configuration? I suppose they could put it into a separate artifact (I'm not completely familiar with best practice for that sort of thing), but I can see times when that would be annoying. The third is the biggest win for war packaging, IMO. With the war plugin, it's only a matter of making conventions, not thinking out logistics of what the packaging should do. It would also allow normal web artifact to take advantage of any testing tools such as jsunit or selenium in the same way as a script artifact would. There are some cons to it too though: * Must use 'test' scope for dependencies to be available when jsunit is run (or 'provided' works when there are no tests); either of these packs the dependencies into the final war. But if you use 'runtime', all dependencies are packed into the dependent artifact. This could be a win for custom packaging. * Burden is on plug-in developers to follow whatever convention is schemed up. To sum it up, I think a balanced solution would be to add a 'scriptDirectory' or similar attribute to the war plugin, with a sensible default like src/main/webapp/scripts, which any script library such as jsunit or yuicompressor could use. It would save effort of developing the packaging, and it would save effort for plugin developers like selenium and jsunit from having to support two different packagings. Harlan On 9/28/07, nicolas de loof [EMAIL PROTECTED] wrote: What would be the better way to package JS libs ? - option 1 : use existing WAR packaging with war overlay good : Works today with no change, just requires us to agree on a common folder for scripts bad : cannot be used with jetty:run as the weapp is not packaged - option 2 : use js packaged into a jar, and a custom plugin to unpack. js:inplace to unpack into src/main/webapp, prior to lauching jetty:run js:unpack to unpack during the package phase. - other ? Nico. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Harlan Iverson http://blog.devspan.com
RE: recommandation for JS packaging ? (was Using maven for JavaScript projects)
This is definitely I'm struggling with at the moment: We have 2 artefacts for each js module: 1) one compressed module.js file 2) the source in multiple files, containing a module.js that document.writes out script tags for each file. This is used for debugging. Currently I package with a zip and a task to unzip when retrieved. I'd be interested if this could be made neater. One option (touched on before on this list) is to only ever produce a single .js file for each module and have js packaging. Unfortunately there would still need to be a copy task to move it from your local repository under your web context. Cheers, Rich -Original Message- From: nicolas de loof [mailto:[EMAIL PROTECTED] Sent: 28 September 2007 15:10 To: Maven Users List Subject: recommandation for JS packaging ? (was Using maven for JavaScript projects) What would be the better way to package JS libs ? - option 1 : use existing WAR packaging with war overlay good : Works today with no change, just requires us to agree on a common folder for scripts bad : cannot be used with jetty:run as the weapp is not packaged - option 2 : use js packaged into a jar, and a custom plugin to unpack. js:inplace to unpack into src/main/webapp, prior to lauching jetty:run js:unpack to unpack during the package phase. - other ? Nico. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: recommandation for JS packaging ? (was Using maven for JavaScript projects)
I myself like the war overlay idea as this allow not just JS to be packaged, but also any static resources, like css stylesheets : consider webapp skins, maanged as separate projects, and applied to all apps in a company ! BUT I don't like that it cannot be used with lightweight servlet engine jetty using the jetty:run goal... Nico. 2007/9/28, Manos Batsis [EMAIL PROTECTED]: nicolas de loof wrote: What would be the better way to package JS libs ? - option 1 : use existing WAR packaging with war overlay good : Works today with no change, just requires us to agree on a common folder for scripts bad : cannot be used with jetty:run as the weapp is not packaged - option 2 : use js packaged into a jar, and a custom plugin to unpack. js:inplace to unpack into src/main/webapp, prior to lauching jetty:run js:unpack to unpack during the package phase. Option 2 is the preferred way for me, mostly because WAR overlaying can only help with, well, web apps. I'm working on that along with a ServletFilter that can be used as a dependency (maybe war overlay?) in web projects. I'm not through with the details though and was going to ask here for suggestions. So, a very rough outline: - Provide JS packaging of projects as JAR artifacts - Provide a library that can be used as a dependency by web apps. The lib contains, basically, a Servlet Filter listening to *.js and builds/caches the HTTP response after pulling and maybe compressing the JS code from the classpath - Provide something equally useful for non-webapp projects Some questions: - What kind of metadata would be useful in what one would consider as the standard way to package JS-based JAR artifacts? - What kind of metadata would be useful for libs utilizing that packaging? - Can WAR overlaying be used to bring that Servlet Filter in a web-app, along with the appropriate web.xml markup? There more details but that gives the general idea. I have not yet formed an opinion on how useful knowledge on JS dependencies (i.e. script1.js was requested but the client has not received a dependency, sript2.js yet) is on runtime. WDYT? Many thanks, Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
I also started a javascript plugin. The first mojo is a compressor based on Dojo shrinksafe. The main advantage of this compressor is that it is based on Rhino, a Java JS runtime, and so ensure the compressed code IS strictly equivalent to the original one. https://hammerfest.svn.sourceforge.net/svnroot/hammerfest/maven-javascript-plugin/trunk/ Nico. 2007/9/26, Manos Batsis [EMAIL PROTECTED]: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using maven for JavaScript projects
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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
Hello, Just jumping in to show my interest. I have started working on tool for javascript analysis based on jslinker, a somewhat dead or zombie project in dojo. And of course, I want to integrate it with maven (I started by mavenizing jslinker which is quite a mess). As there seems to be some interest in providing some javascript tool for maven, I would be happy to contribute ideas and time to this. As of now, I modified the jslinker parser to handle javascript 1.7 constructs. There are some tools in jslinker that I want to investigate, and my first serious objectives would be a metrics tool: McCabe complexity on functions, sloc count per function/file/directory, coupling (??)... Regards, -- OQube software engineering \ génie logiciel Arnaud Bailly, Dr. \web http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using maven for JavaScript projects
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:[EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]: 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
Re: Using maven for JavaScript projects
Sourceforge has a patch entry in tracker (http://sourceforge.net/tracker/?atid=717014group_id=128899func=browse) You can also send it to me at [EMAIL PROTECTED] Thanks a lot for contributing. 2007/9/27, Insitu [EMAIL PROTECTED]: If I want to contribute something, where do I send patches ? -- OQube software engineering \ génie logiciel Arnaud Bailly, Dr. \web http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
Thanks a lot for those links, i'll take a look tomorow. Is it ok with you that I pick up code and/or ideas from this projects ? I didn't found a License notice on the first one. The second one is MIT-licensed, not sure if I can get code an re-package it under apache license ? Nico. 2007/9/27, Harlan Iverson [EMAIL PROTECTED]: 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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
Re: Using maven for JavaScript projects
Yea, definitely alright and encouraged :) The first project is GPL soon to be LGPL, but the POM I'd consider to be whatever Selenium is since I mostly took my executions from there; and the second is MIT. Harlan On 9/27/07, nicolas de loof [EMAIL PROTECTED] wrote: Thanks a lot for those links, i'll take a look tomorow. Is it ok with you that I pick up code and/or ideas from this projects ? I didn't found a License notice on the first one. The second one is MIT-licensed, not sure if I can get code an re-package it under apache license ? Nico. 2007/9/27, Harlan Iverson [EMAIL PROTECTED]: 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] 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
Re: Using maven for JavaScript projects
nicolas de loof wrote: 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 ? Through Rhino. A simple way is to call his Main.exec, the other is a bit more complicated and involves putting java variables in the JS evaluation scope. See the JSDoc [1] and JSLint [2] reports respectively. Would you like to colaborate on a common javascript plugin ? Would you publish it as part of the Mojo project ? Would not be against that, but currently such a mojo does not exist there. In the mean time both me/abiss.gr and (i believe) Ross are open on collaboration using the SF project and publish the lot under the apache license v2. My personal next priority is ECMAUnit as it is a lot easier to use than JSUnit, as well as a compression mojo (although the mobilvox js plugin works really great for me). Finally, IMHO we need to figure out a maven packaging scheme and plugins that will allow projects to use JS libraries as dependencies to web or other projects (JS or Java). I have expressed interest on this in the past but... [1] http://mvn-jstools.cvs.sourceforge.net/mvn-jstools/maven-jstools-plugin/src/main/java/gr/abiss/mvn/plugins/jstools/JsDocMojo.java?view=markup [2] http://mvn-jstools.cvs.sourceforge.net/mvn-jstools/maven-jstools-plugin/src/main/java/gr/abiss/mvn/plugins/jstools/JsLintMojo.java?view=markup Cheers, Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
Dan Tran wrote: any plan to deploy a site? There is a snapshot online [1] but the documentation is simply non-existent. I intent to make a release after a few code changes and when the documentation is acceptable (just need a week or so). [1] http://dev.abiss.gr/mvn-jstools/ Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
for people who want to use maven for JavaScript. -Original Message- From: nicolas de loof [mailto:[EMAIL PROTECTED] 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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]: 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:[EMAIL PROTECTED] ] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Harlan Iverson http://blog.devspan.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Harlan Iverson http://blog.devspan.com
Using maven for JavaScript projects
Hi, Has anyone had any experience in using maven for JavaScript libraries? e.g integration with JSUnit, Selenium or compression tools? Are there any resources about this topic? I've had a look around but there doesn't seem to be anything much on the subject. Thanks, Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
any plan to deploy a site? -D On 9/26/07, Manos Batsis [EMAIL PROTECTED] wrote: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]