org.jboss.forge.shell.plugins.Alias.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(10.2k)|赞(0)|评价(0)|浏览(104)

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

Alias.<init>介绍

暂无

代码示例

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

/**
 * @Author Paul Bakker - paul.bakker@luminis.eu
 */
@Alias("forge.spec.jms")
public class JmsFacetImpl extends BaseJavaEEFacet implements JMSFacet
{
  @Inject
  public JmsFacetImpl(DependencyInstaller installer)
  {
    super(installer);
  }

  @Override
  protected List<Dependency> getRequiredDependencies()
  {
    return Arrays.asList(
        (Dependency) DependencyBuilder.create("org.jboss.spec.javax.jms:jboss-jms-api_1.1_spec")
    );
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("forge.spec.jta")
public class JTAFacetImpl extends BaseJavaEEFacet implements JTAFacet
{
  @Inject
  public JTAFacetImpl(final DependencyInstaller installer)
  {
   super(installer);
  }

  @Override
  protected List<Dependency> getRequiredDependencies()
  {
   return Arrays.asList(
        (Dependency)DependencyBuilder.create("org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec")
        );
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("forge.spec.ejb")
public class EJBFacetImpl extends BaseJavaEEFacet implements EJBFacet
{
  @Inject
  public EJBFacetImpl(final DependencyInstaller installer)
  {
   super(installer);
  }

  @Override
  protected List<Dependency> getRequiredDependencies()
  {
   return Arrays.asList(
        (Dependency) DependencyBuilder.create("org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec")
        );
  }
}

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

@Inject
public LessPlugin(@Alias("more") MorePlugin morePlugin)
{
 this.morePlugin = morePlugin;
}

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

@Alias("about")
@Topic("Shell Environment")
@Help("Display information about this forge.")
public class AboutPlugin implements Plugin
{
  @Inject
  @Alias("forge")
  private ForgePlugin forge;

  @DefaultCommand
  public void run(PipeOut out)
  {
   forge.about(out);
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 * @author Mike Brock .
 */
@Alias("git")
@Topic("Version Control")
public class GitShellPlugin implements Plugin
{
  private final Shell shell;

  @Inject
  public GitShellPlugin(final Shell shell)
  {
   this.shell = shell;
  }

  @DefaultCommand
  public void run(final PipeOut out, final String... parms) throws IOException
  {
   NativeSystemCall.execFromPath("git", parms, out, shell.getCurrentDirectory());
  }

}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("forge.spec.jstl")
@RequiresFacet(ServletFacet.class)
public class JSTLFacetImpl extends BaseJavaEEFacet implements JSTLFacet
{
  @Inject
  public JSTLFacetImpl(final DependencyInstaller installer)
  {
   super(installer);
  }

  @Override
  protected List<Dependency> getRequiredDependencies()
  {
   return Arrays
        .asList((Dependency) DependencyBuilder
            .create("org.jboss.spec.javax.servlet.jstl:jboss-jstl-api_1.2_spec"));
  }

}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("forge.spec.jaxws")
@RequiresFacet(ServletFacet.class)
public class SoapFacetImpl extends BaseJavaEEFacet implements SoapFacet
{
  @Inject
  public SoapFacetImpl(final DependencyInstaller installer)
  {
   super(installer);
  }

  @Override
  protected List<Dependency> getRequiredDependencies()
  {
   return Arrays.asList(
        (Dependency) DependencyBuilder.create("org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec"),
        (Dependency) DependencyBuilder.create("org.jboss.spec.javax.xml.rpc:jboss-jaxrpc-api_1.1_spec"),
        (Dependency) DependencyBuilder.create("org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec"),
        (Dependency) DependencyBuilder.create("org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec")
        );
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 * 
 */
@Help("Un-alias an aliased command. See also 'help alias'")
@Alias("unalias")
public class UnaliasPlugin implements Plugin
{
  @Inject
  private AliasRegistry registry;

  @DefaultCommand
  public void set(final PipeOut out,
      @Option(help = "The alias name to remove: E.g: 'mycommand'") final String[] aliases)
  {
   if ((aliases != null) && (aliases.length > 0))
   {
     for (String alias : aliases)
     {
      registry.removeAlias(alias);
     }
   }
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("jstl")
@RequiresProject
public class JSTLPlugin implements Plugin
{
  @Inject
  private Project project;

  @Inject
  private Event<InstallFacets> request;

  @SetupCommand
  public void setup(final PipeOut out)
  {
   if (!project.hasFacet(JSTLFacet.class))
   {
     request.fire(new InstallFacets(JSTLFacet.class));
   }

   if (project.hasFacet(JSTLFacet.class))
   {
     ShellMessages.success(out, "Java Standard Template Library (JSTL) is installed.");
   }
  }

}

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

/**
 * @author <a href="mailto:rdruss@gmail.com">Rodney Russ</a>
 */
@Alias("pwr")
@Topic("File & Resources")
@Help("Prints the current working resource.")
public class PwrPlugin implements org.jboss.forge.shell.plugins.Plugin
{

  @Inject
  private Shell shell;

  @DefaultCommand
  public void run()
  {
   shell.println(shell.getCurrentResource().getFullyQualifiedName());
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("clear")
@Topic("Shell Environment")
@Help("Clears the console output.")
public class ClearPlugin implements Plugin
{
  @Inject
  Shell shell;

  @DefaultCommand
  public void run()
  {
   shell.clear();
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("pwd")
@Topic("File & Resources")
@Help("Prints the current directory.")
public class PwdPlugin implements Plugin
{
  @Inject
  Shell shell;

  @DefaultCommand
  public void run()
  {
   shell.println(shell.getCurrentDirectory().getFullyQualifiedName());
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("version")
@Topic("Shell Environment")
@Help("Displays the current Forge version.")
public class VersionPlugin implements Plugin
{

  @Inject
  private ForgeEnvironment environment;

  @DefaultCommand
  public void show(final PipeOut out)
  {
   String version = environment.getRuntimeVersion();
   out.println("JBoss Forge, version [ " + version + " ] - JBoss, by Red Hat, Inc. [ http://jboss.org/forge ]");
  }
}

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

/**
 * Implements a {@link Plugin} that fires the forge {@link ShutdownStatus#NORMAL} event.
 * 
 * 
 * 
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("exit")
@Topic("Shell Environment")
@Help("Exits the forge.")
public class ExitShellPlugin implements Plugin
{
  @Inject
  private Event<Shutdown> shutdown;

  @DefaultCommand
  public void exit()
  {
   shutdown.fire(new Shutdown(Shutdown.Status.NORMAL));
  }
}

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

@Alias("execute-java")
@Topic("Project")
@Help("Execute a main method on a project class")
public class JavaExecutionPlugin implements Plugin
{
  @Inject
  Project project;

  @DefaultCommand
  public void executeJavaClass(
      @Option(name = "class", type = PromptType.JAVA_CLASS, required = true) final JavaResource classToExecute,
      @Option(name = "arguments") final String arguments) throws Exception
  {
   String qualifiedName = classToExecute.getJavaSource().getQualifiedName();
   JavaExecutionFacet facet = project.getFacet(JavaExecutionFacet.class);
   if (arguments != null)
   {
     facet.executeProjectClass(qualifiedName, arguments.split(" "));
   }
   else
   {
     facet.executeProjectClass(qualifiedName);
   }

  }
}

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

/**
 * @author Mike Brock .
 */
@Alias("wait")
@Topic("Shell Environment")
@Help("Wait for ENTER.")
public class WaitPlugin implements Plugin
{
  private final Shell shell;

  @Inject
  public WaitPlugin(final Shell shell)
  {
   this.shell = shell;
  }

  @DefaultCommand
  public void waitCommand()
  {
   shell.prompt("Press <ENTER> to continue...");
  }
}

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

/**
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("reset")
@Topic("Shell Environment")
@Help("Reset the shell and reload default configs.")
public class ResetPlugin implements Plugin
{
  private final Event<ReinitializeEnvironment> reinitializeEvent;

  @Inject
  public ResetPlugin(final Event<ReinitializeEnvironment> reinitializeEvent)
  {
   this.reinitializeEvent = reinitializeEvent;
  }

  @DefaultCommand
  public void reset()
  {
   reinitializeEvent.fire(new ReinitializeEnvironment());
  }
}

代码示例来源:origin: org.switchyard/switchyard-forge-common-plugin

/**
 * Forge facet for Common Component functionality.
 */
@Alias("switchyard.common")
@RequiresFacet({ DependencyFacet.class, PackagingFacet.class, SwitchYardFacet.class })
@RequiresPackagingType(PackagingType.JAR)
public class CommonFacet extends AbstractFacet {
  
  private static final String COMMON_MAVEN_ID = 
    "org.switchyard.components:switchyard-component-common";
  
  @Override
  public boolean install() {
    installDependencies();
    return true;
  }
  
  /**
   * Create a new Common Facet.
   */
  public CommonFacet() {
    super(COMMON_MAVEN_ID);
  }
}

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

/**
 * @author Mike Brock .
 * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
 */
@Alias("mvn")
@Topic("Project")
@RequiresProject
@RequiresFacet(MavenCoreFacet.class)
public class MvnShellPlugin implements Plugin
{
  private final Project project;

  @Inject
  public MvnShellPlugin(final Project project)
  {
   this.project = project;
  }

  @DefaultCommand
  public void run(final PipeOut out, final String... parms)
  {
   project.getFacet(MavenCoreFacet.class).executeMaven(out, parms);
  }
}

相关文章