I am writing a java webapp, but the bulk of the codebase is actually browser-side javascript, which depends on dojo, and uses qunit for unit testing. With serious abuse of maven and git I was able to wire in javascript unit testing and javascript dependencies. However I cannot get pom.xml into a shape where both maven command line and eclipse maven plugin would be able to compile and test the whole project. Moreover neither sonar can realize the project have javascript components, nor eclipse can help much with the javascript parts. For reference the project is here: https://github.com/magwas/worldmodel/
What would be the correct project structure to have one war in the end of the day which contains all the javascript with dependencies, unit tested, analized (with sonar), and ready to submit to jenkins?
I have found http://mojo.codehaus.org/javascript-maven-tools/, but I don't know whether
- is putting the javascript part to a separate project better, and if so, how should it be included in the java one?
- how should I handle the dependencies (dojo, dijit & quint)?
I realize it is a complex question, pointers to documentation or source code of projects which have already solved it would be welcome.