siasia/xsbt-web-plugin — Issue #45: Better extensibility (for sbt-gwt-plugin)
Author: samskivert
Created: 2011-10-16 19:15:07+00:00
State: open

I'm trying to bring the gwt-plugin up to date with the new structure of the web-plugin, but I'm running into some issues.

One issue is that the prepareWebapp task went away, which the gwt-plugin made use of when running GWT devmode (which requires that the contents of src/main/webapp be copied into target). I looked into splitting packageWarTask back into prepareWarTask and packageWarTask, but the package task collects all of the files copied into the target directory and uses that info to prune any files that remain.

I was considering having prepareWarTask return a Set[File] enumerating the files it copied into target so that packageWarTask could make use of it, but that brings me to the second issue.

The gwt-plugin also needs to run the GWT compiler which generates javascript and other files which are placed into the target. This happens as a separate task (gwtCompileTask) which previously was added as a dependency to packageWarTask so that GWT compilation would take place before packaging. Now, it will be necessary to somehow communicate the generated files to packageWarTask so that it doesn't delete them.

I could perhaps have the GWT compiler task generate its output into target / "gwt" and the WarPlugin could have a mechanism for adding additional webappResources which would then get picked up during the copy phase.

Does this sound reasonable? I'll try to scrounge up the time to make these changes and submit a pull request, but if you think it's a crazy idea in the first place, let me know and we can come up with a different approach.