+
+
Druid Version: ${pom.version} Druid API Version: ${druid.api.version}
+
diff --git a/services/pom.xml b/services/pom.xml
index 0dcad5375c3..77b12502d6f 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -51,8 +51,20 @@
${project.parent.version}
+
+
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
org.apache.maven.plugins
maven-shade-plugin
diff --git a/services/src/main/java/io/druid/cli/Main.java b/services/src/main/java/io/druid/cli/Main.java
index 551acea0706..7e9a633e8ed 100644
--- a/services/src/main/java/io/druid/cli/Main.java
+++ b/services/src/main/java/io/druid/cli/Main.java
@@ -27,6 +27,8 @@ import io.druid.cli.convert.ConvertProperties;
import io.druid.cli.validate.DruidJsonValidator;
import io.druid.initialization.Initialization;
import io.druid.server.initialization.ExtensionsConfig;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
import java.util.List;
@@ -41,7 +43,7 @@ public class Main
builder.withDescription("Druid command-line runner.")
.withDefaultCommand(Help.class)
- .withCommands(Help.class);
+ .withCommands(Help.class, Version.class);
builder.withGroup("server")
.withDescription("Run one of the Druid server types.")
diff --git a/services/src/main/java/io/druid/cli/Version.java b/services/src/main/java/io/druid/cli/Version.java
new file mode 100644
index 00000000000..9212a3cb800
--- /dev/null
+++ b/services/src/main/java/io/druid/cli/Version.java
@@ -0,0 +1,36 @@
+/*
+ * Druid - a distributed column store.
+ * Copyright (C) 2012, 2013 Metamarkets Group Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package io.druid.cli;
+
+import io.airlift.command.Command;
+import io.druid.server.StatusResource;
+
+@Command(
+ name = "version",
+ description = "Returns Druid version information"
+)
+public class Version implements Runnable
+{
+ @Override
+ public void run()
+ {
+ System.out.println(StatusResource.getStatus());
+ }
+}