smh/grunt-maven-tasks — pull request #23 by bertvh (2014-08-11 19:11:37+00:00)
Title: Adds support for jar files (in order to create webjars)

See http://webjars.org. Create a webjar like this:

var artifactOptions = {
groupId: 'com.example',
artifactId: 'example-artifact',
version: '1.0-SNAPSHOT'
};

maven: {
options: artifactOptions,
install: {
options: {
goal: 'install',
packaging: 'zip',
type: 'jar',
injectDestFolder: false,
url: 'file://a-repo'
},
expand: true,
cwd: 'target/',
src: ['**/*.*'],
//dest: '/META-INF/resources/webjars/' + artifactOptions.artifactId + '/' + artifactOptions.version
}
}

Also a small refactoring to avoid duplicate code. Does not add unit tests for the jar part (that would require some work restructuring the unit test approach)