Javascript plugin that enables dependency management of *.js libraries like Maven plugin does

We have a common javascript libraries that should be shared across different project. Our idea is to have a separate project for javascripts that will deploy artifact *.js into our local maven archiva repository. The structure of the artifact should be the same as of the Java artifacts.

Then in the other projects we will declare a dependency on our javascript libraries and the plugin will fetch the libraries from repository and copy it to specified location, even with transient dependencies.

The above mentioned works (somehow) in Maven plugin javascript-maven-plugin from Codehaus.

Yeap this would be a killer feature

Maybe WebJars would work?

Have you lookes at node.js