def jar(jarfile, klass, *args):
    'Syntax: [storm jar topology-jar-path class ...]\n\n    Runs the main method of class with the specified arguments.\n    The storm worker dependencies and configs in ~/.storm are put on the classpath.\n    The process is configured so that StormSubmitter\n    (http://storm.apache.org/releases/current/javadocs/org/apache/storm/StormSubmitter.html)\n    will upload the jar at topology-jar-path when the topology is submitted.\n\n    When you want to ship other jars which is not included to application jar, you can pass them to --jars option with comma-separated string.\n    For example, --jars "your-local-jar.jar,your-local-jar2.jar" will load your-local-jar.jar and your-local-jar2.jar.\n    And when you want to ship maven artifacts and its transitive dependencies, you can pass them to --artifacts with comma-separated string.\n    You can also exclude some dependencies like what you\'re doing in maven pom.\n    Please add exclusion artifacts with \'^\' separated string after the artifact.\n    For example, -artifacts "redis.clients:jedis:2.9.0,org.apache.kafka:kafka-clients:1.0.0^org.slf4j:slf4j-api" will load jedis and kafka-clients artifact and all of transitive dependencies but exclude slf4j-api from kafka.\n\n    When you need to pull the artifacts from other than Maven Central, you can pass remote repositories to --artifactRepositories option with comma-separated string.\n    Repository format is "<name>^<url>". \'^\' is taken as separator because URL allows various characters.\n    For example, --artifactRepositories "jboss-repository^http://repository.jboss.com/maven2,HDPRepo^http://repo.hortonworks.com/content/groups/public/" will add JBoss and HDP repositories for dependency resolver.\n    You can provide local maven repository directory via --mavenLocalRepositoryDirectory if you would like to use specific directory. It might help when you don\'t have \'.m2/repository\' directory in home directory, because CWD is sometimes non-deterministic (fragile).\n\n    You can also provide proxy information to let dependency resolver utilizing proxy if needed. There\'re three parameters for proxy:\n    --proxyUrl: URL representation of proxy (\'http://host:port\')\n    --proxyUsername: username of proxy if it requires basic auth\n    --proxyPassword: password of proxy if it requires basic auth\n\n    Complete example of options is here: `./bin/storm jar example/storm-starter/storm-starter-topologies-*.jar org.apache.storm.starter.RollingTopWords blobstore-remote2 remote --jars "./external/storm-redis/storm-redis-1.1.0.jar,./external/storm-kafka-client/storm-kafka-client-1.1.0.jar" --artifacts "redis.clients:jedis:2.9.0,org.apache.kafka:kafka-clients:1.0.0^org.slf4j:slf4j-api" --artifactRepositories "jboss-repository^http://repository.jboss.com/maven2,HDPRepo^http://repo.hortonworks.com/content/groups/public/"`\n\n    When you pass jars and/or artifacts options, StormSubmitter will upload them when the topology is submitted, and they will be included to classpath of both the process which runs the class, and also workers for that topology.\n\n    If for some reason you need to have the full storm classpath, not just the one for the worker you may include the command line option `--storm-server-classpath`.  Please be careful because this will add things to the classpath that will not be on the worker classpath and could result in the worker not running.\n    '
    [server_class_path, args] = parse_jar_opts(args)
    run_client_jar(jarfile, klass, list(args), client=(not server_class_path), daemon=False)
Syntax: [storm jar topology-jar-path class ...]

Runs the main method of class with the specified arguments.
The storm worker dependencies and configs in ~/.storm are put on the classpath.
The process is configured so that StormSubmitter
(http://storm.apache.org/releases/current/javadocs/org/apache/storm/StormSubmitter.html)
will upload the jar at topology-jar-path when the topology is submitted.

When you want to ship other jars which is not included to application jar, you can pass them to --jars option with comma-separated string.
For example, --jars "your-local-jar.jar,your-local-jar2.jar" will load your-local-jar.jar and your-local-jar2.jar.
And when you want to ship maven artifacts and its transitive dependencies, you can pass them to --artifacts with comma-separated string.
You can also exclude some dependencies like what you're doing in maven pom.
Please add exclusion artifacts with '^' separated string after the artifact.
For example, -artifacts "redis.clients:jedis:2.9.0,org.apache.kafka:kafka-clients:1.0.0^org.slf4j:slf4j-api" will load jedis and kafka-clients artifact and all of transitive dependencies but exclude slf4j-api from kafka.

When you need to pull the artifacts from other than Maven Central, you can pass remote repositories to --artifactRepositories option with comma-separated string.
Repository format is "<name>^<url>". '^' is taken as separator because URL allows various characters.
For example, --artifactRepositories "jboss-repository^http://repository.jboss.com/maven2,HDPRepo^http://repo.hortonworks.com/content/groups/public/" will add JBoss and HDP repositories for dependency resolver.
You can provide local maven repository directory via --mavenLocalRepositoryDirectory if you would like to use specific directory. It might help when you don't have '.m2/repository' directory in home directory, because CWD is sometimes non-deterministic (fragile).

You can also provide proxy information to let dependency resolver utilizing proxy if needed. There're three parameters for proxy:
--proxyUrl: URL representation of proxy ('http://host:port')
--proxyUsername: username of proxy if it requires basic auth
--proxyPassword: password of proxy if it requires basic auth

Complete example of options is here: `./bin/storm jar example/storm-starter/storm-starter-topologies-*.jar org.apache.storm.starter.RollingTopWords blobstore-remote2 remote --jars "./external/storm-redis/storm-redis-1.1.0.jar,./external/storm-kafka-client/storm-kafka-client-1.1.0.jar" --artifacts "redis.clients:jedis:2.9.0,org.apache.kafka:kafka-clients:1.0.0^org.slf4j:slf4j-api" --artifactRepositories "jboss-repository^http://repository.jboss.com/maven2,HDPRepo^http://repo.hortonworks.com/content/groups/public/"`

When you pass jars and/or artifacts options, StormSubmitter will upload them when the topology is submitted, and they will be included to classpath of both the process which runs the class, and also workers for that topology.

If for some reason you need to have the full storm classpath, not just the one for the worker you may include the command line option `--storm-server-classpath`.  Please be careful because this will add things to the classpath that will not be on the worker classpath and could result in the worker not running.
def jar(jarfile, klass, *args):
    'Syntax: [storm jar topology-jar-path class ...]\n\n    Runs the main method of class with the specified arguments.\n    The storm worker dependencies and configs in ~/.storm are put on the classpath.\n    The process is configured so that StormSubmitter\n    (http://storm.apache.org/releases/current/javadocs/org/apache/storm/StormSubmitter.html)\n    will upload the jar at topology-jar-path when the topology is submitted.\n\n    When you want to ship other jars which is not included to application jar, you can pass them to --jars option with comma-separated string.\n    For example, --jars "your-local-jar.jar,your-local-jar2.jar" will load your-local-jar.jar and your-local-jar2.jar.\n    And when you want to ship maven artifacts and its transitive dependencies, you can pass them to --artifacts with comma-separated string.\n    You can also exclude some dependencies like what you\'re doing in maven pom.\n    Please add exclusion artifacts with \'^\' separated string after the artifact.\n    For example, -artifacts "redis.clients:jedis:2.9.0,org.apache.kafka:kafka-clients:1.0.0^org.slf4j:slf4j-api" will load jedis and kafka-clients artifact and all of transitive dependencies but exclude slf4j-api from kafka.\n\n    When you need to pull the artifacts from other than Maven Central, you can pass remote repositories to --artifactRepositories option with comma-separated string.\n    Repository format is "<name>^<url>". \'^\' is taken as separator because URL allows various characters.\n    For example, --artifactRepositories "jboss-repository^http://repository.jboss.com/maven2,HDPRepo^http://repo.hortonworks.com/content/groups/public/" will add JBoss and HDP repositories for dependency resolver.\n    You can provide local maven repository directory via --mavenLocalRepositoryDirectory if you would like to use specific directory. It might help when you don\'t have \'.m2/repository\' directory in home directory, because CWD is sometimes non-deterministic (fragile).\n\n    You can also provide proxy information to let dependency resolver utilizing proxy if needed. There\'re three parameters for proxy:\n    --proxyUrl: URL representation of proxy (\'http://host:port\')\n    --proxyUsername: username of proxy if it requires basic auth\n    --proxyPassword: password of proxy if it requires basic auth\n\n    Complete example of options is here: `./bin/storm jar example/storm-starter/storm-starter-topologies-*.jar org.apache.storm.starter.RollingTopWords blobstore-remote2 remote --jars "./external/storm-redis/storm-redis-1.1.0.jar,./external/storm-kafka-client/storm-kafka-client-1.1.0.jar" --artifacts "redis.clients:jedis:2.9.0,org.apache.kafka:kafka-clients:1.0.0^org.slf4j:slf4j-api" --artifactRepositories "jboss-repository^http://repository.jboss.com/maven2,HDPRepo^http://repo.hortonworks.com/content/groups/public/"`\n\n    When you pass jars and/or artifacts options, StormSubmitter will upload them when the topology is submitted, and they will be included to classpath of both the process which runs the class, and also workers for that topology.\n\n    If for some reason you need to have the full storm classpath, not just the one for the worker you may include the command line option `--storm-server-classpath`.  Please be careful because this will add things to the classpath that will not be on the worker classpath and could result in the worker not running.\n    '
    [server_class_path, args] = parse_jar_opts(args)
    run_client_jar(jarfile, klass, list(args), client=(not server_class_path), daemon=False)