{"action":"created","comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/comments/35772103","id":35772103,"diff_hunk":"@@ -71,36 +79,38 @@ public static void main(String[] args) throws Exception {\n \t\t\tSystem.err.println(\"Either the 'modules' system property or 'MODULES' environment variable is required.\");\n \t\t\tSystem.exit(1);\n \t\t}\n-\t\tString moduleHome = System.getProperty(\"module.home\");\n-\t\tif (moduleHome == null) {\n-\t\t\tmoduleHome = System.getenv(\"MODULE_HOME\");\n-\t\t}\n-\t\tif (moduleHome == null) {\n-\t\t\tmoduleHome = DEFAULT_MODULE_HOME;\n-\t\t}\n-\t\tModuleLauncher launcher = new ModuleLauncher(new File(moduleHome));\n+\t\tModuleLauncher launcher = new ModuleLauncher();\n \t\tlauncher.launch(modules.split(\",\"), args);\n \t}\n \n \n \tprivate static class ModuleLaunchTask implements Runnable {\n \n-\t\tprivate final File directory;\n+\t\tprivate final ModuleResolver moduleResolver;\n+\n+\t\tprivate final String groupId;\n+\n+\t\tprivate final String artifactId;\n \n-\t\tprivate final String module;\n+\t\tprivate final String version;\n \n \t\tprivate final String[] args;\n \n-\t\tModuleLaunchTask(File directory, String module, String[] args) {\n-\t\t\tthis.directory = directory;\n-\t\t\tthis.module = module;\n+\t\tModuleLaunchTask(ModuleResolver moduleResolver, String module, String[] args) {\n+\t\t\tthis.moduleResolver = moduleResolver;\n+\t\t\tString[] tokens = module.split(\":\");\n+\t\t\tAssert.isTrue(tokens.length == 3, \"required module format is: 'groupId:artifactId:version'\");\n+\t\t\tthis.groupId = tokens[0];\n+\t\t\tthis.artifactId = tokens[1];\n+\t\t\tthis.version = tokens[2];\n \t\t\tthis.args = args;\n \t\t}\n \n \t\t@Override\n \t\tpublic void run() {\n \t\t\ttry {\n-\t\t\t\tJarFileArchive jarFileArchive = new JarFileArchive(new File(directory, module));\n+\t\t\t\tResource resource = moduleResolver.resolve(groupId, artifactId, version, \"exec\", \"jar\");","path":"spring-cloud-stream-module-launcher/src/main/java/org/springframework/cloud/stream/module/launcher/ModuleLauncher.java","position":107,"original_position":107,"commit_id":"1288b614fba30b354ece72823272a079f50276a1","original_commit_id":"1288b614fba30b354ece72823272a079f50276a1","user":{"login":"markfisher","id":140784,"avatar_url":"https://avatars.githubusercontent.com/u/140784?v=3","gravatar_id":"","url":"https://api.github.com/users/markfisher","html_url":"https://github.com/markfisher","followers_url":"https://api.github.com/users/markfisher/followers","following_url":"https://api.github.com/users/markfisher/following{/other_user}","gists_url":"https://api.github.com/users/markfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/markfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfisher/subscriptions","organizations_url":"https://api.github.com/users/markfisher/orgs","repos_url":"https://api.github.com/users/markfisher/repos","events_url":"https://api.github.com/users/markfisher/events{/privacy}","received_events_url":"https://api.github.com/users/markfisher/received_events","type":"User","site_admin":false},"body":"yes I need to update this now... will resubmit","created_at":"2015-07-29T15:21:24Z","updated_at":"2015-07-29T15:21:24Z","html_url":"https://github.com/spring-cloud/spring-cloud-stream/pull/46#discussion_r35772103","pull_request_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/comments/35772103"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-stream/pull/46#discussion_r35772103"},"pull_request":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46","id":41065594,"html_url":"https://github.com/spring-cloud/spring-cloud-stream/pull/46","diff_url":"https://github.com/spring-cloud/spring-cloud-stream/pull/46.diff","patch_url":"https://github.com/spring-cloud/spring-cloud-stream/pull/46.patch","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/issues/46","number":46,"state":"open","locked":false,"title":"ModuleLauncher uses ModuleResolver","user":{"login":"markfisher","id":140784,"avatar_url":"https://avatars.githubusercontent.com/u/140784?v=3","gravatar_id":"","url":"https://api.github.com/users/markfisher","html_url":"https://github.com/markfisher","followers_url":"https://api.github.com/users/markfisher/followers","following_url":"https://api.github.com/users/markfisher/following{/other_user}","gists_url":"https://api.github.com/users/markfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/markfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfisher/subscriptions","organizations_url":"https://api.github.com/users/markfisher/orgs","repos_url":"https://api.github.com/users/markfisher/repos","events_url":"https://api.github.com/users/markfisher/events{/privacy}","received_events_url":"https://api.github.com/users/markfisher/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-28T21:56:05Z","updated_at":"2015-07-29T15:21:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0397e6c3d2caea1d212eff3e3528c23700dfa4c8","assignee":{"login":"markpollack","id":247466,"avatar_url":"https://avatars.githubusercontent.com/u/247466?v=3","gravatar_id":"","url":"https://api.github.com/users/markpollack","html_url":"https://github.com/markpollack","followers_url":"https://api.github.com/users/markpollack/followers","following_url":"https://api.github.com/users/markpollack/following{/other_user}","gists_url":"https://api.github.com/users/markpollack/gists{/gist_id}","starred_url":"https://api.github.com/users/markpollack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markpollack/subscriptions","organizations_url":"https://api.github.com/users/markpollack/orgs","repos_url":"https://api.github.com/users/markpollack/repos","events_url":"https://api.github.com/users/markpollack/events{/privacy}","received_events_url":"https://api.github.com/users/markpollack/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46/commits","review_comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46/comments","review_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/issues/46/comments","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/statuses/1288b614fba30b354ece72823272a079f50276a1","head":{"label":"markfisher:launcher-using-resolver","ref":"launcher-using-resolver","sha":"1288b614fba30b354ece72823272a079f50276a1","user":{"login":"markfisher","id":140784,"avatar_url":"https://avatars.githubusercontent.com/u/140784?v=3","gravatar_id":"","url":"https://api.github.com/users/markfisher","html_url":"https://github.com/markfisher","followers_url":"https://api.github.com/users/markfisher/followers","following_url":"https://api.github.com/users/markfisher/following{/other_user}","gists_url":"https://api.github.com/users/markfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/markfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfisher/subscriptions","organizations_url":"https://api.github.com/users/markfisher/orgs","repos_url":"https://api.github.com/users/markfisher/repos","events_url":"https://api.github.com/users/markfisher/events{/privacy}","received_events_url":"https://api.github.com/users/markfisher/received_events","type":"User","site_admin":false},"repo":{"id":38768370,"name":"spring-cloud-stream","full_name":"markfisher/spring-cloud-stream","owner":{"login":"markfisher","id":140784,"avatar_url":"https://avatars.githubusercontent.com/u/140784?v=3","gravatar_id":"","url":"https://api.github.com/users/markfisher","html_url":"https://github.com/markfisher","followers_url":"https://api.github.com/users/markfisher/followers","following_url":"https://api.github.com/users/markfisher/following{/other_user}","gists_url":"https://api.github.com/users/markfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/markfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfisher/subscriptions","organizations_url":"https://api.github.com/users/markfisher/orgs","repos_url":"https://api.github.com/users/markfisher/repos","events_url":"https://api.github.com/users/markfisher/events{/privacy}","received_events_url":"https://api.github.com/users/markfisher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markfisher/spring-cloud-stream","description":"Messaging Microservices with Spring Integration","fork":true,"url":"https://api.github.com/repos/markfisher/spring-cloud-stream","forks_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/forks","keys_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/teams","hooks_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/hooks","issue_events_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/issues/events{/number}","events_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/events","assignees_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/assignees{/user}","branches_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/branches{/branch}","tags_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/tags","blobs_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/statuses/{sha}","languages_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/languages","stargazers_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/stargazers","contributors_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/contributors","subscribers_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/subscribers","subscription_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/subscription","commits_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/contents/{+path}","compare_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/merges","archive_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/downloads","issues_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/issues{/number}","pulls_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/pulls{/number}","milestones_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/milestones{/number}","notifications_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/labels{/name}","releases_url":"https://api.github.com/repos/markfisher/spring-cloud-stream/releases{/id}","created_at":"2015-07-08T17:13:10Z","updated_at":"2015-07-15T12:04:27Z","pushed_at":"2015-07-29T15:19:35Z","git_url":"git://github.com/markfisher/spring-cloud-stream.git","ssh_url":"git@github.com:markfisher/spring-cloud-stream.git","clone_url":"https://github.com/markfisher/spring-cloud-stream.git","svn_url":"https://github.com/markfisher/spring-cloud-stream","homepage":null,"size":606,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spring-cloud:master","ref":"master","sha":"ffc57e0c04bbc932eb3de880cb03d0c8b58fe6fd","user":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"repo":{"id":38764029,"name":"spring-cloud-stream","full_name":"spring-cloud/spring-cloud-stream","owner":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-cloud/spring-cloud-stream","description":"Messaging Microservices with Spring Integration","fork":false,"url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream","forks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/forks","keys_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/teams","hooks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/hooks","issue_events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/issues/events{/number}","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/events","assignees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/assignees{/user}","branches_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/branches{/branch}","tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/tags","blobs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/languages","stargazers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/stargazers","contributors_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/contributors","subscribers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/subscribers","subscription_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/subscription","commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/contents/{+path}","compare_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/merges","archive_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/downloads","issues_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/issues{/number}","pulls_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/labels{/name}","releases_url":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/releases{/id}","created_at":"2015-07-08T15:51:38Z","updated_at":"2015-07-15T15:03:18Z","pushed_at":"2015-07-29T15:19:31Z","git_url":"git://github.com/spring-cloud/spring-cloud-stream.git","ssh_url":"git@github.com:spring-cloud/spring-cloud-stream.git","clone_url":"https://github.com/spring-cloud/spring-cloud-stream.git","svn_url":"https://github.com/spring-cloud/spring-cloud-stream","homepage":"http://cloud.spring.io/spring-cloud-stream/","size":2059,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":7,"forks":11,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-stream/pull/46"},"issue":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/issues/46"},"comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-stream/statuses/1288b614fba30b354ece72823272a079f50276a1"}}}}