{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/components/pulls/comments/76983604","id":76983604,"diff_hunk":"@@ -0,0 +1,53 @@\n+// ============================================================================\n+//\n+// Copyright (C) 2006-2016 Talend Inc. - www.talend.com\n+//\n+// This source code is available under agreement available at\n+// %InstallDIR%\\features\\org.talend.rcp.branding.%PRODUCTNAME%\\%PRODUCTNAME%license.txt\n+//\n+// You should have received a copy of the agreement\n+// along with this program; if not, write to Talend SA\n+// 9 rue Pages 92150 Suresnes, France\n+//\n+// ============================================================================\n+package org.talend.components.runtimeservice;\n+\n+import java.net.MalformedURLException;\n+import java.net.URL;\n+import java.net.URLStreamHandler;\n+import java.net.URLStreamHandlerFactory;\n+import java.util.ArrayList;\n+\n+import org.ops4j.pax.url.mvn.Handler;\n+import org.ops4j.pax.url.mvn.ServiceConstants;\n+import org.talend.components.api.component.runtime.RuntimeInfo;\n+import org.talend.daikon.sandbox.SandboxInstanceFactory;\n+import org.talend.daikon.sandbox.SandboxedInstance;\n+\n+public class RuntimeServiceImpl implements RuntimeService {\n+\n+    static {// install the mvn protocol handler if not already installed.\n+        try {\n+            new URL(\"mvn:foo/bar\");\n+        } catch (MalformedURLException e) {// mvn protocal not installed so do it now\n+            URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {\n+\n+                @Override\n+                public URLStreamHandler createURLStreamHandler(String protocol) {\n+                    if (ServiceConstants.PROTOCOL.equals(protocol)) {\n+                        return new Handler();\n+                    } else {\n+                        return null;\n+                    }\n+                }\n+            });\n+        }\n+    }\n+\n+    @Override\n+    public SandboxedInstance createRuntimeClass(RuntimeInfo runtimeInfo, ClassLoader classLoader) {","path":"components-api-runtime-service/components-api-runtime-service/src/main/java/org/talend/components/runtimeservice/RuntimeServiceImpl.java","position":48,"original_position":48,"commit_id":"58bbdcf2d1260386f3725bdfe5376e36edd949be","original_commit_id":"58bbdcf2d1260386f3725bdfe5376e36edd949be","user":{"login":"RyanSkraba","id":7744819,"avatar_url":"https://avatars.githubusercontent.com/u/7744819?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanSkraba","html_url":"https://github.com/RyanSkraba","followers_url":"https://api.github.com/users/RyanSkraba/followers","following_url":"https://api.github.com/users/RyanSkraba/following{/other_user}","gists_url":"https://api.github.com/users/RyanSkraba/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanSkraba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanSkraba/subscriptions","organizations_url":"https://api.github.com/users/RyanSkraba/orgs","repos_url":"https://api.github.com/users/RyanSkraba/repos","events_url":"https://api.github.com/users/RyanSkraba/events{/privacy}","received_events_url":"https://api.github.com/users/RyanSkraba/received_events","type":"User","site_admin":false},"body":"If the following two lines are the only value added by the RuntimeService module (along with the setup logic above, I guess), I suggest just sticking them beside the RuntimeInfo class in `components-api` or in `RuntimeUtil` in `component-api-service` if there are dependency issues.","created_at":"2016-08-31T13:08:33Z","updated_at":"2016-08-31T13:08:33Z","html_url":"https://github.com/Talend/components/pull/224#discussion_r76983604","pull_request_url":"https://api.github.com/repos/Talend/components/pulls/224","_links":{"self":{"href":"https://api.github.com/repos/Talend/components/pulls/comments/76983604"},"html":{"href":"https://github.com/Talend/components/pull/224#discussion_r76983604"},"pull_request":{"href":"https://api.github.com/repos/Talend/components/pulls/224"}}},"pull_request":{"url":"https://api.github.com/repos/Talend/components/pulls/224","id":82921559,"html_url":"https://github.com/Talend/components/pull/224","diff_url":"https://github.com/Talend/components/pull/224.diff","patch_url":"https://github.com/Talend/components/pull/224.patch","issue_url":"https://api.github.com/repos/Talend/components/issues/224","number":224,"state":"open","locked":false,"title":"Feature/tcomp 112 multiple runtimes and deps","user":{"login":"sgandon","id":783286,"avatar_url":"https://avatars.githubusercontent.com/u/783286?v=3","gravatar_id":"","url":"https://api.github.com/users/sgandon","html_url":"https://github.com/sgandon","followers_url":"https://api.github.com/users/sgandon/followers","following_url":"https://api.github.com/users/sgandon/following{/other_user}","gists_url":"https://api.github.com/users/sgandon/gists{/gist_id}","starred_url":"https://api.github.com/users/sgandon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgandon/subscriptions","organizations_url":"https://api.github.com/users/sgandon/orgs","repos_url":"https://api.github.com/users/sgandon/repos","events_url":"https://api.github.com/users/sgandon/events{/privacy}","received_events_url":"https://api.github.com/users/sgandon/received_events","type":"User","site_admin":false},"body":"Here are the modifications, that break certain APIs so I changed the version for most most of the modules.\r\n- Created One interface *RuntimeInfo* to allow the Component developer to return the Runtime class name as well as the jar dependencies.\r\n- removed all Runtime interface to move to on single *ComponentDefinition* method called\r\n`RuntimeInfo getRuntimeInfo(Properties properties, ConnectorTopology connectorTopology);`. This method allow for the CompDev to compute the Runtime info according to the ComponentProperties and the Connector topology (see below).\r\n- added a ConnectorTopoly enum so that the component designer can say what kind of connectivity it supports thanks to a new *ComponentDefinition* method called\r\n`Set<ConnectorTopology> getSupportedConnectorTopologies();`. Here are the enum values (see the real file for complete javadoc).\r\n```\r\npublic enum ConnectorTopology {\r\n    OUTPUTS,\r\n    INPUTS,\r\n    INPUT_AND_OUTPUT,\r\n    NONE;\r\n}\r\n\r\n```\r\n- added a Runtime service in a new dedicated module with some submodules for an example/test case of a Component with 2 versions of the library\r\n- I also changed the way the dependencies.txt file is generated to be used during test more easily so it implied a pom change for all components.\r\n\r\nWARNING : I did not manage to make the tests run in the OSGI test module. The test are not failing, they are not even run because I did not success to make my test component register in the OSGI service registry. I have not found the reason yet. this is the reason why you have a class called : MultiRuntimeTestITXX.java\r\n","created_at":"2016-08-26T17:05:58Z","updated_at":"2016-08-31T13:08:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f68c564302ec5c68057427bb870abca9bed8d4fa","assignee":{"login":"francisu","id":944949,"avatar_url":"https://avatars.githubusercontent.com/u/944949?v=3","gravatar_id":"","url":"https://api.github.com/users/francisu","html_url":"https://github.com/francisu","followers_url":"https://api.github.com/users/francisu/followers","following_url":"https://api.github.com/users/francisu/following{/other_user}","gists_url":"https://api.github.com/users/francisu/gists{/gist_id}","starred_url":"https://api.github.com/users/francisu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francisu/subscriptions","organizations_url":"https://api.github.com/users/francisu/orgs","repos_url":"https://api.github.com/users/francisu/repos","events_url":"https://api.github.com/users/francisu/events{/privacy}","received_events_url":"https://api.github.com/users/francisu/received_events","type":"User","site_admin":false},"assignees":[{"login":"francisu","id":944949,"avatar_url":"https://avatars.githubusercontent.com/u/944949?v=3","gravatar_id":"","url":"https://api.github.com/users/francisu","html_url":"https://github.com/francisu","followers_url":"https://api.github.com/users/francisu/followers","following_url":"https://api.github.com/users/francisu/following{/other_user}","gists_url":"https://api.github.com/users/francisu/gists{/gist_id}","starred_url":"https://api.github.com/users/francisu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francisu/subscriptions","organizations_url":"https://api.github.com/users/francisu/orgs","repos_url":"https://api.github.com/users/francisu/repos","events_url":"https://api.github.com/users/francisu/events{/privacy}","received_events_url":"https://api.github.com/users/francisu/received_events","type":"User","site_admin":false},{"login":"RyanSkraba","id":7744819,"avatar_url":"https://avatars.githubusercontent.com/u/7744819?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanSkraba","html_url":"https://github.com/RyanSkraba","followers_url":"https://api.github.com/users/RyanSkraba/followers","following_url":"https://api.github.com/users/RyanSkraba/following{/other_user}","gists_url":"https://api.github.com/users/RyanSkraba/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanSkraba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanSkraba/subscriptions","organizations_url":"https://api.github.com/users/RyanSkraba/orgs","repos_url":"https://api.github.com/users/RyanSkraba/repos","events_url":"https://api.github.com/users/RyanSkraba/events{/privacy}","received_events_url":"https://api.github.com/users/RyanSkraba/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Talend/components/pulls/224/commits","review_comments_url":"https://api.github.com/repos/Talend/components/pulls/224/comments","review_comment_url":"https://api.github.com/repos/Talend/components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/components/issues/224/comments","statuses_url":"https://api.github.com/repos/Talend/components/statuses/58bbdcf2d1260386f3725bdfe5376e36edd949be","head":{"label":"Talend:feature/TCOMP_112_multiple_runtimes_and_deps","ref":"feature/TCOMP_112_multiple_runtimes_and_deps","sha":"58bbdcf2d1260386f3725bdfe5376e36edd949be","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":39855061,"name":"components","full_name":"Talend/components","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/components","description":"Talend component infrastructure and public components","fork":false,"url":"https://api.github.com/repos/Talend/components","forks_url":"https://api.github.com/repos/Talend/components/forks","keys_url":"https://api.github.com/repos/Talend/components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/components/teams","hooks_url":"https://api.github.com/repos/Talend/components/hooks","issue_events_url":"https://api.github.com/repos/Talend/components/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/components/events","assignees_url":"https://api.github.com/repos/Talend/components/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/components/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/components/tags","blobs_url":"https://api.github.com/repos/Talend/components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/components/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/components/languages","stargazers_url":"https://api.github.com/repos/Talend/components/stargazers","contributors_url":"https://api.github.com/repos/Talend/components/contributors","subscribers_url":"https://api.github.com/repos/Talend/components/subscribers","subscription_url":"https://api.github.com/repos/Talend/components/subscription","commits_url":"https://api.github.com/repos/Talend/components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/components/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/components/merges","archive_url":"https://api.github.com/repos/Talend/components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/components/downloads","issues_url":"https://api.github.com/repos/Talend/components/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/components/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/components/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/components/labels{/name}","releases_url":"https://api.github.com/repos/Talend/components/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/components/deployments","created_at":"2015-07-28T20:02:50Z","updated_at":"2016-07-27T18:33:38Z","pushed_at":"2016-08-31T13:07:17Z","git_url":"git://github.com/Talend/components.git","ssh_url":"git@github.com:Talend/components.git","clone_url":"https://github.com/Talend/components.git","svn_url":"https://github.com/Talend/components","homepage":null,"size":5220,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":7,"forks":15,"open_issues":7,"watchers":5,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"407941aaf5dae78c3f3470158510073019c20764","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":39855061,"name":"components","full_name":"Talend/components","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/components","description":"Talend component infrastructure and public components","fork":false,"url":"https://api.github.com/repos/Talend/components","forks_url":"https://api.github.com/repos/Talend/components/forks","keys_url":"https://api.github.com/repos/Talend/components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/components/teams","hooks_url":"https://api.github.com/repos/Talend/components/hooks","issue_events_url":"https://api.github.com/repos/Talend/components/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/components/events","assignees_url":"https://api.github.com/repos/Talend/components/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/components/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/components/tags","blobs_url":"https://api.github.com/repos/Talend/components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/components/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/components/languages","stargazers_url":"https://api.github.com/repos/Talend/components/stargazers","contributors_url":"https://api.github.com/repos/Talend/components/contributors","subscribers_url":"https://api.github.com/repos/Talend/components/subscribers","subscription_url":"https://api.github.com/repos/Talend/components/subscription","commits_url":"https://api.github.com/repos/Talend/components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/components/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/components/merges","archive_url":"https://api.github.com/repos/Talend/components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/components/downloads","issues_url":"https://api.github.com/repos/Talend/components/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/components/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/components/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/components/labels{/name}","releases_url":"https://api.github.com/repos/Talend/components/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/components/deployments","created_at":"2015-07-28T20:02:50Z","updated_at":"2016-07-27T18:33:38Z","pushed_at":"2016-08-31T13:07:17Z","git_url":"git://github.com/Talend/components.git","ssh_url":"git@github.com:Talend/components.git","clone_url":"https://github.com/Talend/components.git","svn_url":"https://github.com/Talend/components","homepage":null,"size":5220,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":7,"forks":15,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/components/pulls/224"},"html":{"href":"https://github.com/Talend/components/pull/224"},"issue":{"href":"https://api.github.com/repos/Talend/components/issues/224"},"comments":{"href":"https://api.github.com/repos/Talend/components/issues/224/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/components/pulls/224/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/components/pulls/224/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/components/statuses/58bbdcf2d1260386f3725bdfe5376e36edd949be"}}}}
{"actor":{"display_login":"RyanSkraba"}}