Examples of option()


Examples of org.gradle.cli.CommandLineParser.option()

        File propertiesFile = wrapperProperties(wrapperJar);
        File rootDir = rootDir(wrapperJar);

        CommandLineParser parser = new CommandLineParser();
        parser.allowUnknownOptions();
        parser.option(GRADLE_USER_HOME_OPTION, GRADLE_USER_HOME_DETAILED_OPTION).hasArgument();

        SystemPropertiesCommandLineConverter converter = new SystemPropertiesCommandLineConverter();
        converter.configure(parser);

        ParsedCommandLine options = parser.parse(args);
View Full Code Here

Examples of org.gradle.cli.ParsedCommandLine.option()

            }

            for (OptionDescriptor commandLineOptionDescriptor : commandLineOptions) {
                final String name = commandLineOptionDescriptor.getName();
                if (parsed.hasOption(name)) {
                    ParsedCommandLineOption o = parsed.option(name);
                    try {
                        commandLineOptionDescriptor.apply(task, o.getValues());
                    } catch (TypeConversionException ex) {
                        throw new TaskConfigurationException(task.getPath(),
                                String.format("Problem configuring option '%s' on task '%s' from command line.", name, task.getPath()), ex);
View Full Code Here

Examples of org.gradle.initialization.CommandLineParser.option()

            if (tasks.size() == 1) {
                for (Class<?> type = tasks.iterator().next().getClass(); type != Object.class; type = type.getSuperclass()) {
                    for (Method method : type.getDeclaredMethods()) {
                        CommandLineOption commandLineOption = method.getAnnotation(CommandLineOption.class);
                        if (commandLineOption != null) {
                            commandLineParser.option(commandLineOption.options()).hasDescription(commandLineOption.description());
                            options.put(commandLineOption.options()[0], new JavaMethod<Task, Object>(Task.class, Object.class, method));
                        }
                    }
                }
            }
View Full Code Here

Examples of org.jboss.aophelper.annotation.AopHelperAction.option()

   public Object invoke(Invocation invocation) throws Throwable
   {
      AopHelperAction helperAction = (AopHelperAction) invocation.resolveAnnotation(org.jboss.aophelper.annotation.AopHelperAction.class);
      System.out.println("state: "+helperAction.state().name());
     
      System.out.println("option: "+helperAction.option().name());
      System.out.println("action: "+helperAction.action().name());
     
      if(helperAction.state().equals(AopState.COMPILE))
      {
         new CompileManager().performAction(helperAction.action(), helperAction.option());
View Full Code Here

Examples of org.jboss.aophelper.annotation.AopHelperAction.option()

      System.out.println("option: "+helperAction.option().name());
      System.out.println("action: "+helperAction.action().name());
     
      if(helperAction.state().equals(AopState.COMPILE))
      {
         new CompileManager().performAction(helperAction.action(), helperAction.option());
      }
      if(helperAction.state().equals(AopState.RUN))
      {
         new RunManager().performAction(helperAction.action(), helperAction.option());
      }
View Full Code Here

Examples of org.jboss.aophelper.annotation.AopHelperAction.option()

      {
         new CompileManager().performAction(helperAction.action(), helperAction.option());
      }
      if(helperAction.state().equals(AopState.RUN))
      {
         new RunManager().performAction(helperAction.action(), helperAction.option());
      }
     
      return invocation.invokeNext();
   }
View Full Code Here

Examples of org.springframework.boot.cli.command.options.OptionHandler.option()

public class OptionParsingCommandTests {

  @Test
  public void optionHelp() {
    OptionHandler handler = new OptionHandler();
    handler.option("bar", "Bar");
    OptionParsingCommand command = new OptionParsingCommand("foo", "Foo", handler) {
    };
    assertThat(command.getHelp(), containsString("--bar"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.