Switch to GWT 1.6's new HostedMode debugging utility
The pain in the neck thing is, we have to use their new WAR style output, which requires us to run "mvn war:inplace" before we can start debugging, or if any dependencies change, but we also need to clean that out. All RPC handles also moved inside of the module directory, which makes it easier to debug in the hosted mode browser but breaks any existing browser client, even though the JSON payloads have not changed in format. Bug: GERRIT-75 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
fa0c7537af
commit
8d2f184389
4
.gitignore
vendored
4
.gitignore
vendored
@ -6,6 +6,6 @@
|
||||
/src/main/java/GerritServer.properties
|
||||
/src/main/java/com/google/gerrit/client/GerritVersion.properties
|
||||
/src/main/java/com/google/gerrit/client/GerritVersion_*.properties
|
||||
/gwt_www
|
||||
/tomcat
|
||||
/src/main/webapp/gerrit
|
||||
/src/main/webapp/WEB-INF/lib
|
||||
/hs_err_pid*.log
|
||||
|
@ -23,7 +23,7 @@ Create a user library called `GWT_16`:
|
||||
* Java > Build Path > User Libraries
|
||||
|
||||
* New
|
||||
* Name: `GWT`
|
||||
* Name: `GWT_16`
|
||||
* Add JARs...
|
||||
|
||||
* Select `gwt-user.jar` from the $(GWT_SDK) directory.
|
||||
@ -78,6 +78,27 @@ instructions in link:dev-readme.html[Developer Setup].
|
||||
* Copy `GerritServer.properties_example` to `GerritServer.properties`
|
||||
* Configure your database for debugging in hosted mode.
|
||||
|
||||
Bootstrap Compile
|
||||
-----------------
|
||||
|
||||
From the command line we have to bootstrap the environment:
|
||||
|
||||
----
|
||||
./to_hosted.sh
|
||||
----
|
||||
|
||||
Production Compile
|
||||
------------------
|
||||
|
||||
*Always* use
|
||||
|
||||
----
|
||||
mvn clean package
|
||||
----
|
||||
|
||||
to create a production build. The `./to_hosted.sh` used above
|
||||
to setup the development environment for Eclipse hosted mode also
|
||||
creates a state that produces a corrupt production build.
|
||||
|
||||
Launch Gerrit
|
||||
-------------
|
||||
@ -88,19 +109,6 @@ Under Java Application find `gerrit_debug` (not Mac OS X)
|
||||
or `gerrit_macos` (Mac OS X only) to start the GWT hosted
|
||||
mode browser and debug through Eclipse.
|
||||
|
||||
SSH Daemon
|
||||
~~~~~~~~~~
|
||||
|
||||
To get the SSH daemon started when running in hosted mode, you need
|
||||
to manually hit the `ssh_info` URL to force the servlet initialize
|
||||
and bind the daemon on port 29418 (or whatever you have it configured
|
||||
to in `system_config`).
|
||||
|
||||
----
|
||||
curl http://localhost:8888/com.google.gerrit.Gerrit/ssh_info
|
||||
----
|
||||
|
||||
|
||||
Final Setup
|
||||
-----------
|
||||
|
||||
|
@ -92,7 +92,7 @@ Building
|
||||
From the command line:
|
||||
|
||||
====
|
||||
mvn package
|
||||
mvn clean package
|
||||
====
|
||||
|
||||
Output WAR will be placed in:
|
||||
@ -110,6 +110,18 @@ the JavaScript happens to be.
|
||||
mvn package -DgwtStyle=DETAILED
|
||||
====
|
||||
|
||||
Production Compile
|
||||
------------------
|
||||
|
||||
*Always* use
|
||||
|
||||
----
|
||||
mvn clean package
|
||||
----
|
||||
|
||||
to create a production build. The `./to_hosted.sh` script that
|
||||
setups the development environment for Eclipse hosted mode also
|
||||
creates a state that produces a corrupt production build.
|
||||
|
||||
Final Setup
|
||||
-----------
|
||||
|
@ -39,7 +39,7 @@ Maven from a source download obtained directly from Git:
|
||||
====
|
||||
git clone git://android.git.kernel.org/tools/gerrit.git
|
||||
cd gerrit
|
||||
mvn package
|
||||
mvn clean package
|
||||
cp target/gerrit-*.war ...YOUR.DEST.../gerrit.war
|
||||
====
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;javaProject name=&quot;gerrit&quot;/&gt;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;javaProject name=&quot;gwtjsonrpc&quot;/&gt;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;javaProject name=&quot;gwtorm&quot;/&gt;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.javaProject"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;default/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/>
|
||||
<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="gerrit" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.USER_LIBRARY/GWT_16" path="3" type="4"/> "/>
|
||||
@ -21,8 +22,8 @@
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.GWTShell"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out gwt_www com.google.gerrit.Gerrit/Gerrit.html"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.HostedMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war ${resource_loc:/gerrit/src/main/webapp} -startupUrl /Gerrit com.google.gerrit.Gerrit"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="gerrit"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M -DGerritServer=${resource_loc:/gerrit/src/main/java/GerritServer.properties} -Dcom.google.gerrit.server.BecomeAnyAccountLoginServlet=true"/>
|
||||
|
@ -22,8 +22,8 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.GWTShell"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out gwt_www com.google.gerrit.Gerrit/Gerrit.html"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.HostedMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war ${resource_loc:/gerrit/src/main/webapp} -startupUrl /Gerrit com.google.gerrit.Gerrit"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="gerrit"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M -XstartOnFirstThread -DGerritServer=${resource_loc:/gerrit/src/main/java/GerritServer.properties} -Dcom.google.gerrit.server.BecomeAnyAccountLoginServlet=true"/>
|
||||
|
36
pom.xml
36
pom.xml
@ -268,12 +268,28 @@ limitations under the License.
|
||||
<includes>
|
||||
<include>log4j.properties</include>
|
||||
<include>com/google/gerrit/client/GerritVersion.properties</include>
|
||||
<include>com/google/gerrit/public/Gerrit.html</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>gerrit</include>
|
||||
<include>WEB-INF/lib</include>
|
||||
</includes>
|
||||
<followSymlinks>false</followSymlinks>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
@ -307,7 +323,7 @@ limitations under the License.
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
|
||||
<warSourceExcludes>WEB-INF/web-jetty.xml</warSourceExcludes>
|
||||
<archiveClasses>true</archiveClasses>
|
||||
<archive>
|
||||
<manifest>
|
||||
@ -379,6 +395,7 @@ limitations under the License.
|
||||
<configuration>
|
||||
<tasks>
|
||||
<property name="d" location="${basedir}/target/${project.name}-${project.version}"/>
|
||||
<property name="m" location="${d}/gerrit"/>
|
||||
<property name="keyapplet" location="${basedir}/target/gerrit-keyapplet"/>
|
||||
|
||||
<copy todir="${d}">
|
||||
@ -394,25 +411,18 @@ limitations under the License.
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<move todir="${d}">
|
||||
<fileset dir="${d}/com.google.gerrit.Gerrit">
|
||||
<exclude name="Gerrit.html" />
|
||||
<exclude name="hosted.html" />
|
||||
</fileset>
|
||||
</move>
|
||||
<delete dir="${d}/com.google.gerrit.Gerrit" />
|
||||
<apply executable="gzip" addsourcefile="false">
|
||||
<arg value="-9"/>
|
||||
<fileset dir="${d}"
|
||||
<fileset dir="${m}"
|
||||
includes="**/*.html,**/*.css"/>
|
||||
<redirector>
|
||||
<inputmapper type="glob" from="*" to="${d}/*"/>
|
||||
<outputmapper type="glob" from="*" to="${d}/*.gz"/>
|
||||
<inputmapper type="glob" from="*" to="${m}/*"/>
|
||||
<outputmapper type="glob" from="*" to="${m}/*.gz"/>
|
||||
</redirector>
|
||||
</apply>
|
||||
|
||||
<zip
|
||||
destfile="${d}/gerrit-keyapplet.cache.jar"
|
||||
destfile="${m}/gerrit-keyapplet.cache.jar"
|
||||
compress="true">
|
||||
<fileset dir="${keyapplet}" includes="**/*"/>
|
||||
</zip>
|
||||
|
@ -13,7 +13,7 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<module>
|
||||
<module rename-to="gerrit">
|
||||
<inherits name='com.google.gwt.user.User'/>
|
||||
<inherits name='com.google.gwtjsonrpc.GWTJSONRPC'/>
|
||||
<inherits name='com.google.gwtorm.GWTORM'/>
|
||||
@ -28,40 +28,4 @@
|
||||
<extend-property name="locale" values="en"/>
|
||||
|
||||
<entry-point class='com.google.gerrit.client.Gerrit'/>
|
||||
|
||||
<servlet path='/Gerrit'
|
||||
class='com.google.gerrit.server.HostPageServlet'/>
|
||||
<servlet path='/login'
|
||||
class='com.google.gerrit.server.OpenIdLoginServlet'/>
|
||||
<servlet path='/ssh_info'
|
||||
class='com.google.gerrit.server.ssh.SshServlet'/>
|
||||
<servlet path='/cat/*'
|
||||
class='com.google.gerrit.server.CatServlet'/>
|
||||
|
||||
<servlet path='/rpc/AccountService'
|
||||
class='com.google.gerrit.server.AccountServiceSrv'/>
|
||||
<servlet path='/rpc/AccountSecurity'
|
||||
class='com.google.gerrit.server.AccountSecuritySrv'/>
|
||||
<servlet path='/rpc/ChangeDetailService'
|
||||
class='com.google.gerrit.server.ChangeDetailServiceSrv'/>
|
||||
<servlet path='/rpc/ChangeListService'
|
||||
class='com.google.gerrit.server.ChangeListServiceSrv'/>
|
||||
<servlet path='/rpc/ChangeManageService'
|
||||
class='com.google.gerrit.server.ChangeManageServiceSrv'/>
|
||||
<servlet path='/rpc/GroupAdminService'
|
||||
class='com.google.gerrit.server.GroupAdminServiceSrv'/>
|
||||
<servlet path='/rpc/OpenIdService'
|
||||
class='com.google.gerrit.server.OpenIdServiceSrv'/>
|
||||
<servlet path='/rpc/PatchDetailService'
|
||||
class='com.google.gerrit.server.PatchDetailServiceSrv'/>
|
||||
<servlet path='/rpc/ProjectAdminService'
|
||||
class='com.google.gerrit.server.ProjectAdminServiceSrv'/>
|
||||
<servlet path='/rpc/SuggestService'
|
||||
class='com.google.gerrit.server.SuggestServiceSrv'/>
|
||||
<servlet path='/rpc/SystemInfoService'
|
||||
class='com.google.gerrit.server.SystemInfoServiceSrv'/>
|
||||
|
||||
<!-- Hosted mode debugging ONLY -->
|
||||
<servlet path='/__BecomeAnyAccount'
|
||||
class='com.google.gerrit.server.BecomeAnyAccountLoginServlet'/>
|
||||
</module>
|
||||
|
@ -385,7 +385,7 @@ public class Gerrit implements EntryPoint {
|
||||
if (GWT.isClient() && !GWT.isScript()) {
|
||||
menuBar.addItem("Become", new Command() {
|
||||
public void execute() {
|
||||
final String base = GWT.getModuleBaseURL();
|
||||
final String base = GWT.getHostPageBaseURL();
|
||||
Window.Location.assign(base + "__BecomeAnyAccount");
|
||||
}
|
||||
});
|
||||
|
@ -221,7 +221,7 @@ public class NewAgreementScreen extends AccountScreen {
|
||||
agreementGroup.setVisible(true);
|
||||
agreementHtml.setText(Gerrit.C.rpcStatusLoading());
|
||||
if (!url.startsWith("http:") && !url.startsWith("https:")) {
|
||||
url = GWT.getModuleBaseURL() + url;
|
||||
url = GWT.getHostPageBaseURL() + url;
|
||||
}
|
||||
final RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, url);
|
||||
rb.setCallback(new RequestCallback() {
|
||||
|
@ -275,6 +275,7 @@ class AccountSecurityImpl extends BaseServiceImplementation implements
|
||||
|
||||
url.setLength(url.lastIndexOf("/")); // cut "AccountSecurity"
|
||||
url.setLength(url.lastIndexOf("/")); // cut "rpc"
|
||||
url.setLength(url.lastIndexOf("/")); // cut "gerrit"
|
||||
url.append("/Gerrit#VE,");
|
||||
|
||||
try {
|
||||
|
@ -107,7 +107,7 @@ public class BecomeAnyAccountLoginServlet extends HttpServlet {
|
||||
c.setPath(req.getContextPath() + "/");
|
||||
new AccountCookie(account.getId(), false).set(c, server);
|
||||
rsp.addCookie(c);
|
||||
rsp.sendRedirect("Gerrit.html");
|
||||
rsp.sendRedirect("Gerrit");
|
||||
|
||||
} else {
|
||||
rsp.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||
|
@ -90,15 +90,7 @@ public class ChangeMail {
|
||||
}
|
||||
|
||||
public void setHttpServletRequest(final HttpServletRequest req) {
|
||||
final StringBuffer url = req.getRequestURL();
|
||||
final int rpc = url.indexOf("/rpc/");
|
||||
if (rpc >= 0) {
|
||||
url.setLength(rpc + 1); // cut "rpc/..."
|
||||
}
|
||||
if (url.length() == 0 || url.charAt(url.length() - 1) != '/') {
|
||||
url.append('/');
|
||||
}
|
||||
myUrl = url.toString();
|
||||
myUrl = GerritServer.serverUrl(req);
|
||||
}
|
||||
|
||||
public void setPatchSet(final PatchSet ps, final PatchSetInfo psi) {
|
||||
|
@ -157,10 +157,11 @@ public class GerritServer {
|
||||
if (s >= 0) {
|
||||
uri = uri.substring(0, s + 1);
|
||||
}
|
||||
if (uri.endsWith("/rpc/")) {
|
||||
// Nope, it was one of our RPC servlets. Drop the /rpc/ part too.
|
||||
final String sfx = "/gerrit/rpc/";
|
||||
if (uri.endsWith(sfx)) {
|
||||
// Nope, it was one of our RPC servlets. Drop the rpc too.
|
||||
//
|
||||
uri = uri.substring(0, uri.length() - 4);
|
||||
uri = uri.substring(0, uri.length() - (sfx.length() - 1));
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
|
@ -61,10 +61,10 @@ public class HostPageServlet extends HttpServlet {
|
||||
final File sitePath = server.getSitePath();
|
||||
canonicalUrl = server.getCanonicalURL();
|
||||
|
||||
final String hostPageName = "com/google/gerrit/public/Gerrit.html";
|
||||
hostDoc = HtmlDomUtil.parseFile(hostPageName);
|
||||
final String hostPageName = "WEB-INF/Gerrit.html";
|
||||
hostDoc = HtmlDomUtil.parseFile(getServletContext(), "/" + hostPageName);
|
||||
if (hostDoc == null) {
|
||||
throw new ServletException("No " + hostPageName + " in CLASSPATH");
|
||||
throw new ServletException("No " + hostPageName + " in webapp");
|
||||
}
|
||||
fixModuleReference(hostDoc);
|
||||
injectJson(hostDoc, "gerrit_gerritconfig", Common.getGerritConfig());
|
||||
@ -159,9 +159,10 @@ public class HostPageServlet extends HttpServlet {
|
||||
if (scriptNode == null) {
|
||||
throw new ServletException("No gerrit_module to rewrite in host document");
|
||||
}
|
||||
scriptNode.removeAttribute("id");
|
||||
|
||||
final String src = scriptNode.getAttribute("src");
|
||||
final InputStream in = getServletContext().getResourceAsStream("/" + src);
|
||||
InputStream in = getServletContext().getResourceAsStream("/" + src);
|
||||
if (in == null) {
|
||||
throw new ServletException("No " + src + " in webapp root");
|
||||
}
|
||||
@ -182,7 +183,6 @@ public class HostPageServlet extends HttpServlet {
|
||||
}
|
||||
|
||||
final String vstr = ObjectId.fromRaw(md.digest()).name();
|
||||
scriptNode.removeAttribute("id");
|
||||
scriptNode.setAttribute("src", src + "?content=" + vstr);
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.StringWriter;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
@ -134,11 +135,12 @@ public class HtmlDomUtil {
|
||||
return d;
|
||||
}
|
||||
|
||||
/** Parse an XHTML file from our CLASSPATH and return the instance. */
|
||||
public static Document parseFile(final String name) throws ServletException {
|
||||
/** Parse an XHTML file from our ServletContext and return the instance. */
|
||||
public static Document parseFile(final ServletContext context,
|
||||
final String name) throws ServletException {
|
||||
final InputStream in;
|
||||
|
||||
in = HtmlDomUtil.class.getClassLoader().getResourceAsStream(name);
|
||||
in = context.getResourceAsStream(name);
|
||||
if (in == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public class UrlRewriteFilter implements Filter {
|
||||
final HttpServletResponse rsp = (HttpServletResponse) srsp;
|
||||
final String pathInfo = pathInfo(req);
|
||||
|
||||
if (pathInfo.startsWith("/rpc/")) {
|
||||
if (pathInfo.startsWith("/gerrit/rpc/")) {
|
||||
// RPC requests are very common in Gerrit 2, we want to make sure
|
||||
// they run quickly by jumping through the chain as fast as we can.
|
||||
//
|
||||
|
@ -4,7 +4,7 @@
|
||||
<meta name="gwt:property" content="locale=en_US" />
|
||||
<script id="gerrit_gerritconfig"></script>
|
||||
<script id="gerrit_myaccount"></script>
|
||||
<script id="gerrit_module" type="text/javascript" language="javascript" src="com.google.gerrit.Gerrit.nocache.js"></script>
|
||||
<script id="gerrit_module" type="text/javascript" language="javascript" src="gerrit/gerrit.nocache.js"></script>
|
||||
<style id="gerrit_sitecss" type="text/css"></style>
|
||||
<link rel="icon" type="image/gif" href="favicon.ico" />
|
||||
</head>
|
8
src/main/webapp/WEB-INF/web-jetty.xml
Normal file
8
src/main/webapp/WEB-INF/web-jetty.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
<!--
|
||||
This is for hosted mode debugging only.
|
||||
-->
|
||||
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<Set name="extraClasspath">target/classes</Set>
|
||||
</Configure>
|
@ -54,6 +54,16 @@
|
||||
<url-pattern>/login</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>BecomeAnyAccount</servlet-name>
|
||||
<servlet-class>com.google.gerrit.server.BecomeAnyAccountLoginServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>BecomeAnyAccount</servlet-name>
|
||||
<url-pattern>/__BecomeAnyAccount</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>ssh</servlet-name>
|
||||
<servlet-class>com.google.gerrit.server.ssh.SshServlet</servlet-class>
|
||||
@ -91,7 +101,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>AccountService</servlet-name>
|
||||
<url-pattern>/rpc/AccountService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/AccountService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -101,7 +111,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>AccountSecurity</servlet-name>
|
||||
<url-pattern>/rpc/AccountSecurity</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/AccountSecurity</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -111,7 +121,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>GroupAdminService</servlet-name>
|
||||
<url-pattern>/rpc/GroupAdminService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/GroupAdminService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -121,7 +131,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ChangeDetailService</servlet-name>
|
||||
<url-pattern>/rpc/ChangeDetailService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/ChangeDetailService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -131,7 +141,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ChangeListService</servlet-name>
|
||||
<url-pattern>/rpc/ChangeListService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/ChangeListService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -141,7 +151,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ChangeManageService</servlet-name>
|
||||
<url-pattern>/rpc/ChangeManageService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/ChangeManageService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -151,7 +161,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>OpenIdService</servlet-name>
|
||||
<url-pattern>/rpc/OpenIdService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/OpenIdService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -161,7 +171,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>PatchDetailService</servlet-name>
|
||||
<url-pattern>/rpc/PatchDetailService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/PatchDetailService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -171,7 +181,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ProjectAdminService</servlet-name>
|
||||
<url-pattern>/rpc/ProjectAdminService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/ProjectAdminService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -181,7 +191,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>SuggestService</servlet-name>
|
||||
<url-pattern>/rpc/SuggestService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/SuggestService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
@ -191,6 +201,6 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>SystemInfoService</servlet-name>
|
||||
<url-pattern>/rpc/SystemInfoService</url-pattern>
|
||||
<url-pattern>/gerrit/rpc/SystemInfoService</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
||||
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
4
to_hosted.sh
Executable file
4
to_hosted.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
mvn war:inplace &&
|
||||
rm -f src/main/webapp/WEB-INF/lib/gerrit-*.jar
|
@ -16,7 +16,7 @@ fi
|
||||
|
||||
ctx="$jetty/contexts/gerrit.xml" &&
|
||||
|
||||
mvn package &&
|
||||
mvn clean package &&
|
||||
war=target/gerrit-*.war &&
|
||||
|
||||
cp $war "$jetty/webapps/gerrit.war" &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user