MorrisLLC/grunt-war — pull request #4 by jbenner (2014-04-04 15:18:15+00:00)
Title: Move node-zip require inside war task config

When creating multiple WAR's with different source files included, the source files from previous WAR configurations are always included in latter WAR's.

Example: a war.foo task is configured to include source files from dist/foo as foo.war, and a war.bar task is configured to include source files from dist/bar as bar.war. The result is foo.war contains all files from dist/foo, and bar.war contains all files from dist/bar AND dist/foo.

This is due to requiring node-zip once for all iterations of the WAR task; initializing a fresh instance of node-zip by moving the require inside Grunt task registration produces the expected behavior of war.foo containing dist/foo, and war.bar containing dist/bar.