{"action":"created","comment":{"url":"https://api.github.com/repos/kiegroup/drools/pulls/comments/175421641","pull_request_review_id":104945675,"id":175421641,"diff_hunk":"@@ -0,0 +1,179 @@\n+/*\n+ * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *       http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.drools.testcoverage.osgi;\n+\n+import static org.ops4j.pax.exam.CoreOptions.junitBundles;\n+import static org.ops4j.pax.exam.CoreOptions.maven;\n+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;\n+import static org.ops4j.pax.exam.CoreOptions.options;\n+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;\n+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;\n+\n+import java.io.File;\n+import java.util.Properties;\n+import java.util.concurrent.Callable;\n+\n+import org.drools.compiler.builder.impl.KnowledgeBuilderImpl;\n+import org.drools.core.io.impl.ClassPathResource;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.kie.api.KieBase;\n+import org.kie.api.KieBaseConfiguration;\n+import org.kie.api.KieServices;\n+import org.kie.api.io.ResourceType;\n+import org.kie.api.runtime.KieSession;\n+import org.kie.internal.builder.KnowledgeBuilderConfiguration;\n+import org.kie.internal.builder.KnowledgeBuilderFactory;\n+import org.ops4j.pax.exam.Configuration;\n+import org.ops4j.pax.exam.Option;\n+import org.ops4j.pax.exam.junit.PaxExam;\n+import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;\n+import org.ops4j.pax.exam.options.MavenArtifactUrlReference;\n+import org.ops4j.pax.exam.options.MavenUrlReference;\n+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;\n+import org.ops4j.pax.exam.spi.reactors.PerMethod;\n+\n+@RunWith(PaxExam.class)\n+@ExamReactorStrategy(PerMethod.class)\n+public class PMML4OsgiCompilerTest {\n+\n+    private static final String VERSION = \"7.7.0-SNAPSHOT\";\n+\n+    @Configuration\n+    public Option[] config() {\n+        // calls to versionAsInProject() need to be inside this method\n+\n+        final MavenArtifactUrlReference karafUrl = maven()\n+                                                          .groupId(\"org.apache.karaf\")\n+                                                          .artifactId(\"apache-karaf\")\n+                                                          .versionAsInProject()\n+                                                          .type(\"tar.gz\");\n+\n+        final MavenUrlReference karafStandardRepo = maven()\n+                                                           .groupId(\"org.apache.karaf.features\")\n+                                                           .artifactId(\"standard\")\n+                                                           .versionAsInProject()\n+                                                           .classifier(\"features\")\n+                                                           .type(\"xml\");\n+\n+        return options(\n+\n+                       karafDistributionConfiguration()\n+                                                       .frameworkUrl(karafUrl)\n+                                                       .unpackDirectory(new File(\"target/exam\"))\n+                                                       .useDeployFolder(false),\n+\n+                       logLevel()\n+                                 .logLevel(LogLevel.INFO),\n+\n+                       // required due to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=532117\n+                       mavenBundle(\"de.dentrassi.kura.addons\", \"de.dentrassi.kura.addons.drools.ecj\")\n+                                                                                                     .versionAsInProject(),\n+\n+                       mavenBundle(\"com.google.protobuf\", \"protobuf-java\")\n+                                                                          .versionAsInProject(),\n+\n+                       mavenBundle(\"org.mvel\", \"mvel2\")\n+                                                       .versionAsInProject(),\n+\n+                       mavenBundle(\"commons-codec\", \"commons-codec\")\n+                                                                    .versionAsInProject(),\n+\n+                       mavenBundle(\"org.apache.servicemix.bundles\", \"org.apache.servicemix.bundles.xmlpull\")\n+                                                                                                            .versionAsInProject(),\n+                       mavenBundle(\"org.apache.servicemix.bundles\", \"org.apache.servicemix.bundles.xstream-java8\")\n+                                                                                                                  .versionAsInProject(),\n+                       mavenBundle(\"org.apache.servicemix.bundles\", \"org.apache.servicemix.bundles.antlr-runtime\")\n+                                                                                                                  .versionAsInProject(),\n+                       mavenBundle(\"org.mvel\", \"mvel2\")\n+                                                       .versionAsInProject(),\n+\n+                       mavenBundle(\"org.kie\", \"kie-api\")\n+                                                        .versionAsInProject()\n+                                                        .start(),\n+                       mavenBundle(\"org.kie\", \"kie-internal\")\n+                                                             .versionAsInProject()\n+                                                             .start(),\n+                       mavenBundle(\"org.kie\", \"kie-osgi-integration\")\n+                                                                     .versionAsInProject(),\n+                       mavenBundle(\"org.kie.soup\", \"kie-soup-commons\")\n+                                                                      .versionAsInProject(),\n+                       mavenBundle(\"org.kie.soup\", \"kie-soup-maven-support\")\n+                                                                            .versionAsInProject(),\n+                       mavenBundle(\"org.kie.soup\", \"kie-soup-project-datamodel-api\")\n+                                                                                    .versionAsInProject(),\n+                       mavenBundle(\"org.kie.soup\", \"kie-soup-project-datamodel-commons\")\n+                                                                                        .versionAsInProject(),\n+\n+                       mavenBundle(\"org.drools\", \"drools-core\")\n+                                                               .versionAsInProject()\n+                                                               .start(),\n+                       mavenBundle(\"org.drools\", \"drools-compiler\")\n+                                                                   .versionAsInProject()\n+                                                                   .start(),\n+                       mavenBundle(\"org.drools\", \"drools-pmml\")\n+                                                               .versionAsInProject()\n+                                                               .start(),\n+\n+                       junitBundles());\n+    }\n+\n+    @Test\n+    public void testCompile1() throws Exception {","path":"drools-test-coverage/test-osgi/src/test/java/org/drools/testcoverage/osgi/PMML4OsgiCompilerTest.java","position":137,"original_position":137,"commit_id":"4039f44a70dac30b6aa827d617615828517522bc","original_commit_id":"4039f44a70dac30b6aa827d617615828517522bc","user":{"login":"jiripetrlik","id":11760511,"avatar_url":"https://avatars2.githubusercontent.com/u/11760511?v=4","gravatar_id":"","url":"https://api.github.com/users/jiripetrlik","html_url":"https://github.com/jiripetrlik","followers_url":"https://api.github.com/users/jiripetrlik/followers","following_url":"https://api.github.com/users/jiripetrlik/following{/other_user}","gists_url":"https://api.github.com/users/jiripetrlik/gists{/gist_id}","starred_url":"https://api.github.com/users/jiripetrlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiripetrlik/subscriptions","organizations_url":"https://api.github.com/users/jiripetrlik/orgs","repos_url":"https://api.github.com/users/jiripetrlik/repos","events_url":"https://api.github.com/users/jiripetrlik/events{/privacy}","received_events_url":"https://api.github.com/users/jiripetrlik/received_events","type":"User","site_admin":false},"body":"Yes, great. Thank you. I mean only few basic smoke tests for both modules.","created_at":"2018-03-19T12:47:25Z","updated_at":"2018-03-19T12:47:25Z","html_url":"https://github.com/kiegroup/drools/pull/1819#discussion_r175421641","pull_request_url":"https://api.github.com/repos/kiegroup/drools/pulls/1819","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/comments/175421641"},"html":{"href":"https://github.com/kiegroup/drools/pull/1819#discussion_r175421641"},"pull_request":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/1819"}},"in_reply_to_id":175403726},"pull_request":{"url":"https://api.github.com/repos/kiegroup/drools/pulls/1819","id":175480320,"html_url":"https://github.com/kiegroup/drools/pull/1819","diff_url":"https://github.com/kiegroup/drools/pull/1819.diff","patch_url":"https://github.com/kiegroup/drools/pull/1819.patch","issue_url":"https://api.github.com/repos/kiegroup/drools/issues/1819","number":1819,"state":"open","locked":false,"title":"Fix class loader issues for OSGi","user":{"login":"ctron","id":202474,"avatar_url":"https://avatars0.githubusercontent.com/u/202474?v=4","gravatar_id":"","url":"https://api.github.com/users/ctron","html_url":"https://github.com/ctron","followers_url":"https://api.github.com/users/ctron/followers","following_url":"https://api.github.com/users/ctron/following{/other_user}","gists_url":"https://api.github.com/users/ctron/gists{/gist_id}","starred_url":"https://api.github.com/users/ctron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctron/subscriptions","organizations_url":"https://api.github.com/users/ctron/orgs","repos_url":"https://api.github.com/users/ctron/repos","events_url":"https://api.github.com/users/ctron/events{/privacy}","received_events_url":"https://api.github.com/users/ctron/received_events","type":"User","site_admin":false},"body":"This change fixes a few class loader issues which manifest when using\r\nOSGi. The changes explicitly use the correct classloader instead of\r\nrelying on the context class loader.","created_at":"2018-03-16T09:33:08Z","updated_at":"2018-03-19T12:47:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4293acf7273746fdb5a1ab3e18bc702d8230b242","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kiegroup/drools/pulls/1819/commits","review_comments_url":"https://api.github.com/repos/kiegroup/drools/pulls/1819/comments","review_comment_url":"https://api.github.com/repos/kiegroup/drools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kiegroup/drools/issues/1819/comments","statuses_url":"https://api.github.com/repos/kiegroup/drools/statuses/4039f44a70dac30b6aa827d617615828517522bc","head":{"label":"ctron:feature/fix_classloader_1","ref":"feature/fix_classloader_1","sha":"4039f44a70dac30b6aa827d617615828517522bc","user":{"login":"ctron","id":202474,"avatar_url":"https://avatars0.githubusercontent.com/u/202474?v=4","gravatar_id":"","url":"https://api.github.com/users/ctron","html_url":"https://github.com/ctron","followers_url":"https://api.github.com/users/ctron/followers","following_url":"https://api.github.com/users/ctron/following{/other_user}","gists_url":"https://api.github.com/users/ctron/gists{/gist_id}","starred_url":"https://api.github.com/users/ctron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctron/subscriptions","organizations_url":"https://api.github.com/users/ctron/orgs","repos_url":"https://api.github.com/users/ctron/repos","events_url":"https://api.github.com/users/ctron/events{/privacy}","received_events_url":"https://api.github.com/users/ctron/received_events","type":"User","site_admin":false},"repo":{"id":124361280,"name":"drools","full_name":"ctron/drools","owner":{"login":"ctron","id":202474,"avatar_url":"https://avatars0.githubusercontent.com/u/202474?v=4","gravatar_id":"","url":"https://api.github.com/users/ctron","html_url":"https://github.com/ctron","followers_url":"https://api.github.com/users/ctron/followers","following_url":"https://api.github.com/users/ctron/following{/other_user}","gists_url":"https://api.github.com/users/ctron/gists{/gist_id}","starred_url":"https://api.github.com/users/ctron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctron/subscriptions","organizations_url":"https://api.github.com/users/ctron/orgs","repos_url":"https://api.github.com/users/ctron/repos","events_url":"https://api.github.com/users/ctron/events{/privacy}","received_events_url":"https://api.github.com/users/ctron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ctron/drools","description":"Drools Expert is the rule engine and Drools Fusion does complex event processing (CEP).","fork":true,"url":"https://api.github.com/repos/ctron/drools","forks_url":"https://api.github.com/repos/ctron/drools/forks","keys_url":"https://api.github.com/repos/ctron/drools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ctron/drools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ctron/drools/teams","hooks_url":"https://api.github.com/repos/ctron/drools/hooks","issue_events_url":"https://api.github.com/repos/ctron/drools/issues/events{/number}","events_url":"https://api.github.com/repos/ctron/drools/events","assignees_url":"https://api.github.com/repos/ctron/drools/assignees{/user}","branches_url":"https://api.github.com/repos/ctron/drools/branches{/branch}","tags_url":"https://api.github.com/repos/ctron/drools/tags","blobs_url":"https://api.github.com/repos/ctron/drools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ctron/drools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ctron/drools/git/refs{/sha}","trees_url":"https://api.github.com/repos/ctron/drools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ctron/drools/statuses/{sha}","languages_url":"https://api.github.com/repos/ctron/drools/languages","stargazers_url":"https://api.github.com/repos/ctron/drools/stargazers","contributors_url":"https://api.github.com/repos/ctron/drools/contributors","subscribers_url":"https://api.github.com/repos/ctron/drools/subscribers","subscription_url":"https://api.github.com/repos/ctron/drools/subscription","commits_url":"https://api.github.com/repos/ctron/drools/commits{/sha}","git_commits_url":"https://api.github.com/repos/ctron/drools/git/commits{/sha}","comments_url":"https://api.github.com/repos/ctron/drools/comments{/number}","issue_comment_url":"https://api.github.com/repos/ctron/drools/issues/comments{/number}","contents_url":"https://api.github.com/repos/ctron/drools/contents/{+path}","compare_url":"https://api.github.com/repos/ctron/drools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ctron/drools/merges","archive_url":"https://api.github.com/repos/ctron/drools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ctron/drools/downloads","issues_url":"https://api.github.com/repos/ctron/drools/issues{/number}","pulls_url":"https://api.github.com/repos/ctron/drools/pulls{/number}","milestones_url":"https://api.github.com/repos/ctron/drools/milestones{/number}","notifications_url":"https://api.github.com/repos/ctron/drools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ctron/drools/labels{/name}","releases_url":"https://api.github.com/repos/ctron/drools/releases{/id}","deployments_url":"https://api.github.com/repos/ctron/drools/deployments","created_at":"2018-03-08T08:31:32Z","updated_at":"2018-03-08T08:31:51Z","pushed_at":"2018-03-16T17:27:14Z","git_url":"git://github.com/ctron/drools.git","ssh_url":"git@github.com:ctron/drools.git","clone_url":"https://github.com/ctron/drools.git","svn_url":"https://github.com/ctron/drools","homepage":"http://www.drools.org","size":155081,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kiegroup:master","ref":"master","sha":"69e4b3d22af4d9922aa3b7ab68591f8254d80d70","user":{"login":"kiegroup","id":517980,"avatar_url":"https://avatars3.githubusercontent.com/u/517980?v=4","gravatar_id":"","url":"https://api.github.com/users/kiegroup","html_url":"https://github.com/kiegroup","followers_url":"https://api.github.com/users/kiegroup/followers","following_url":"https://api.github.com/users/kiegroup/following{/other_user}","gists_url":"https://api.github.com/users/kiegroup/gists{/gist_id}","starred_url":"https://api.github.com/users/kiegroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiegroup/subscriptions","organizations_url":"https://api.github.com/users/kiegroup/orgs","repos_url":"https://api.github.com/users/kiegroup/repos","events_url":"https://api.github.com/users/kiegroup/events{/privacy}","received_events_url":"https://api.github.com/users/kiegroup/received_events","type":"Organization","site_admin":false},"repo":{"id":1381673,"name":"drools","full_name":"kiegroup/drools","owner":{"login":"kiegroup","id":517980,"avatar_url":"https://avatars3.githubusercontent.com/u/517980?v=4","gravatar_id":"","url":"https://api.github.com/users/kiegroup","html_url":"https://github.com/kiegroup","followers_url":"https://api.github.com/users/kiegroup/followers","following_url":"https://api.github.com/users/kiegroup/following{/other_user}","gists_url":"https://api.github.com/users/kiegroup/gists{/gist_id}","starred_url":"https://api.github.com/users/kiegroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiegroup/subscriptions","organizations_url":"https://api.github.com/users/kiegroup/orgs","repos_url":"https://api.github.com/users/kiegroup/repos","events_url":"https://api.github.com/users/kiegroup/events{/privacy}","received_events_url":"https://api.github.com/users/kiegroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiegroup/drools","description":"Drools Expert is the rule engine and Drools Fusion does complex event processing (CEP).","fork":false,"url":"https://api.github.com/repos/kiegroup/drools","forks_url":"https://api.github.com/repos/kiegroup/drools/forks","keys_url":"https://api.github.com/repos/kiegroup/drools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiegroup/drools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiegroup/drools/teams","hooks_url":"https://api.github.com/repos/kiegroup/drools/hooks","issue_events_url":"https://api.github.com/repos/kiegroup/drools/issues/events{/number}","events_url":"https://api.github.com/repos/kiegroup/drools/events","assignees_url":"https://api.github.com/repos/kiegroup/drools/assignees{/user}","branches_url":"https://api.github.com/repos/kiegroup/drools/branches{/branch}","tags_url":"https://api.github.com/repos/kiegroup/drools/tags","blobs_url":"https://api.github.com/repos/kiegroup/drools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiegroup/drools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiegroup/drools/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiegroup/drools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiegroup/drools/statuses/{sha}","languages_url":"https://api.github.com/repos/kiegroup/drools/languages","stargazers_url":"https://api.github.com/repos/kiegroup/drools/stargazers","contributors_url":"https://api.github.com/repos/kiegroup/drools/contributors","subscribers_url":"https://api.github.com/repos/kiegroup/drools/subscribers","subscription_url":"https://api.github.com/repos/kiegroup/drools/subscription","commits_url":"https://api.github.com/repos/kiegroup/drools/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiegroup/drools/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiegroup/drools/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiegroup/drools/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiegroup/drools/contents/{+path}","compare_url":"https://api.github.com/repos/kiegroup/drools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiegroup/drools/merges","archive_url":"https://api.github.com/repos/kiegroup/drools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiegroup/drools/downloads","issues_url":"https://api.github.com/repos/kiegroup/drools/issues{/number}","pulls_url":"https://api.github.com/repos/kiegroup/drools/pulls{/number}","milestones_url":"https://api.github.com/repos/kiegroup/drools/milestones{/number}","notifications_url":"https://api.github.com/repos/kiegroup/drools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiegroup/drools/labels{/name}","releases_url":"https://api.github.com/repos/kiegroup/drools/releases{/id}","deployments_url":"https://api.github.com/repos/kiegroup/drools/deployments","created_at":"2011-02-18T08:37:05Z","updated_at":"2018-03-19T08:48:21Z","pushed_at":"2018-03-18T09:22:18Z","git_url":"git://github.com/kiegroup/drools.git","ssh_url":"git@github.com:kiegroup/drools.git","clone_url":"https://github.com/kiegroup/drools.git","svn_url":"https://github.com/kiegroup/drools","homepage":"http://www.drools.org","size":155103,"stargazers_count":1325,"watchers_count":1325,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1315,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1315,"open_issues":14,"watchers":1325,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/1819"},"html":{"href":"https://github.com/kiegroup/drools/pull/1819"},"issue":{"href":"https://api.github.com/repos/kiegroup/drools/issues/1819"},"comments":{"href":"https://api.github.com/repos/kiegroup/drools/issues/1819/comments"},"review_comments":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/1819/comments"},"review_comment":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/1819/commits"},"statuses":{"href":"https://api.github.com/repos/kiegroup/drools/statuses/4039f44a70dac30b6aa827d617615828517522bc"}},"author_association":"NONE"}}
{"actor":{"display_login":"jiripetrlik"}}