Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JBoss Forge named option array test
arraytest asds --array "sadsad" "asdsa"
***INFO*** The command [arraytest] takes [1] unnamed argument(s), but found [2].
***INFO*** Swallowed unknown token [asdsa] for command [arraytest].
[sadsad]
package de.adorsys.forge.plugin.curl;
import java.util.Arrays;
import org.jboss.forge.shell.plugins.Alias;
import org.jboss.forge.shell.plugins.DefaultCommand;
import org.jboss.forge.shell.plugins.Option;
import org.jboss.forge.shell.plugins.PipeOut;
import org.jboss.forge.shell.plugins.Plugin;
@Alias("arraytest")
public class TestPlugin implements Plugin {
@DefaultCommand
public void run(
@Option(name = "array") final String[] test,
@Option final String nonNamed,
PipeOut out
) {
out.println(Arrays.asList(test).toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.