{"action":"opened","number":363,"pull_request":{"url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/363","id":206206793,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjA2Nzkz","html_url":"https://github.com/asciidoctor/asciidoctor-maven-plugin/pull/363","diff_url":"https://github.com/asciidoctor/asciidoctor-maven-plugin/pull/363.diff","patch_url":"https://github.com/asciidoctor/asciidoctor-maven-plugin/pull/363.patch","issue_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/issues/363","number":363,"state":"open","locked":false,"title":"Added new feature to fail based on different conditions","user":{"login":"abelsromero","id":5781153,"node_id":"MDQ6VXNlcjU3ODExNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5781153?v=4","gravatar_id":"","url":"https://api.github.com/users/abelsromero","html_url":"https://github.com/abelsromero","followers_url":"https://api.github.com/users/abelsromero/followers","following_url":"https://api.github.com/users/abelsromero/following{/other_user}","gists_url":"https://api.github.com/users/abelsromero/gists{/gist_id}","starred_url":"https://api.github.com/users/abelsromero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abelsromero/subscriptions","organizations_url":"https://api.github.com/users/abelsromero/orgs","repos_url":"https://api.github.com/users/abelsromero/repos","events_url":"https://api.github.com/users/abelsromero/events{/privacy}","received_events_url":"https://api.github.com/users/abelsromero/received_events","type":"User","site_admin":false},"body":"_Features are complete, but there's an issue with duplicated asciidoctor messages https://github.com/asciidoctor/asciidoctorj/issues/669._ Depending on suggestions we can merge or review the feature.\r\n\r\n**Feature summary**\r\nThis PR adds a new configuration element as follows:\r\n```xml\r\n<logHandler>\r\n\t<outputToConsole>true</outputToConsole>\r\n\t<failIf>\r\n\t\t<severity>WARNING</severity>\r\n\t\t<containsText>super-important-document.adoc</containsText>\r\n\t</failIf>\r\n</logHandler>\r\n```\r\n* `outputToConsole`: redirects asciidoctor messages to maven's logger. Messages are shown as Maven's INFO during renderitzation. Messages will appear twice as mentioned in issue https://github.com/asciidoctor/asciidoctorj/issues/669.\r\n* `severity`: named so to align with AsciidoctorJ property. Will make the build fail if a message of this severity level is found. It only matches the exact level, not same and above. I did this for simplicity but I am open to suggestions, implementation is trivial. \r\n* `containsText`: named so instead of `matchesText` because it just asserts that, a `contains`. I considered the option of allowing regex, but this made configuration more complex and less expressive for simple cases like a simple contains. Adding regex options could be done with another option or some custom syntax in the field.\r\n\r\nNote that if both  `severity` and `containsText` are set, only messages that match both are captured.\r\nMessages that match `severity` and/or `containsText` are shown as Maven ERROR (independently from `outputToConsole`), so that CIs can capture them as cause of build fail. Also, an initial error message showing the number of issues found is returned.\r\n\r\nIf someone wants to create a custom report like mentioned in https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/261, you can register a custom LogHandler using the SPI interface (added integration test for that). However, this has some limitations with some formats that need to \"close\" and estructure (see https://github.com/asciidoctor/asciidoctor/issues/2832).\r\n\r\n**Other notes**\r\n\r\n* Filenames are formated to show relative path from project sourceDirectory. I considered that showing the absolute path as provided by AsciidoctorJ logger bloates the messages. Showing full path could be enabled with a new boolean option in the <logHandler> sections if requested.\r\n* Since `severity` and `containsText`  are validated after the renderitzation the target document (html, pdf, etc.) can be found in the target directory. I don't see any reason to delete it.\r\n* I know the code is not the best, but can be improved in the future with Java8 features.\r\n\r\n\r\n**Other changes to code**\r\n* Updated AsciidoctorJ to 1.5.67 and updated `InlineMacroProcessor` test extension to new especification\r\n* Aligned JRuby with AsciidoctorJ: updated `jruby-complete` to 9.1.16.0: updated `maven-plugin-plugin` from 3.4 to 3.5 to fix issue after updating `jruby-complete`\r\n* Refactored mocking of Plexus in tests.\r\n\r\nI kept code as Java 7 compatible, but AsciidoctorJ is 1.8. I'd add that to docs and release notes when PR is agreed. I did not want to add more things to the mix.\r\n","created_at":"2018-08-04T19:38:45Z","updated_at":"2018-08-04T19:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/363/commits","review_comments_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/363/comments","review_comment_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/issues/363/comments","statuses_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/statuses/346320ed902b340bc73a697854ac5f6aa8fa45f4","head":{"label":"abelsromero:add_capture_of_Asciidoctor_log_messages","ref":"add_capture_of_Asciidoctor_log_messages","sha":"346320ed902b340bc73a697854ac5f6aa8fa45f4","user":{"login":"abelsromero","id":5781153,"node_id":"MDQ6VXNlcjU3ODExNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5781153?v=4","gravatar_id":"","url":"https://api.github.com/users/abelsromero","html_url":"https://github.com/abelsromero","followers_url":"https://api.github.com/users/abelsromero/followers","following_url":"https://api.github.com/users/abelsromero/following{/other_user}","gists_url":"https://api.github.com/users/abelsromero/gists{/gist_id}","starred_url":"https://api.github.com/users/abelsromero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abelsromero/subscriptions","organizations_url":"https://api.github.com/users/abelsromero/orgs","repos_url":"https://api.github.com/users/abelsromero/repos","events_url":"https://api.github.com/users/abelsromero/events{/privacy}","received_events_url":"https://api.github.com/users/abelsromero/received_events","type":"User","site_admin":false},"repo":{"id":23207331,"node_id":"MDEwOlJlcG9zaXRvcnkyMzIwNzMzMQ==","name":"asciidoctor-maven-plugin","full_name":"abelsromero/asciidoctor-maven-plugin","owner":{"login":"abelsromero","id":5781153,"node_id":"MDQ6VXNlcjU3ODExNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5781153?v=4","gravatar_id":"","url":"https://api.github.com/users/abelsromero","html_url":"https://github.com/abelsromero","followers_url":"https://api.github.com/users/abelsromero/followers","following_url":"https://api.github.com/users/abelsromero/following{/other_user}","gists_url":"https://api.github.com/users/abelsromero/gists{/gist_id}","starred_url":"https://api.github.com/users/abelsromero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abelsromero/subscriptions","organizations_url":"https://api.github.com/users/abelsromero/orgs","repos_url":"https://api.github.com/users/abelsromero/repos","events_url":"https://api.github.com/users/abelsromero/events{/privacy}","received_events_url":"https://api.github.com/users/abelsromero/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abelsromero/asciidoctor-maven-plugin","description":"A Maven plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project","fork":true,"url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin","forks_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/forks","keys_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/teams","hooks_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/events","assignees_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/tags","blobs_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/subscription","commits_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/merges","archive_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/downloads","issues_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/abelsromero/asciidoctor-maven-plugin/deployments","created_at":"2014-08-22T00:18:29Z","updated_at":"2018-07-17T11:05:13Z","pushed_at":"2018-08-04T18:48:52Z","git_url":"git://github.com/abelsromero/asciidoctor-maven-plugin.git","ssh_url":"git@github.com:abelsromero/asciidoctor-maven-plugin.git","clone_url":"https://github.com/abelsromero/asciidoctor-maven-plugin.git","svn_url":"https://github.com/abelsromero/asciidoctor-maven-plugin","homepage":"http://asciidoctor.org","size":2466,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"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","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"asciidoctor:master","ref":"master","sha":"869aa7860165c5b8f4c9ac22652abf15654d3fcc","user":{"login":"asciidoctor","id":3137042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMzcwNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/3137042?v=4","gravatar_id":"","url":"https://api.github.com/users/asciidoctor","html_url":"https://github.com/asciidoctor","followers_url":"https://api.github.com/users/asciidoctor/followers","following_url":"https://api.github.com/users/asciidoctor/following{/other_user}","gists_url":"https://api.github.com/users/asciidoctor/gists{/gist_id}","starred_url":"https://api.github.com/users/asciidoctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asciidoctor/subscriptions","organizations_url":"https://api.github.com/users/asciidoctor/orgs","repos_url":"https://api.github.com/users/asciidoctor/repos","events_url":"https://api.github.com/users/asciidoctor/events{/privacy}","received_events_url":"https://api.github.com/users/asciidoctor/received_events","type":"Organization","site_admin":false},"repo":{"id":7813441,"node_id":"MDEwOlJlcG9zaXRvcnk3ODEzNDQx","name":"asciidoctor-maven-plugin","full_name":"asciidoctor/asciidoctor-maven-plugin","owner":{"login":"asciidoctor","id":3137042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMzcwNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/3137042?v=4","gravatar_id":"","url":"https://api.github.com/users/asciidoctor","html_url":"https://github.com/asciidoctor","followers_url":"https://api.github.com/users/asciidoctor/followers","following_url":"https://api.github.com/users/asciidoctor/following{/other_user}","gists_url":"https://api.github.com/users/asciidoctor/gists{/gist_id}","starred_url":"https://api.github.com/users/asciidoctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asciidoctor/subscriptions","organizations_url":"https://api.github.com/users/asciidoctor/orgs","repos_url":"https://api.github.com/users/asciidoctor/repos","events_url":"https://api.github.com/users/asciidoctor/events{/privacy}","received_events_url":"https://api.github.com/users/asciidoctor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/asciidoctor/asciidoctor-maven-plugin","description":"A Maven plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.","fork":false,"url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin","forks_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/forks","keys_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/teams","hooks_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/events","assignees_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/tags","blobs_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/subscription","commits_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/merges","archive_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/downloads","issues_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/deployments","created_at":"2013-01-25T04:14:27Z","updated_at":"2018-08-02T06:42:31Z","pushed_at":"2018-07-19T13:08:51Z","git_url":"git://github.com/asciidoctor/asciidoctor-maven-plugin.git","ssh_url":"git@github.com:asciidoctor/asciidoctor-maven-plugin.git","clone_url":"https://github.com/asciidoctor/asciidoctor-maven-plugin.git","svn_url":"https://github.com/asciidoctor/asciidoctor-maven-plugin","homepage":"http://asciidoctor.org","size":2463,"stargazers_count":172,"watchers_count":172,"language":"Groovy","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":77,"mirror_url":null,"archived":false,"open_issues_count":60,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":77,"open_issues":60,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/363"},"html":{"href":"https://github.com/asciidoctor/asciidoctor-maven-plugin/pull/363"},"issue":{"href":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/issues/363"},"comments":{"href":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/issues/363/comments"},"review_comments":{"href":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/363/comments"},"review_comment":{"href":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/pulls/363/commits"},"statuses":{"href":"https://api.github.com/repos/asciidoctor/asciidoctor-maven-plugin/statuses/346320ed902b340bc73a697854ac5f6aa8fa45f4"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":731,"deletions":68,"changed_files":24}}
{"actor":{"display_login":"abelsromero"}}