Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

VersionPlugin should use ForgeEnvironment to get the current version …

…info
  • Loading branch information...
commit 5e8dbdba3fe3d279e6df08da70ce4449cf1c759c 1 parent f3cff7f
@gastaldi authored
View
9 shell/src/main/java/org/jboss/forge/shell/plugins/builtin/VersionPlugin.java
@@ -6,6 +6,9 @@
*/
package org.jboss.forge.shell.plugins.builtin;
+import javax.inject.Inject;
+
+import org.jboss.forge.ForgeEnvironment;
import org.jboss.forge.shell.plugins.Alias;
import org.jboss.forge.shell.plugins.DefaultCommand;
import org.jboss.forge.shell.plugins.Help;
@@ -21,10 +24,14 @@
@Help("Displays the current Forge version.")
public class VersionPlugin implements Plugin
{
+
+ @Inject
+ private ForgeEnvironment environment;
+
@DefaultCommand
public void show(final PipeOut out)
{
- String version = getClass().getPackage().getImplementationVersion();
+ String version = environment.getRuntimeVersion();
out.println("JBoss Forge, version [ " + version + " ] - JBoss, by Red Hat, Inc. [ http://jboss.org/forge ]");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.