summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-12-18 15:33:35 -0800
committerShawn O. Pearce <sop@google.com>2009-12-18 15:33:40 -0800
commit6ee0554f276ebf05e0128fbdb6a50bd2d5346569 (patch)
tree45016173206845f6e87cf02c3f8f4b189f46816d /pom.xml
parentd46db64b4c8c55dd3501fb918ae09c2cbe60ef5d (diff)
Teach Main to check the Java runtime versionv2.1-rc1
To run Gerrit Code Review we require Java 6, because our class files are compiled against the Java 6 SDK, use methods from it, and are in the Java 6 bytecode file format. We cannot run on a JRE that predates the Java 6 specification. Rather than giving users who are trying to run us on an outdated virutal machine an obtuse stack trace like the following: Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) ... we should give them a specific message describing the problem, and our minimum version requirement. To get a custom error message we compile our Main springboard class in Java 1.2 format, against only APIs that are available since Java 1.2, and we check the specification of our runtime to verify it can support us. This allows us to execute on a really old JRE and at least report a descriptive error message. In order to use Java 6 APIs in GerritLauncher we had to move it to its own Maven component, where the runtime environment is still described as Java 6. Change-Id: I47bfcfb5076427d491c896a2815dd091ca205bfc Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml7
1 files changed, 7 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index d4930f23f4..ddc68f4bbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,6 +75,7 @@ limitations under the License.
<module>gerrit-common</module>
<module>gerrit-httpd</module>
+ <module>gerrit-launcher</module>
<module>gerrit-main</module>
<module>gerrit-pgm</module>
<module>gerrit-reviewdb</module>
@@ -403,6 +404,12 @@ 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-main</artifactId>
<version>${project.version}</version>
</dependency>