A Java WAR file generator plugin for Gulp
npm install gulp-wargulp-war as a development dependency
shell
npm install --save-dev gulp-war
npm install --save-dev gulp-zip
`
Then, add it to your gulpfile.js:
`javascript
gulp.task('war', function () {
gulp.src([".js", ".md", "test/*.js"])
.pipe(war({
welcome: 'index.html',
displayName: 'Grunt WAR',
}))
.pipe(zip('myApp.zip'))
.pipe(gulp.dest("./dist"));
});
`
API
$3
#### options.welcome
Type: String
#### options.displayName
Type: String
#### options.version
Type: String
Defines the version of web-app xml specification to use. By default "3.0".
#### options.schemaLocation
Type: String
Defines the URI of web-app xml specification to use. By default http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd
#### options.webappExtras
Type: Array`