summaryrefslogtreecommitdiffstats
path: root/gerrit-httpd
diff options
context:
space:
mode:
authorShawn Pearce <sop@google.com>2013-04-29 17:38:45 -0700
committerShawn Pearce <sop@google.com>2013-05-05 19:40:50 -0700
commite31f406600a223568e2ab27ea25a3b1e212cfdbe (patch)
treeea390953b46bf7320aa8657beb58a4977d050029 /gerrit-httpd
parentf22460e8a8c183cbe229aff624ffe4a296fcad20 (diff)
Remove launcher dependency from httpd
Allow httpd to build without the launcher by writing the generated gitweb config to $site_path/tmp. This location was added when plugins came about and therefore was not available when gitweb support started writing a generated configuration file. Change-Id: Id9bbb615c233f3426395972e5c049587a9956fbd
Diffstat (limited to 'gerrit-httpd')
-rw-r--r--gerrit-httpd/pom.xml6
-rw-r--r--gerrit-httpd/src/main/java/com/google/gerrit/httpd/gitweb/GitWebServlet.java6
2 files changed, 4 insertions, 8 deletions
diff --git a/gerrit-httpd/pom.xml b/gerrit-httpd/pom.xml
index 87f2f10c8f..d2189a2878 100644
--- a/gerrit-httpd/pom.xml
+++ b/gerrit-httpd/pom.xml
@@ -66,12 +66,6 @@ limitations under the License.
<dependency>
<groupId>com.google.gerrit</groupId>
- <artifactId>gerrit-launcher</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.gerrit</groupId>
<artifactId>gerrit-server</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/gitweb/GitWebServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/gitweb/GitWebServlet.java
index ba7a5b866f..3be0cd310b 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/gitweb/GitWebServlet.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/gitweb/GitWebServlet.java
@@ -32,7 +32,6 @@ package com.google.gerrit.httpd.gitweb;
import com.google.gerrit.common.data.GerritConfig;
import com.google.gerrit.extensions.restapi.Url;
import com.google.gerrit.httpd.GitWebConfig;
-import com.google.gerrit.launcher.GerritLauncher;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.server.AnonymousUser;
import com.google.gerrit.server.IdentifiedUser;
@@ -140,7 +139,10 @@ class GitWebServlet extends HttpServlet {
private void makeSiteConfig(final SitePaths site,
final GerritConfig gerritConfig) throws IOException {
- final File myconf = GerritLauncher.createTempFile("gitweb_config", ".perl");
+ if (!site.tmp_dir.exists()) {
+ site.tmp_dir.mkdirs();
+ }
+ File myconf = File.createTempFile("gitweb_config", ".perl", site.tmp_dir);
// To make our configuration file only readable or writable by us;
// this reduces the chances of someone tampering with the file.