diff options
author | Shawn O. Pearce <sop@google.com> | 2009-12-18 18:30:45 -0800 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-12-18 18:30:45 -0800 |
commit | d554cc21ad620833b8ff98c2b9d6b01348da087c (patch) | |
tree | d7eace50581d365ae6cf0a22d411b5c3d0732c0f /gerrit-gwtdebug | |
parent | a06dc11ffe5a81242dcdb571c411576316aa12fa (diff) |
Update to GWT 2.0.0
Unfortunately GWT now requires the gwt.codesvr query parameter in the
URL anytime we load our host page with GWT code in it. To ensure it
is always present we save it into a cookie during startup and redirect
back to ourselves with the parameter added back into the URL if it was
not already present.
Since this block of JavaScript isn't needed in production we strip it
out of the host page unless our magical system property has been set
to true indicating we were launched through our debug launcher.
We also no longer strongly name the nocache file if we are in the
GWT development mode.
Change-Id: Ia7a91f66e21088ba269410d76461fe0be4480825
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'gerrit-gwtdebug')
-rw-r--r-- | gerrit-gwtdebug/pom.xml | 1 | ||||
-rw-r--r-- | gerrit-gwtdebug/src/main/java/com/google/gerrit/gwtdebug/GerritDebugLauncher.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gerrit-gwtdebug/pom.xml b/gerrit-gwtdebug/pom.xml index f16410d5fe..2b3c3f9b4e 100644 --- a/gerrit-gwtdebug/pom.xml +++ b/gerrit-gwtdebug/pom.xml @@ -36,7 +36,6 @@ limitations under the License. <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-dev</artifactId> - <classifier>${platform}</classifier> </dependency> <dependency> diff --git a/gerrit-gwtdebug/src/main/java/com/google/gerrit/gwtdebug/GerritDebugLauncher.java b/gerrit-gwtdebug/src/main/java/com/google/gerrit/gwtdebug/GerritDebugLauncher.java index d5f913a6ab..a761d49b74 100644 --- a/gerrit-gwtdebug/src/main/java/com/google/gerrit/gwtdebug/GerritDebugLauncher.java +++ b/gerrit-gwtdebug/src/main/java/com/google/gerrit/gwtdebug/GerritDebugLauncher.java @@ -344,6 +344,8 @@ public class GerritDebugLauncher extends ServletContainerLauncher { System.getProperty("build.compiler", "org.eclipse.jdt.core.JDTCompilerAdapter"); System.setProperty("build.compiler", antJavaC); + + System.setProperty("Gerrit.GwtDevMode", "" + true); } @Override @@ -378,6 +380,10 @@ public class GerritDebugLauncher extends ServletContainerLauncher { File app = new File(top, "gerrit-war/src/main/webapp"); File webxml = new File(app, "WEB-INF/web.xml"); + // Jetty won't start unless this directory exists. + if (!warDir.exists() && !warDir.mkdirs()) + logger.branch(TreeLogger.ERROR, "Cannot create "+warDir, null); + // Create a new web app in the war directory. // WebAppContext wac = |