You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract the creation of the web.xml file from the current plugin and allow it to be injected into the current stream.
Until there is a way to intelligently determine the contents of the web.xml file there isn't much sense in this plugin for now. A web.xml file should be in every JEE web app to begin with. If there isn't one, then the servers cannot infer any information about the contents of the .war file. Generating a default web.xml doesn't appear to have many use cases unless there was a way to template the file and then insert dynamic servlets or welcome files.
Example:
varwar=require('gulp-war'),warwebxml=require('gulp-war/web-xml');// Quick Versiongulp.task('war',function(){gulp.src(["src/main/webapp/**"],{base: "src/main/webapp"}).pipe(webxml({displayName: "My WebApp"}).pipe(war({target: "MyWebApp.war"}).pipe(gulp.dest("target"));});// Complicated Versiongulp.task('war',function(){gulp.src(["src/main/webapp/**"],{base: "src/main/webapp"})// Does this plugin make any sense? Why would a build process ever generate// this file? It would seem more suitable if there was a way to feed this plugin// a list of available Servlets which had been annotated. But the spec already handles this. .pipe(webxml({// [Optional]version: "3.0",// Validate the config based on the version used.// [Required]displayName: "My WebApp",// [Optional]description: "My Description",// [Optional]welcome: ["index","welcome"],// Perhaps this can be derived via some Annotations in the Java Code.// [Optional]servlets: [{name: 'dispatcher',displayName: 'MyDispatcher',pattern: '/*',class: 'org.foo.MyServlet',loadOnStartup: "0",initParams: ["bgColor": "#FFFFFF"]}]})).pipe(war({displayName: 'Grunt WAR',type: "war",target: 'MyWebApp'})).pipe(gulp.dest("target"));});
The text was updated successfully, but these errors were encountered:
Extract the creation of the web.xml file from the current plugin and allow it to be injected into the current stream.
Until there is a way to intelligently determine the contents of the web.xml file there isn't much sense in this plugin for now. A web.xml file should be in every JEE web app to begin with. If there isn't one, then the servers cannot infer any information about the contents of the .war file. Generating a default web.xml doesn't appear to have many use cases unless there was a way to template the file and then insert dynamic servlets or welcome files.
Example:
The text was updated successfully, but these errors were encountered: