51 Commits

Author SHA1 Message Date
Dave Borowitz
292fa154c1 Format all Java files with google-java-format
Having a standard tool for formatting saves reviewers' valuable time.
google-java-format is Google's standard formatter and is somewhat
inspired by gofmt[1]. This commit formats everything using
google-java-format version 1.2.

The downside of this one-off formatting is breaking blame. This can be
somewhat hacked around with a tool like git-hyper-blame[2], but it's
definitely not optimal until/unless this kind of feature makes its way
to git core.

Not in this change:
* Tool support, e.g. Eclipse. The command must be run manually [3].
* Documentation of best practice, e.g. new 100-column default.

[1] https://talks.golang.org/2015/gofmt-en.slide#3
[2] https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-hyper-blame.html
[3] git ls-files | grep java$ | xargs google-java-format -i

Change-Id: Id5f3c6de95ce0b68b41f0a478b5c99a93675aaa3
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
2017-02-07 10:04:39 +09:00
David Ostrovsky
fdbfcad77d Remove Buck based build
Bug: Issue 5302
Change-Id: I6e860446ef30ff0ad1c7c49fc0e39d39d921820b
2017-01-23 12:44:58 +00:00
David Ostrovsky
fa18907d7f Bazel: Reformat build files
Reformat the Bazel build files with the buildifier tool [1].

The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.

[1] https://github.com/bazelbuild/buildifier

Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
2016-12-07 11:33:07 +00:00
David Ostrovsky
e2ad277ff4 Bazel: Add missing rule for gerrit-gwtdebug
Also add missing unit test for gerrit-gwtui package.

Change-Id: I0eb40451a781ff141fc4a2d21a66fb1759dc98f2
2016-11-13 10:01:11 -08:00
David Ostrovsky
7817498d77 Bump GWT version to 2.8.0-rc2
There are number of important changes in this GWT release:

1. HtmlUnit, Jetty and their dependencies upgrade: [1],[2],[3]
2. Unbundled most dependencies from GWT Maven artifacts

With 1. we can remove patched WebServer fork from GWT project, that
was needed to adapt to Jetty 9 version. With 2. we don't need to
strip Jetty classes from gwt-dev artifact any more to avoid classpath
collisions (we wouldn't get classpath collisions to start with because
of 1.). However, because of 2. we need to add quite some dependencies
that we got for granted in gwt-dev in early GWT releases on our own:

* Apache Ant, Apache 2.0 License
* Apache Tapestry, Apache 2.0 License
* CERN colt, CERN own or LGPL License
* Google JS Interop annotations, Apache 2.0 License
* W3C CSS sac library, License W3C IPR SOFTWARE NOTICE

According to the release notes: [4].

  Double/Boolean are not boxed anymore

That leads to the NPE when such method:

  void showLineEndings(boolean s);

is used with null value:

  p.showLineEndings(in.showLineEndings);

where in.showLineEndings is null. Adapt the code to accept
Boolean instead.

gwtjsonrpc is updated to version 1.10 which is built for GWT 2.8.0-rc2.

TEST PLAN:

* Verified that daemon works
* Verified that SDM works

[1] https://github.com/gwtproject/gwt/issues/8712
[2] https://sourceforge.net/p/htmlunit/bugs/1656/
[3] https://gwt-review.googlesource.com/7857
[4] http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0_RC1

Change-Id: I3f009f3ef0cbb8bafac236fb9a81c951697a5903
2016-09-19 15:10:11 +02:00
David Pursehouse
ad5cba2354 WebServer: Fix TIME_IN_THE_PAST constant definition
January 1st 1990 was a Monday, not Sunday [1].

[1] http://www.timeanddate.com/calendar/?year=1990&country=1

Change-Id: Ide8366a9dbc4f82404ebacc7d711573cb7f3f30e
2016-05-07 22:11:43 +09:00
David Ostrovsky
947b5e53ac Expose acceptance test framework as new plugin artifact
Split the current gerrit-acceptance-tests in two parts:

* framework + some needed deps, that is exposed as additional plugin
artifact
* rest of the gerrit-acceptance-test project

To implement the split and not to pull in too many dependencies, some
refactoring was needed. Particularly, gerrit-server:testutil depends
on gerrit-server:server, that depends on almost everything. Similar
problem was with gerrit-pgm:pgm, that is needed for AbstractDaemonTest
to work. Split the rules in gerrit-pgm to break transitive dependency
chain. We shouldn't ship artifacts twice, in plugin-api and in
acceptance-framework.

This change also partially reverts Ie9e63de622, where
//gerrit-acceptance-tests:lib with all its transitive dependencies was
included in plugin-api artifact.

Expose gerrit-acceptance-framework as new plugin artifact. This allows
us to support unit tests in plugins in three different build modes:

* Buck in tree build mode
* Buck standalone build mode
* Maven build

To install gerrit-acceptance-framework locally, the following command
is used:

  buck build api_install

To deploy gerrit-acceptance-framework to Maven Central, the following
command is used:

  buck build api_deploy

To support unit tests in tree build mode, the following Buck variable
is exposed: GERRIT_TESTS and can be used, e.g.:

  java_test(
    name = 'cookbook_tests',
    srcs = glob(['src/test/java/**/*IT.java']),
    labels = ['cookbook-plugin'],
    source_under_test = [':cookbook-plugin__plugin'],
    deps = GERRIT_PLUGIN_API + GERRIT_TESTS + [
      ':cookbook-plugin__plugin',
    ],
  )

To support unit tests in standalone build mode, acceptance-framework
maven jar is defined in lib/gerrit/BUCK file:

  maven_jar(
    name = 'acceptance-framework',
    id = 'com.google.gerrit:gerrit-acceptance-framework:' + VER,
    license = 'Apache2.0',
    attach_source = False,
    repository = REPO,
  )

bucklets/gerrit_plugin.bucklet is extended with the same variable
that points to the new maven_jar artifact, so that the same Buck
java_test() rule can be used in both modes.

Test plan:

1. run tests in gerrit tree
2. apply corresponding change to cookbook-plugin and run tests in
gerrit tree mode
3. apply corresponding change to bucklets, and run tests for
cookbook-plugin in standalone build mode

Change-Id: I4cadf6616de36ca24712f8b07d282b7a50911105
2015-09-25 14:46:10 -04:00
David Pursehouse
191783b479 Organize imports
Change-Id: I88b40b66661d92c48ab1ff6a4cff4825d109d78d
2014-12-18 11:16:03 +09:00
David Ostrovsky
11c56681b0 Update GWT to 2.7
As pointed out in this thread on GWT-discuss development group [1],
gwt-dev is going to be unbundled in 2.7 release. That means that we
would have to supply its dependencies explicitly.  To start with we
need to pass in ASM library.

It's unclear though, if we need asm-commons and asm-xml as it compiles
without it, but corresponding parent-pom contains it [2].

GWT unit tests were disabled as gwt-test-utils doesn't seem to work yet
against upcoming GWT 2.7 release. Issue was filed upstream [3].

As was pointed out in this thread [4], codeserver is now shipped in
gwt-dev.jar as well. Stop fetching codeserver.jar in addition and use
the bits from gwt-dev.jar.

[1] https://groups.google.com/d/topic/google-web-toolkit/LwXXQCG_I_k/discussion
[2] http://repo1.maven.org/maven2/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom
[3] https://github.com/gwt-test-utils/gwt-test-utils/issues/68
[4] https://groups.google.com/d/topic/google-web-toolkit-contributors/pFYPE7Uoub8/discussion

Bug: issue 3008
Bug: issue 3027
Change-Id: Ib8f9ed0c767e9f41f104253fdc8b74a8cbbe38ab
2014-12-04 11:23:01 +09:00
David Pursehouse
41abb376ca Enable and fix Eclipse warnings about redundant type arguments
Since Java 7 it is possible to replace the type arguments required to
invoke the constructor of a generic class with an empty set of type
parameters (<>) as long as the compiler can infer the type arguments
from the context [1].

Enable the Eclipse warning about redundant type arguments, and remove
the ones it warns about.

[1] http://goo.gl/SG21kM

Change-Id: I422882949a6a6a57391580d881f73120b2843a0e
2014-10-31 08:27:01 +00:00
Dave Borowitz
ca48514228 Organize imports in Eclipse
Change-Id: Ia4979b0d6dcc07e03ab560725007c984d48faf9d
2014-09-29 16:31:56 -07:00
Dave Borowitz
9c4a47051f Delete GWT DevMode launcher
There is now only one supported way to debug GWT, so remove the "SDM"
naming, as it's basically an implementation detail. Be consistent
between the launcher and class names,
gerrit_gwt_dbg -> GerritGwtDebugLauncher.

Update the documentation to be consistent as well, and link to the
article about Super Dev Mode.

Change-Id: If541bc48bf828a8af64d631d7acd6f663d5ecea1
2014-09-11 10:08:36 +00:00
David Ostrovsky
9adf60e96f GWT SuperDevMode: Spawn codeserver and Daemon in same process
Simplify SDM experience by embedding codeserver and daemon in one
process: no multiple launch configurations must be started and
the output must not be captured in different IDE console windows.

Unfortunately, as is Codeserver implementation is based on outdated
Jetty. Replace WebServer.java from GWT project (same license like
Gerrit itself, preserving the license header) and adjust it to run
against Jetty 9 that is used by Gerrit.

This also removes the need to fetch outdated Jetty version that we
have just wiped out from gwt-dev.jar during download from Central.

Change-Id: I616a53eb080d49a2bdf7a2211067b821af9f85d7
2014-09-10 18:47:58 +02:00
Eryk Szymanski
f5f9fc8ce8 Prevent StackOverflowError in JettyTreeLogger
getName() method was recursively calling itself

Change-Id: Ib56ac03562d414284683e8447ec604d63434efa4
Signed-off-by: Eryk Szymanski <eryksz@gmail.com>
2014-02-07 12:54:18 +00:00
David Ostrovsky
a283507bcc Update GWT version to 2.6.0-rc3
GWT 2.6.0 has Java 7 support and other new features [1].

Internal Jetty version, shipped with GWT was updated to 8.1. This
version collides with the version that is used internally by Gerrit
(9.1).  To resolve the conflict, GWT's own Jetty version is stripped
from the gwt-dev.jar with maven_jar() method and Gerrit's own Jetty
used instead. Missing Jetty artifacts, needed for the GWT to run in
dev mode:

* jetty-webapp
* jetty-xml

are included now as dependency of gerrit-gwtdebug project.

New GWT version updates a number of dependencies that are used in
Gerrit [3]. Update them too.

EditIteratorTest test is failing with NSME Exception in gwt-test-utils
framework, so deactivate it for now [2].

[1] http://www.gwtproject.org/release-notes.html#Release_Notes_2_6_0_RC1
[2] https://code.google.com/p/gwt-test-utils/issues/detail?id=179
[3]
* Guava 15.0
* Protobuf 2.5.0
* ASM 4.1

Change-Id: I0fa96da6465d52febeae65168b0bd1c2913f6c7e
2014-01-23 06:39:08 +01:00
Shawn Pearce
72fb6cc514 Remove unused .gitignore
These were necessary only for the Maven based build.

Change-Id: Ie26669e6ccae60a52d2db1b8ad362e2fa88a26f2
2013-11-28 22:56:51 -08:00
David Ostrovsky
c53fd3ae49 Delete eclipse left-over files from the Maven poop era
Change-Id: Ie3a75e8c6a2d274cd39e362259ab20cff474eb8d
2013-11-28 22:55:09 -08:00
Shawn Pearce
dd218662c0 Replace <code> with {@code} in javadoc
{@code foo} is shorter and easier to read and write than
<code>foo</code>, which is why it was introduced years ago in the
javadoc processor.  Make consistent use of it throughout the
documentation comments.

Change-Id: I59d428cb6c5015453629398b0697891b83c8e91d
2013-11-24 13:12:20 -08:00
alex.ryazantsev
9d3492c0c8 Remove unnecessary invocation toString() method
Change-Id: Ibbf86c9b5a31e65d0f46b869976687727e925624
2013-11-14 02:56:47 +04:00
David Ostrovsky
dcee57212f Delete Maven based build
The Maven build does not work since the introduction of CodeMirror.
Remove the build until to prevent people from trying to use a broken
build process.  If buck is rejected this commit will be reverted, and
we will attempt to fix the Maven build to include CodeMirror.  If buck
is accepted, we just saved time by avoiding a messy Maven change.

Change-Id: I147d8d1741d52f59de1d2ddce8e5e82583990c14
2013-05-21 20:28:56 -07:00
Shawn Pearce
82e66ee4e5 Move Eclipse related stuff into tools/eclipse
Try to reduce the size of the top-level BUCK file by moving
anything that has to do with Eclipse project generation and
classpath management into tools/eclipse.

Change-Id: Id779eaff4fe732908b28a8e3441004e364b59e21
2013-05-10 12:42:54 -07:00
Shawn Pearce
fd6bb9f6a5 Build with Buck
Implement a new build system using Buck[1], Facebook's
open source clone of Google's internal build system.

  Pros:
  - Concise build language
  - Test and build output is concise
  - Test failures and stack traces show on terminal
  - Reliable incrementals; clean is unnecessary
  - Extensible with simple blocks of Python
  - Fast
      buck: clean: 0.452s, full 1m21.083s [*], no-op:  7.145s,
      mvn:  clean: 4.596s, full 2m53.776s,     no-op: 59.108s,

      [*] full build includes downloading all dependencies,
          time can vary due to remote server performance.

  Cons:
  - No Windows support
  - No native Maven Central support (added by macros)
  - No native GWT, Prolog, or WAR support (added by macros)
  - Bootstrap of buck requires Ant

Getting started:

  git clone https://gerrit.googlesource.com/buck
  cd buck
  ant

  Mac OS X:
    PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH"

  Linux:
    PATH="`pwd`/bin:$PATH"

Importing into Eclipse:

  $ time buck build :eclipse
  0m48.949s

  Import existing project from `pwd`
  Import 'gerrit' (do not import other Maven based projects)
  Expand 'gerrit'
  Right click 'buck-out' > Properties
  Under Attributes check 'Derived'

  If the code doesn't currently compile but an updated classpath
  is needed, refresh the configs and obtain missing JARs:

  $ buck build :eclipse_project :download

Running JUnit tests:

  $ time buck test --all -e slow  # skip slow tests
  0m19.320s

  $ time buck test --all          # includes acceptance tests
  5m17.517s

Building WAR:

  $ buck build :gerrit
  $ java -jar buck-out/gen/gerrit.war

Building release:

  $ buck test --all && buck build :api :release
  $ java -jar buck-out/gen/release.war
  $ ls -lh buck-out/gen/{extension,plugin}-api.jar

Downloading dependencies:

  Dependencies are normally downloaded automatically, but Buck can
  inspect its graph and download missing dependencies so future
  compiles can run without the network:

  $ buck build :download

[1] http://facebook.github.io/buck/

Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655
2013-05-09 13:40:36 +00:00
Shawn Pearce
9240c299f0 Begin 2.8
Change-Id: Ie0bc733853be435fba147dd64ef8cbc5a0027ee0
2013-05-06 19:39:10 -07:00
Shawn Pearce
d47ca8a66d Start 2.7 development
Change-Id: I08dc590bb1f62af67d88eb11313d5d4cfe2423c4
2013-03-21 12:12:47 -07:00
Dariusz Luksza
444cf15474 Import gwt-dev dependency as last in gerrit-gwtdebug
gwt-dev.jar contains additional classes (eg. args4j version 2.0.12) that
can overwrite our dependency, therefore it should be imported as last
one in gerrit-gwtdebug pom.xml

Change-Id: Ic9797bf07c2f5f787bfcdb71104ea4156e523a1f
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2012-11-19 14:35:34 +01:00
Shawn O. Pearce
f121c1bff1 Fix warnings caused by wrong BouncyCastle version in pom files
Change-Id: I3380573ff0313b85eeb709e8a15bdbb1b264ff59
2012-10-21 20:14:37 -07:00
Edwin Kempin
20f99685d9 Update versions in pom's to start Gerrit 2.6 development
Change-Id: I4fb8cb41250c5b640a8d9e47caf97dc4670ff428
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2012-08-22 14:09:52 +02:00
Sasa Zivkov
90119f8256 Remove timestamp from all org.eclipse.core.resources.prefs files.
Eclipse overwrites these files when we import projects using m2e.
Eclipse 3 writes a timestamp at the top of these files making the Git
working tree dirty.  Eclipse 4 (Juno) still overwrites these files but
doesn't write the timestamp.  This should help keeping the working tree
clean.  However, since the timestamp is currently present in these
files, Eclispe 4 would still make them dirty by overwriting and
effectively removing the timestamp.

This change removes the timestamp from these files. This help those
using Eclipse 4 and doesn't make it worse for those still using Eclispe
3.

Change-Id: Ic23299a12ac80f7294bcc602c8565889069a0d10
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
2012-07-04 14:06:09 +02:00
Anatol Pomazau
2f12c650ec Add Intellij IDEA files to ignore list
Change-Id: Ie948a1b3c9df95e79fc09ef343d0d49ff3b267c2
2012-05-03 13:17:43 -07:00
Edwin Kempin
daf6bd9865 Update parent version in pom.xml's to 2.5-SNAPSHOT
Change-Id: I3b2f0f532fc10b98657de117c80113fe0eac3bc4
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2012-05-03 09:49:17 +02:00
Sasa Zivkov
17e17dd8b9 Change version in pom.xml to 2.4-SNAPSHOT
The 2.3 was released and what we have in the master branch
is targeted for 2.4.

Change-Id: Idca8a12aaef1dc5ea5f628b3640881e66f04dc9c
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
2012-04-18 12:55:40 +02:00
Colby Ranger
b30883860d Updated to gwtorm 1.4.
Refactored the GWT client code to include only what the gerrit GWT
client. The gerrit GWT build was giving build warnings since the
getAsync() signature and implementation used types that were
not available to GWT.

Split the reviewdb into a client and server package.

Organized the imports to ease the migration.

Change-Id: I6cd6125eddcb1dd2b5c5e353edf163544248026b
2012-03-07 12:50:47 -08:00
Martin Fick
7f7eadff20 Update poms to Gerrit 2.3-SNAPSHOT
Change-Id: I6f54a783959c58fb75114251e07a6871bc889904
2012-02-22 17:19:32 -07:00
Mohan Zhang
3a6dbe93c3 Add entries to .gitignore for m2e settings/preference files
Change-Id: Ie70c285440b6200ad7f4dd8dea8a97317e1e62fc
2011-12-12 16:56:53 -06:00
Eric Anderson
a68b89fd53 Updating eclipse settings for 3.7 and m2e 1.0
Change-Id: Ic0f134719769e3d8b8cfb6f70703f9a61fcd2538
2011-07-29 08:29:51 -07:00
Edwin Kempin
e2900ea600 Make Gerrit with gwt 2.3.0 run in gwtdebug mode
Running Gerrit in gwtdebug mode resulted on client side in an
exception saying that javax.validation.ContraintViolation could not be
resolved. As a result of this exception the project access screen
failed to load.

This change now adds Maven dependencies to the validation-api jars in
the pom.xml of the gerrit-gwtdebug project to this fix this problem.

Change-Id: I8b2341c017a6cfbde490bd38b4e016d29707f96c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2011-06-21 10:59:39 +02:00
Shawn O. Pearce
4e67700dab Change version to 2.2-SNAPSHOT
Change-Id: I1d3e6c42bc678536162a81d2b13372659a1c3dec
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-31 10:30:57 -07:00
Nasser Grainawi
8bc0d7d481 Remove dead code and unused variables
Change-Id: If87f7ad452ce597c82872b36a76f32afcc6ab7fd
2011-05-19 08:06:39 -07:00
Shawn O. Pearce
f855f399f8 Fix all of our pom.xml versions to be 2.1-SNAPSHOT
I meant to keep reusing the 2.1 version number for the entire
2.1 series during development, but botched it during the 2.1.4
development cycle and set it to 2.1.4-SNAPSHOT by mistake.  Put
it back to 2.1-SNAPSHOT since 2.1.4 is released.

Change-Id: I37e206c0609bf3fd94a5aab8ea301c98b7fb013e
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-08-12 16:24:43 -07:00
Shawn O. Pearce
e317c252ab Fix GWT hosted mode in Eclipse
When we started building gerrit-gwtdebug as a submodule, we broke
the way the Maven Eclipse plugin generated the project classpath.
Instead of the WAR, link to the JAR of each project.

Change-Id: Ie8a3723ee26c19710cac67eac79930a1ba992006
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-07-12 17:27:14 -07:00
Anatol Pomazau
cce4dae90d Add gerrit-gwtdebug to the list of submodules
Change-Id: I4315ba9dba3b16da969c2da2e073fcefb56260dd
2010-07-12 12:53:11 -07:00
Anatol Pomazau
4a1069b89a Fix typo gwtdbug -> gwtdebug 2010-07-08 09:42:50 -07:00
Shawn O. Pearce
faee655254 Start 2.1.4 development
Change-Id: I71719c85b0d50707333517b8ef956853b04efa14
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-06-21 17:41:54 -07:00
Shawn O. Pearce
f51d48c111 gerrit 2.1.3
Change-Id: I93386d5b71e8361219c03d95ab7476dc46e7d6b0
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-06-21 14:40:34 -07:00
Shawn O. Pearce
05de0c5d49 Update to GWT 2.0.1
We have to replicate the change for issue 4322[1] ourselves because
we cloned the development mode server setup code path to make it
easier to configure our context's CLASSPATH without having to build
the complete WAR file.

[1] http://code.google.com/p/google-web-toolkit/issues/detail?id=4322

Change-Id: I9447913ad1b5dc9c7bb904c4408d3e465994bf55
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-02-08 10:49:24 -08:00
Shawn O. Pearce
d1a3f68b80 Cleanup Maven build by pushing component dependencies down
Rather than listing all of our build projects in the parent pom,
list them where they are actually required to compile.

Change-Id: I27954f3e4affdaa258ee024c0899f0cacd3f2ae4
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-30 17:19:47 -08:00
Shawn O. Pearce
d554cc21ad 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>
2009-12-18 18:30:45 -08:00
Shawn O. Pearce
3b279fa8d8 Call the next version 2.1
We've changed so much since the 2.0.24 release that I'm really not
comfortable calling it 2.0.25.

Change-Id: I9cf28b0a97e0f74838bf893b79ce3105e0a7bfdb
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-12 20:17:29 -08:00
Shawn O. Pearce
765d076474 Fix PostgreSQL/H2 access under gwtdebug sessions
Unfortunately my recent Maven refactoring series didn't quite work
with the gwtdebug hosted mode debugging support project for gwtui.
The project removes gerrit-pgm (and its contained Jetty) from the
classpath but that was where we were getting our PostgreSQL JDBC
driver from.

We need to import the drivers directly in gwtdebug's own pom.

Change-Id: Iccb284e8f26b1287771e0251dbf2772bbeb43428
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-12 08:15:18 -08:00
Shawn O. Pearce
fa2486a397 Embed Jetty and run it out of java -jar gerrit.war daemon
We now include Jetty 7.x as part of our distribution WAR and allow
administrators to launch the embedded copy using our Daemon command
line program.  This vastly simplifies server installation as you
do not need to download the Jetty servlet container and configure
it prior to using Gerrit Code Review.

Configuration of Jetty is performed using our gerrit.config, rather
than the Jetty XML configuration language.  Jetty's language can be
quite a bit more powerful for isoteric configurations, but we want
to embed Jetty to simplify setup, not complicate it.  Gerrit's own
configuration file in the git syntax is simpler, so we stick with
that and offer a limited subset of Jetty's configuration features
through httpd.* properties.

Logging currently goes only to stderr, which is fine for toy setups
but probably not ideal for a production environment.

Unfortunately we are still relying on GerritServer.properties to
get us the database connection information, and this DataSource is
not pooled.  Thus the web handlers in our embedded container will
run slightly slower then the web handlers in a standalone container,
as the latter will be likely be using a connection pool configured
out of the container's JNDI namespace.

Bug: issue 202
Change-Id: Ia7956ba48cbc3a8d4241101db5ff493e16d26b9f
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-11 16:54:07 -08:00