org.jboss.forge.furnace.versions.Versions.getImplementationVersionFor()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中org.jboss.forge.furnace.versions.Versions.getImplementationVersionFor()方法的一些代码示例,展示了Versions.getImplementationVersionFor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Versions.getImplementationVersionFor()方法的具体详情如下:
包路径:org.jboss.forge.furnace.versions.Versions
类名称:Versions
方法名:getImplementationVersionFor

Versions.getImplementationVersionFor介绍

[英]Returns the Implementation version for the given Class
[中]返回给定类的实现版本

代码示例

代码示例来源:origin: org.jboss.forge.addon/wildfly-swarm

private String getWildflySwarmVersion()
{
 return Versions.getImplementationVersionFor(FractionList.class).toString();
}

代码示例来源:origin: org.jboss.forge.addon/script

@Override
public String getLanguageVersion()
{
 return Versions.getImplementationVersionFor(getClass()).toString();
}

代码示例来源:origin: org.jboss.forge.addon/script

@Override
public String getEngineVersion()
{
 return Versions.getImplementationVersionFor(getClass()).toString();
}

代码示例来源:origin: org.jboss.forge/forge-service-rest

@GET
@Produces(MediaType.APPLICATION_JSON)
public JsonObject getInfo()
{
 return createObjectBuilder()
      .add("version", Versions.getImplementationVersionFor(UIContext.class).toString())
      .build();
}

代码示例来源:origin: org.jboss.forge.addon/shell-impl

@Command(value = "version", help = "Displays the current Forge version.", enabled = NonGUIEnabledPredicate.class)
public void showVersion(final UIOutput output)
{
 Version version = Versions.getImplementationVersionFor(getClass());
 output.out().println(
      "JBoss Forge, version [ " + version + " ] - JBoss, by Red Hat, Inc. [ http://jboss.org/forge ]");
}

代码示例来源:origin: forge/core

@Override
public void beforeStart(Furnace furnace) throws ContainerException
{
 if (furnace.isServerMode())
 {
   StringWriter sw = new StringWriter();
   PrintWriter out = new PrintWriter(sw, true);
   out.println();
   out.println("    _____                    ");
   out.println("   |  ___|__  _ __ __ _  ___ ");
   out.println("   | |_ / _ \\| `__/ _` |/ _ \\  \\\\");
   out.println("   |  _| (_) | | | (_| |  __/  //");
   out.println("   |_|  \\___/|_|  \\__, |\\___| ");
   out.println("                   |__/      ");
   out.println("");
   out.print("JBoss Forge, version [ ");
   out.print(Versions.getImplementationVersionFor(getClass()));
   out.print(" ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]");
   out.println();
   out.println("Hit '<TAB>' for a list of available commands and 'man [cmd]' for help on a specific command.");
   out.println();
   out.println("To quit the shell, type 'exit'.");
   logger.info(sw.toString());
   System.out.println(sw.toString());
   shellProgressInformation();
 }
}

代码示例来源:origin: org.jboss.forge/forge-bootstrap

@Override
public void beforeStart(Furnace furnace) throws ContainerException
{
 if (furnace.isServerMode())
 {
   StringWriter sw = new StringWriter();
   PrintWriter out = new PrintWriter(sw, true);
   out.println();
   out.println("    _____                    ");
   out.println("   |  ___|__  _ __ __ _  ___ ");
   out.println("   | |_ / _ \\| `__/ _` |/ _ \\  \\\\");
   out.println("   |  _| (_) | | | (_| |  __/  //");
   out.println("   |_|  \\___/|_|  \\__, |\\___| ");
   out.println("                   |__/      ");
   out.println("");
   out.print("JBoss Forge, version [ ");
   out.print(Versions.getImplementationVersionFor(getClass()));
   out.print(" ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]");
   out.println();
   out.println("Hit '<TAB>' for a list of available commands and 'man [cmd]' for help on a specific command.");
   out.println();
   out.println("To quit the shell, type 'exit'.");
   logger.info(sw.toString());
   System.out.println(sw.toString());
   shellProgressInformation();
 }
}

代码示例来源:origin: forge/core

System.out.println("Forge version " + Versions.getImplementationVersionFor(getClass()));
exitAfter = true;

代码示例来源:origin: org.jboss.forge/forge-bootstrap

System.out.println("Forge version " + Versions.getImplementationVersionFor(getClass()));
exitAfter = true;

代码示例来源:origin: org.jboss.forge.addon/addon-manager-impl

/**
* Returns the latest available distribution
*/
private Coordinate getLatestAvailableDistribution(DependencyResolver resolver)
{
 final Version runtimeVersion = Versions.getImplementationVersionFor(getClass());
 CoordinateBuilder distCoordinate = CoordinateBuilder.create().setGroupId("org.jboss.forge")
      .setArtifactId("forge-distribution")
      .setClassifier("offline").setPackaging("zip");
 DependencyQuery query = DependencyQueryBuilder
      .create(distCoordinate)
      .setFilter(new CompositeDependencyFilter(
          new NonSnapshotDependencyFilter(),
          new Predicate<Dependency>()
          {
            @Override
            public boolean accept(Dependency dependency)
            {
             Version version = SingleVersion.valueOf(dependency.getCoordinate().getVersion());
             return version.compareTo(runtimeVersion) > 0 
                  && version.getMajorVersion() == runtimeVersion.getMajorVersion()
                  && "Final".equals(version.getQualifier());
            }
          }));
 List<Coordinate> versions = resolver.resolveVersions(query);
 return versions.isEmpty() ? null : versions.get(versions.size() - 1);
}

代码示例来源:origin: org.jboss.forge.addon/addon-manager-impl

.createBuilder()
.addArguments("clean", "install", "-Dversion.furnace=" + furnace.getVersion(),
     "-Dversion.forge=" + Versions.getImplementationVersionFor(getClass()))
.runTests(false)
.build(output.out(), output.err());

相关文章