{"action":"created","issue":{"url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/issues/120","repository_url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin","labels_url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/issues/120/comments","events_url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/issues/120/events","html_url":"https://github.com/highsource/maven-jaxb2-plugin/issues/120","id":224444383,"number":120,"title":"Support schema bindings on Java 9","user":{"login":"nicolaiparlog","id":6537432,"avatar_url":"https://avatars2.githubusercontent.com/u/6537432?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolaiparlog","html_url":"https://github.com/nicolaiparlog","followers_url":"https://api.github.com/users/nicolaiparlog/followers","following_url":"https://api.github.com/users/nicolaiparlog/following{/other_user}","gists_url":"https://api.github.com/users/nicolaiparlog/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaiparlog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaiparlog/subscriptions","organizations_url":"https://api.github.com/users/nicolaiparlog/orgs","repos_url":"https://api.github.com/users/nicolaiparlog/repos","events_url":"https://api.github.com/users/nicolaiparlog/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaiparlog/received_events","type":"User","site_admin":false},"labels":[{"id":90594015,"url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"highsource","id":6707996,"avatar_url":"https://avatars0.githubusercontent.com/u/6707996?v=3","gravatar_id":"","url":"https://api.github.com/users/highsource","html_url":"https://github.com/highsource","followers_url":"https://api.github.com/users/highsource/followers","following_url":"https://api.github.com/users/highsource/following{/other_user}","gists_url":"https://api.github.com/users/highsource/gists{/gist_id}","starred_url":"https://api.github.com/users/highsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highsource/subscriptions","organizations_url":"https://api.github.com/users/highsource/orgs","repos_url":"https://api.github.com/users/highsource/repos","events_url":"https://api.github.com/users/highsource/events{/privacy}","received_events_url":"https://api.github.com/users/highsource/received_events","type":"User","site_admin":false},"assignees":[{"login":"highsource","id":6707996,"avatar_url":"https://avatars0.githubusercontent.com/u/6707996?v=3","gravatar_id":"","url":"https://api.github.com/users/highsource","html_url":"https://github.com/highsource","followers_url":"https://api.github.com/users/highsource/followers","following_url":"https://api.github.com/users/highsource/following{/other_user}","gists_url":"https://api.github.com/users/highsource/gists{/gist_id}","starred_url":"https://api.github.com/users/highsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highsource/subscriptions","organizations_url":"https://api.github.com/users/highsource/orgs","repos_url":"https://api.github.com/users/highsource/repos","events_url":"https://api.github.com/users/highsource/events{/privacy}","received_events_url":"https://api.github.com/users/highsource/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/milestones/2","html_url":"https://github.com/highsource/maven-jaxb2-plugin/milestone/2","labels_url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/milestones/2/labels","id":1049869,"number":2,"title":"0.14.x","description":null,"creator":{"login":"highsource","id":6707996,"avatar_url":"https://avatars0.githubusercontent.com/u/6707996?v=3","gravatar_id":"","url":"https://api.github.com/users/highsource","html_url":"https://github.com/highsource","followers_url":"https://api.github.com/users/highsource/followers","following_url":"https://api.github.com/users/highsource/following{/other_user}","gists_url":"https://api.github.com/users/highsource/gists{/gist_id}","starred_url":"https://api.github.com/users/highsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highsource/subscriptions","organizations_url":"https://api.github.com/users/highsource/orgs","repos_url":"https://api.github.com/users/highsource/repos","events_url":"https://api.github.com/users/highsource/events{/privacy}","received_events_url":"https://api.github.com/users/highsource/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2015-04-02T07:00:51Z","updated_at":"2017-06-28T09:27:12Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2017-04-26T12:04:43Z","updated_at":"2017-07-03T19:47:14Z","closed_at":null,"body":"When running on Java 9, schema bindings are apparently not applied - instead the XSD's namespace is used to determine the package.\r\n\r\n## Description\r\n\r\nIt makes no difference whether this block is present in the XSD...\r\n\r\n```xml\r\n<xsd:annotation>\r\n\t<xsd:appinfo>\r\n\t\t<jaxb:schemaBindings>\r\n\t\t\t<jaxb:package name=\"com.pany.pack.age\" />\r\n\t\t</jaxb:schemaBindings>\r\n\t</xsd:appinfo>\r\n</xsd:annotation>\r\n```\r\n\r\n... or this block in a `bindings.xjb` ...\r\n\r\n```xml\r\n<jaxb:bindings schemaLocation=\"that/other/schema.xsd\" node=\"/xsd:schema\">\r\n\t<jaxb:schemaBindings>\r\n\t\t<jaxb:package name=\"com.pany.pack.age\" />\r\n\t</jaxb:schemaBindings>\r\n</jaxb:bindings>\r\n```\r\n\r\n... in both cases, the binding is ignored.\r\n\r\n## Experiments\r\n\r\nI observed that the `xjc` command line tool in Java 8 and 9 exhibits the expected behavior and that the difference between the Maven run on Java 8 and 9 was that the former uses `rt.jar` as JAXB API, while the latter uses the plugin's dependency `javax.xml.bind:jaxb-api`.\r\n\r\nIt [took me a while](http://stackoverflow.com/q/43630262/2525313) but eventually I got the Java 9 Maven build to say _Java JAXB API is loaded from the [jrt:/java.xml.bind]_, i.e. it used the Java 9 module _java.xml.bind_ but that still didn't do the job.\r\n\r\n## Sources\r\n\r\nMaybe one of these can help (I'm shooting in the dark here, could be utterly irrelevant):\r\n\r\n* [JEP 255](http://openjdk.java.net/jeps/255) (merges Selected Xerces 2.11.0 Updates into JAXP)\r\n* [JEP 268](http://openjdk.java.net/jeps/268) (develops a standard XML Catalog API that supports the OASIS XML Catalogs standard, v1.1)\r\n* Apache Camel had [another issue](https://issues.apache.org/jira/browse/CAMEL-10922) and [\"resolved\"](https://fisheye.apache.org/changelog/camel-git?cs=2468ba87b3f86ebec2d663ebf75a2b215e516700) it by using `org.apache.cxf:cxf-xjc-plugin` instead - maybe they're doing something differently?\r\n\r\nRelated to #114."},"comment":{"url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/issues/comments/312721764","html_url":"https://github.com/highsource/maven-jaxb2-plugin/issues/120#issuecomment-312721764","issue_url":"https://api.github.com/repos/highsource/maven-jaxb2-plugin/issues/120","id":312721764,"user":{"login":"highsource","id":6707996,"avatar_url":"https://avatars0.githubusercontent.com/u/6707996?v=3","gravatar_id":"","url":"https://api.github.com/users/highsource","html_url":"https://github.com/highsource","followers_url":"https://api.github.com/users/highsource/followers","following_url":"https://api.github.com/users/highsource/following{/other_user}","gists_url":"https://api.github.com/users/highsource/gists{/gist_id}","starred_url":"https://api.github.com/users/highsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highsource/subscriptions","organizations_url":"https://api.github.com/users/highsource/orgs","repos_url":"https://api.github.com/users/highsource/repos","events_url":"https://api.github.com/users/highsource/events{/privacy}","received_events_url":"https://api.github.com/users/highsource/received_events","type":"User","site_admin":false},"created_at":"2017-07-03T19:47:14Z","updated_at":"2017-07-03T19:47:14Z","body":"@nicolaiparlog \r\n@aggregat4 \r\n\r\nSeems like I've managed to fix it. I guess there was a classloader issue which prevented annotations from `com.sun.tools.xjc.reader.xmlschema.bindinfo.package-info` to be loaded properly.\r\n\r\nI've added preloading of this packaged and it worked. Now I can build the `java-9` test project on JDK 9.\r\n\r\nPlease check if this works for you (build from the `java-9` branch).\r\n\r\nDon't close yet, I want to check why `episode` fails. But not today."}}
{"actor":{"display_login":"highsource"}}