{"action":"opened","number":14,"pull_request":{"url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/14","id":46206836,"html_url":"https://github.com/sean8223/jooq-sbt-plugin/pull/14","diff_url":"https://github.com/sean8223/jooq-sbt-plugin/pull/14.diff","patch_url":"https://github.com/sean8223/jooq-sbt-plugin/pull/14.patch","issue_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/issues/14","number":14,"state":"open","locked":false,"title":"Templatize and Render jOOQ XML configs","user":{"login":"triplec1988","id":2332757,"avatar_url":"https://avatars.githubusercontent.com/u/2332757?v=3","gravatar_id":"","url":"https://api.github.com/users/triplec1988","html_url":"https://github.com/triplec1988","followers_url":"https://api.github.com/users/triplec1988/followers","following_url":"https://api.github.com/users/triplec1988/following{/other_user}","gists_url":"https://api.github.com/users/triplec1988/gists{/gist_id}","starred_url":"https://api.github.com/users/triplec1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplec1988/subscriptions","organizations_url":"https://api.github.com/users/triplec1988/orgs","repos_url":"https://api.github.com/users/triplec1988/repos","events_url":"https://api.github.com/users/triplec1988/events{/privacy}","received_events_url":"https://api.github.com/users/triplec1988/received_events","type":"User","site_admin":false},"body":"Harry's used the jooq-sbt-plugin before to great effect. In our recent project, however, we are using jOOQ slightly differently more custom way that before. As a result we were unable to make use of the jooq-sbt-plugin in its current form. The changes made in this fork address two key issues:\r\n\r\n * Templatize our jOOQ XML config such that user/environment specific values do not need to be hardcoded and can therefore be checked in to the appropriate repository.\r\n * Allow dependencies from the parent project to be pulled into the classpath to allow more customization with the jOOQ XML config like custom naming strategies and forced types.\r\n\r\nTo achieve these we have made changes to the following files:\r\n\r\n * build.sbt\r\n * ../JOOQPlugin.scala\r\n * README.md\r\n\r\n#### Build.sbt\r\n\r\nWe have added a lightweight templating engine JavaMinimalTemplateEngine(https://code.google.com/p/jmte/). This lightweight library allows for simple templating via “${_variable_}” substitution.\r\n\r\n#### JOOQPlugin.scala\r\n\r\nThe first change made was to add a settingKey to pass in the variables to be substituted. Subsequent changes check to see if both a config file AND config vars have been set before attempting to render the config XML as a temp file and use that for code generation.\r\n\r\nThe second important change that was made regards classpaths. This change allows the plugin to pull in dependencies from the parent project, be they managed through Ivy/Maven or pulled in via git (as we’re doing with some libraries). One may still scope dependencies in the parent project to the “jooq” config.\r\n\r\nThe final important change we have made it to looks for either “.java” or “.scala” in the output directory as we use jOOQ’s scala code generator.\r\n\r\n#### README\r\n\r\nWe have updated the documentation for the new settingKey we have added in this fork.","created_at":"2015-09-28T20:53:50Z","updated_at":"2015-09-28T20:53:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/14/commits","review_comments_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/14/comments","review_comment_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/issues/14/comments","statuses_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/statuses/30367290bb16f056a7eae1762c361c1c374b1211","head":{"label":"triplec1988:master","ref":"master","sha":"30367290bb16f056a7eae1762c361c1c374b1211","user":{"login":"triplec1988","id":2332757,"avatar_url":"https://avatars.githubusercontent.com/u/2332757?v=3","gravatar_id":"","url":"https://api.github.com/users/triplec1988","html_url":"https://github.com/triplec1988","followers_url":"https://api.github.com/users/triplec1988/followers","following_url":"https://api.github.com/users/triplec1988/following{/other_user}","gists_url":"https://api.github.com/users/triplec1988/gists{/gist_id}","starred_url":"https://api.github.com/users/triplec1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplec1988/subscriptions","organizations_url":"https://api.github.com/users/triplec1988/orgs","repos_url":"https://api.github.com/users/triplec1988/repos","events_url":"https://api.github.com/users/triplec1988/events{/privacy}","received_events_url":"https://api.github.com/users/triplec1988/received_events","type":"User","site_admin":false},"repo":{"id":43324131,"name":"jooq-sbt-plugin","full_name":"triplec1988/jooq-sbt-plugin","owner":{"login":"triplec1988","id":2332757,"avatar_url":"https://avatars.githubusercontent.com/u/2332757?v=3","gravatar_id":"","url":"https://api.github.com/users/triplec1988","html_url":"https://github.com/triplec1988","followers_url":"https://api.github.com/users/triplec1988/followers","following_url":"https://api.github.com/users/triplec1988/following{/other_user}","gists_url":"https://api.github.com/users/triplec1988/gists{/gist_id}","starred_url":"https://api.github.com/users/triplec1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplec1988/subscriptions","organizations_url":"https://api.github.com/users/triplec1988/orgs","repos_url":"https://api.github.com/users/triplec1988/repos","events_url":"https://api.github.com/users/triplec1988/events{/privacy}","received_events_url":"https://api.github.com/users/triplec1988/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/triplec1988/jooq-sbt-plugin","description":"SBT Plugin for JOOQ","fork":true,"url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin","forks_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/forks","keys_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/teams","hooks_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/hooks","issue_events_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/events","assignees_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/tags","blobs_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/languages","stargazers_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/stargazers","contributors_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/contributors","subscribers_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/subscribers","subscription_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/subscription","commits_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/merges","archive_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/downloads","issues_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/labels{/name}","releases_url":"https://api.github.com/repos/triplec1988/jooq-sbt-plugin/releases{/id}","created_at":"2015-09-28T20:06:35Z","updated_at":"2015-09-28T20:06:36Z","pushed_at":"2015-09-28T20:50:52Z","git_url":"git://github.com/triplec1988/jooq-sbt-plugin.git","ssh_url":"git@github.com:triplec1988/jooq-sbt-plugin.git","clone_url":"https://github.com/triplec1988/jooq-sbt-plugin.git","svn_url":"https://github.com/triplec1988/jooq-sbt-plugin","homepage":null,"size":104,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"sean8223:master","ref":"master","sha":"ef63eb1d12c344cbe5db040e659f67e5323abd60","user":{"login":"sean8223","id":227927,"avatar_url":"https://avatars.githubusercontent.com/u/227927?v=3","gravatar_id":"","url":"https://api.github.com/users/sean8223","html_url":"https://github.com/sean8223","followers_url":"https://api.github.com/users/sean8223/followers","following_url":"https://api.github.com/users/sean8223/following{/other_user}","gists_url":"https://api.github.com/users/sean8223/gists{/gist_id}","starred_url":"https://api.github.com/users/sean8223/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean8223/subscriptions","organizations_url":"https://api.github.com/users/sean8223/orgs","repos_url":"https://api.github.com/users/sean8223/repos","events_url":"https://api.github.com/users/sean8223/events{/privacy}","received_events_url":"https://api.github.com/users/sean8223/received_events","type":"User","site_admin":false},"repo":{"id":8344065,"name":"jooq-sbt-plugin","full_name":"sean8223/jooq-sbt-plugin","owner":{"login":"sean8223","id":227927,"avatar_url":"https://avatars.githubusercontent.com/u/227927?v=3","gravatar_id":"","url":"https://api.github.com/users/sean8223","html_url":"https://github.com/sean8223","followers_url":"https://api.github.com/users/sean8223/followers","following_url":"https://api.github.com/users/sean8223/following{/other_user}","gists_url":"https://api.github.com/users/sean8223/gists{/gist_id}","starred_url":"https://api.github.com/users/sean8223/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean8223/subscriptions","organizations_url":"https://api.github.com/users/sean8223/orgs","repos_url":"https://api.github.com/users/sean8223/repos","events_url":"https://api.github.com/users/sean8223/events{/privacy}","received_events_url":"https://api.github.com/users/sean8223/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sean8223/jooq-sbt-plugin","description":"SBT Plugin for JOOQ","fork":false,"url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin","forks_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/forks","keys_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/teams","hooks_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/hooks","issue_events_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/events","assignees_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/tags","blobs_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/languages","stargazers_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/stargazers","contributors_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/contributors","subscribers_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/subscribers","subscription_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/subscription","commits_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/merges","archive_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/downloads","issues_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/labels{/name}","releases_url":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/releases{/id}","created_at":"2013-02-21T21:10:28Z","updated_at":"2015-07-31T00:15:27Z","pushed_at":"2015-06-11T06:17:11Z","git_url":"git://github.com/sean8223/jooq-sbt-plugin.git","ssh_url":"git@github.com:sean8223/jooq-sbt-plugin.git","clone_url":"https://github.com/sean8223/jooq-sbt-plugin.git","svn_url":"https://github.com/sean8223/jooq-sbt-plugin","homepage":null,"size":210,"stargazers_count":16,"watchers_count":16,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/14"},"html":{"href":"https://github.com/sean8223/jooq-sbt-plugin/pull/14"},"issue":{"href":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/issues/14"},"comments":{"href":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/sean8223/jooq-sbt-plugin/statuses/30367290bb16f056a7eae1762c361c1c374b1211"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":76,"deletions":27,"changed_files":4}}