{"action":"created","issue":{"url":"https://api.github.com/repos/webjars/webjars-locator-core/issues/9","labels_url":"https://api.github.com/repos/webjars/webjars-locator-core/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/webjars/webjars-locator-core/issues/9/comments","events_url":"https://api.github.com/repos/webjars/webjars-locator-core/issues/9/events","html_url":"https://github.com/webjars/webjars-locator-core/pull/9","id":128804799,"number":9,"title":"add OSGi support","user":{"login":"davidvanlaatum","id":1491158,"avatar_url":"https://avatars.githubusercontent.com/u/1491158?v=3","gravatar_id":"","url":"https://api.github.com/users/davidvanlaatum","html_url":"https://github.com/davidvanlaatum","followers_url":"https://api.github.com/users/davidvanlaatum/followers","following_url":"https://api.github.com/users/davidvanlaatum/following{/other_user}","gists_url":"https://api.github.com/users/davidvanlaatum/gists{/gist_id}","starred_url":"https://api.github.com/users/davidvanlaatum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidvanlaatum/subscriptions","organizations_url":"https://api.github.com/users/davidvanlaatum/orgs","repos_url":"https://api.github.com/users/davidvanlaatum/repos","events_url":"https://api.github.com/users/davidvanlaatum/events{/privacy}","received_events_url":"https://api.github.com/users/davidvanlaatum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-26T12:24:59Z","updated_at":"2016-01-26T13:43:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/webjars/webjars-locator-core/pulls/9","html_url":"https://github.com/webjars/webjars-locator-core/pull/9","diff_url":"https://github.com/webjars/webjars-locator-core/pull/9.diff","patch_url":"https://github.com/webjars/webjars-locator-core/pull/9.patch"},"body":"Initial support for OSGi best I can do for now without restructuring.\r\nAbout to send a pull for webjars-locator as well."},"comment":{"url":"https://api.github.com/repos/webjars/webjars-locator-core/issues/comments/175019157","html_url":"https://github.com/webjars/webjars-locator-core/pull/9#issuecomment-175019157","issue_url":"https://api.github.com/repos/webjars/webjars-locator-core/issues/9","id":175019157,"user":{"login":"davidvanlaatum","id":1491158,"avatar_url":"https://avatars.githubusercontent.com/u/1491158?v=3","gravatar_id":"","url":"https://api.github.com/users/davidvanlaatum","html_url":"https://github.com/davidvanlaatum","followers_url":"https://api.github.com/users/davidvanlaatum/followers","following_url":"https://api.github.com/users/davidvanlaatum/following{/other_user}","gists_url":"https://api.github.com/users/davidvanlaatum/gists{/gist_id}","starred_url":"https://api.github.com/users/davidvanlaatum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidvanlaatum/subscriptions","organizations_url":"https://api.github.com/users/davidvanlaatum/orgs","repos_url":"https://api.github.com/users/davidvanlaatum/repos","events_url":"https://api.github.com/users/davidvanlaatum/events{/privacy}","received_events_url":"https://api.github.com/users/davidvanlaatum/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T13:43:15Z","updated_at":"2016-01-26T13:43:15Z","body":"Example Servlet to register with OSGi http whiteboard\r\n\r\n````java\r\n\r\n@OsgiServiceProvider( classes = Servlet.class )\r\n@Properties( {\r\n                     @Property( name = \"osgi.http.whiteboard.servlet.pattern\", value = \"/webjarsjs\" ),\r\n                     @Property( name = \"osgi.http.whiteboard.servlet.name\", value = \"WebJars RequireJS Handler\" )\r\n             } )\r\n@Named( \"WebJarsRequireJSServlet\" )\r\npublic class WebJarsRequireJSServlet extends HttpServlet {\r\n    @Inject\r\n    private BundleContext bundleContext;\r\n\r\n    @Override\r\n    protected void doGet ( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException {\r\n        resp.setContentType ( \"application/javascript\" );\r\n        try ( ServletOutputStream out = resp.getOutputStream () ) {\r\n            out.print (\r\n                    RequireJS.generateSetupJavaScript ( Collections.singletonList ( \"/webjars/\" ) ) );\r\n        }\r\n    }\r\n\r\n    @PostConstruct\r\n    public void init () {\r\n        RequireJS.setResourceLocator ( new OSGIResourceLocatorImpl ( bundleContext ) );\r\n    }\r\n}\r\n````"}}