in bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrCommandImpl.java [1014:1204]
private void help(PrintStream out, StringTokenizer st)
{
String command = HELP_CMD;
if (st.hasMoreTokens())
{
command = st.nextToken();
}
if (command.equals(ADDURL_CMD))
{
out.println("");
out.println("obr " + ADDURL_CMD + " <repository-url> ...");
out.println("");
out.println(
"This command adds the space-delimited list of repository URLs to\n" +
"the repository service.");
out.println("");
}
else if (command.equals(REFRESHURL_CMD))
{
out.println("");
out.println("obr " + REFRESHURL_CMD + " <repository-url> ...");
out.println("");
out.println(
"This command refreshes the space-delimited list of repository URLs\n" +
"within the repository service.\n" +
"(The command internally removes and adds the specified URLs from the\n" +
"repository service.)");
out.println("");
}
else if (command.equals(REMOVEURL_CMD))
{
out.println("");
out.println("obr " + REMOVEURL_CMD + " <repository-url> ...");
out.println("");
out.println(
"This command removes the space-delimited list of repository URLs\n" +
"from the repository service.");
out.println("");
}
else if (command.equals(LISTURL_CMD))
{
out.println("");
out.println("obr " + LISTURL_CMD);
out.println("");
out.println(
"This command displays the repository URLs currently associated\n" +
"with the repository service.");
out.println("");
}
else if (command.equals(LIST_CMD))
{
out.println("");
out.println("obr " + LIST_CMD
+ " [" + VERBOSE_SWITCH + "] [<string> ...]");
out.println("");
out.println(
"This command lists bundles available in the bundle repository.\n" +
"If no arguments are specified, then all available bundles are\n" +
"listed, otherwise any arguments are concatenated with spaces\n" +
"and used as a substring filter on the bundle names. By default,\n" +
"only the most recent version of each artifact is shown. To list\n" +
"all available versions use the \"" + VERBOSE_SWITCH + "\" switch.");
out.println("");
}
else if (command.equals(INFO_CMD))
{
out.println("");
out.println("obr " + INFO_CMD
+ " <bundle-name>|<bundle-symbolic-name>|<bundle-id>[;<version>] ...");
out.println("");
out.println(
"This command displays the meta-data for the specified bundles.\n" +
"If a bundle's name contains spaces, then it must be surrounded\n" +
"by quotes. It is also possible to specify a precise version\n" +
"if more than one version exists, such as:\n" +
"\n" +
" obr info \"Bundle Repository\";1.0.0\n" +
"\n" +
"The above example retrieves the meta-data for version \"1.0.0\"\n" +
"of the bundle named \"Bundle Repository\".");
out.println("");
}
else if (command.equals(DEPLOY_CMD))
{
out.println("");
out.println("obr " + DEPLOY_CMD
+ " <bundle-name>|<bundle-symbolic-name>|<bundle-id>[;<version>] ... ");
out.println("");
out.println(
"This command tries to install or update the specified bundles\n" +
"and all of their dependencies. You can specify either the bundle\n" +
"name or the bundle identifier. If a bundle's name contains spaces,\n" +
"then it must be surrounded by quotes. It is also possible to\n" +
"specify a precise version if more than one version exists, such as:\n" +
"\n" +
" obr deploy \"Bundle Repository\";1.0.0\n" +
"\n" +
"For the above example, if version \"1.0.0\" of \"Bundle Repository\" is\n" +
"already installed locally, then the command will attempt to update it\n" +
"and all of its dependencies; otherwise, the command will install it\n" +
"and all of its dependencies.");
out.println("");
}
else if (command.equals(START_CMD))
{
out.println("");
out.println("obr " + START_CMD
+ " <bundle-name>|<bundle-symbolic-name>|<bundle-id>[;<version>] ...");
out.println("");
out.println(
"This command installs and starts the specified bundles and all\n" +
"of their dependencies. If a bundle's name contains spaces, then\n" +
"it must be surrounded by quotes. If a specified bundle is already\n" + "installed, then this command has no effect. It is also possible\n" + "to specify a precise version if more than one version exists,\n" + "such as:\n" +
"\n" +
" obr start \"Bundle Repository\";1.0.0\n" +
"\n" +
"The above example installs and starts version \"1.0.0\" of the\n" +
"bundle named \"Bundle Repository\" and its dependencies.");
out.println("");
}
else if (command.equals(SOURCE_CMD))
{
out.println("");
out.println("obr " + SOURCE_CMD
+ " [" + EXTRACT_SWITCH
+ "] <local-dir> <bundle-name>[;<version>] ...");
out.println("");
out.println(
"This command retrieves the source archives of the specified\n" +
"bundles and saves them to the specified local directory; use\n" +
"the \"" + EXTRACT_SWITCH + "\" switch to automatically extract the source archives.\n" +
"If a bundle name contains spaces, then it must be surrounded\n" +
"by quotes. It is also possible to specify a precise version if\n" + "more than one version exists, such as:\n" +
"\n" +
" obr source /home/rickhall/tmp \"Bundle Repository\";1.0.0\n" +
"\n" +
"The above example retrieves the source archive of version \"1.0.0\"\n" +
"of the bundle named \"Bundle Repository\" and saves it to the\n" +
"specified local directory.");
out.println("");
}
else if (command.equals(JAVADOC_CMD))
{
out.println("");
out.println("obr " + JAVADOC_CMD
+ " [" + EXTRACT_SWITCH
+ "] <local-dir> <bundle-name>[;<version>] ...");
out.println("");
out.println(
"This command retrieves the javadoc archives of the specified\n" +
"bundles and saves them to the specified local directory; use\n" +
"the \"" + EXTRACT_SWITCH + "\" switch to automatically extract the javadoc archives.\n" +
"If a bundle name contains spaces, then it must be surrounded\n" +
"by quotes. It is also possible to specify a precise version if\n" + "more than one version exists, such as:\n" +
"\n" +
" obr javadoc /home/rickhall/tmp \"Bundle Repository\";1.0.0\n" +
"\n" +
"The above example retrieves the javadoc archive of version \"1.0.0\"\n" +
"of the bundle named \"Bundle Repository\" and saves it to the\n" +
"specified local directory.");
out.println("");
}
else
{
out.println("obr " + HELP_CMD
+ " [" + ADDURL_CMD
+ " | " + REMOVEURL_CMD
+ " | " + LISTURL_CMD
+ " | " + LIST_CMD
+ " | " + INFO_CMD
+ " | " + DEPLOY_CMD + " | " + START_CMD
+ " | " + SOURCE_CMD + " | " + JAVADOC_CMD + "]");
out.println("obr " + ADDURL_CMD + " [<repository-file-url> ...]");
out.println("obr " + REFRESHURL_CMD + " [<repository-file-url> ...]");
out.println("obr " + REMOVEURL_CMD + " [<repository-file-url> ...]");
out.println("obr " + LISTURL_CMD);
out.println("obr " + LIST_CMD + " [" + VERBOSE_SWITCH + "] [<string> ...]");
out.println("obr " + INFO_CMD
+ " <bundle-name>|<bundle-symbolic-name>|<bundle-id>[;<version>] ...");
out.println("obr " + DEPLOY_CMD
+ " <bundle-name>|<bundle-symbolic-name>|<bundle-id>[;<version>] ...");
out.println("obr " + START_CMD
+ " <bundle-name>|<bundle-symbolic-name>|<bundle-id>[;<version>] ...");
out.println("obr " + SOURCE_CMD
+ " [" + EXTRACT_SWITCH
+ "] <local-dir> <bundle-name>[;<version>] ...");
out.println("obr " + JAVADOC_CMD
+ " [" + EXTRACT_SWITCH
+ "] <local-dir> <bundle-name>[;<version>] ...");
}
}