WebGoat/WebGoat — pull request #2 by dcowden (2014-08-23 17:36:12+00:00)
Title: Self-contained, multi-platform executable package

This pull request looks scarier than it is, because i moved a lot of files to their standard maven places.

Changes made were:
* move files to the standard Maven layout,
* simplified pom accordingly
* added tomcat-exec-war plugin. during the package phase, maven will build an executable jar file that will run WebGoat in an embedded tomcat.

I tested the self-executing jar on these two platforms:
ubuntu x64 14.x, java 7
windows 7 x64, java 7

* Updated instructions-- now they are the same on all platforms, because you just run the jar file. Developers should use mvn tomcat:run-war to run ( again, with an embedded tomcat, after making source changes)
* removed build.xml-- this old ant file was mostly about building zips with embedded tomcats, and handling different ways to run it on different platforms

This approach works well because customized tomcat files ( tomcat-users.xml, server.xml ) are shared between the tomcat:run-war and tomcat:war-exec plugins. Any files that are needed in tomcat/conf go in src/main/tomcatconf

Though i think this already works better than the previous deployment mechanism, Rick and I think that any lessons that need source code changes should be handled with dynamic scripts that are stored in the database and exposed through the GUI. It is simply too heavy of a lift to be modifying the WebGoat source. It woudl be much better if no IDE/maven/ etc was necesary, and all code changes needed could be done in the browser. This could be handled by exposing scripts in javascript or groovy and storing in the database.