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.
com.google.gwt
gwt-dev
- ${platform}
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 =
diff --git a/gerrit-gwtui/pom.xml b/gerrit-gwtui/pom.xml
index 4870981eb5..e9787150ee 100644
--- a/gerrit-gwtui/pom.xml
+++ b/gerrit-gwtui/pom.xml
@@ -38,7 +38,7 @@ limitations under the License.
com.google.gwt
gwt-user
${gwtVersion}
- provided
+ compile
@@ -151,7 +151,7 @@ limitations under the License.
org.codehaus.mojo
gwt-maven-plugin
- 1.1
+ 1.2
com.google.gerrit.GerritGwtUI
-Xmx512m
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java
index d823db5fee..35afda5c50 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java
@@ -26,6 +26,9 @@ import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
@@ -41,6 +44,8 @@ import javax.servlet.http.HttpServletResponse;
@SuppressWarnings("serial")
@Singleton
public class BecomeAnyAccountLoginServlet extends HttpServlet {
+ private static final boolean IS_DEV = Boolean.getBoolean("Gerrit.GwtDevMode");
+
private final SchemaFactory schema;
private final Provider webSession;
private final Provider urlProvider;
@@ -56,12 +61,17 @@ public class BecomeAnyAccountLoginServlet extends HttpServlet {
urlProvider = up;
final String pageName = "BecomeAnyAccount.html";
- final String doc = HtmlDomUtil.readFile(getClass(), pageName);
+ final Document doc = HtmlDomUtil.parseFile(getClass(), pageName);
if (doc == null) {
throw new FileNotFoundException("No " + pageName + " in webapp");
}
-
- raw = doc.getBytes(HtmlDomUtil.ENC);
+ if (!IS_DEV) {
+ final Element devmode = HtmlDomUtil.find(doc, "gerrit_gwtdevmode");
+ if (devmode != null) {
+ devmode.getParentNode().removeChild(devmode);
+ }
+ }
+ raw = HtmlDomUtil.toUTF8(doc);
}
@Override
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/HostPageServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/HostPageServlet.java
index 14277a3f95..9bc82d346d 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/HostPageServlet.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/HostPageServlet.java
@@ -50,6 +50,8 @@ import javax.servlet.http.HttpServletResponse;
@SuppressWarnings("serial")
@Singleton
public class HostPageServlet extends HttpServlet {
+ private static final boolean IS_DEV = Boolean.getBoolean("Gerrit.GwtDevMode");
+
private final Provider currentUser;
private final GerritConfig config;
private final Document hostDoc;
@@ -67,7 +69,14 @@ public class HostPageServlet extends HttpServlet {
throw new FileNotFoundException("No " + pageName + " in webapp");
}
- fixModuleReference(hostDoc, servletContext);
+ if (!IS_DEV) {
+ final Element devmode = HtmlDomUtil.find(hostDoc, "gerrit_gwtdevmode");
+ if (devmode != null) {
+ devmode.getParentNode().removeChild(devmode);
+ }
+ fixModuleReference(hostDoc, servletContext);
+ }
+
injectCssFile(hostDoc, "gerrit_sitecss", site.site_css);
injectXmlFile(hostDoc, "gerrit_header", site.site_header);
injectXmlFile(hostDoc, "gerrit_footer", site.site_footer);
diff --git a/gerrit-httpd/src/main/resources/com/google/gerrit/httpd/auth/become/BecomeAnyAccount.html b/gerrit-httpd/src/main/resources/com/google/gerrit/httpd/auth/become/BecomeAnyAccount.html
index 2cd6a84824..a27df22c38 100644
--- a/gerrit-httpd/src/main/resources/com/google/gerrit/httpd/auth/become/BecomeAnyAccount.html
+++ b/gerrit-httpd/src/main/resources/com/google/gerrit/httpd/auth/become/BecomeAnyAccount.html
@@ -1,7 +1,34 @@
-
Gerrit Code Review
+
-
-
- gwt-dev-windows
-
- windows
-
-
- true
-
- windows
-
-
-
-
-
- gwt-dev-mac
-
- mac
-
-
- false
-
- mac
-
-
-
-
-
- gwt-dev-linux
-
- linux
-
-
- false
-
- linux
-
-
-
-
-
jgit-repository
diff --git a/tools/gwtui_any.launch b/tools/gwtui_dbg.launch
similarity index 96%
rename from tools/gwtui_any.launch
rename to tools/gwtui_dbg.launch
index 402f041ca2..153524030d 100644
--- a/tools/gwtui_any.launch
+++ b/tools/gwtui_dbg.launch
@@ -13,7 +13,6 @@
-
@@ -28,9 +27,9 @@
-
+
-
+
diff --git a/tools/gwtui_mac.launch b/tools/gwtui_mac.launch
deleted file mode 100644
index dca7b45149..0000000000
--- a/tools/gwtui_mac.launch
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-