{"action":"created","issue":{"url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/227","repository_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin","labels_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/227/comments","events_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/227/events","html_url":"https://github.com/maven-nar/nar-maven-plugin/pull/227","id":151821842,"number":227,"title":"Should now be able to handle spaces in filenames","user":{"login":"SteveSmith16384","id":8761942,"avatar_url":"https://avatars.githubusercontent.com/u/8761942?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveSmith16384","html_url":"https://github.com/SteveSmith16384","followers_url":"https://api.github.com/users/SteveSmith16384/followers","following_url":"https://api.github.com/users/SteveSmith16384/following{/other_user}","gists_url":"https://api.github.com/users/SteveSmith16384/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveSmith16384/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveSmith16384/subscriptions","organizations_url":"https://api.github.com/users/SteveSmith16384/orgs","repos_url":"https://api.github.com/users/SteveSmith16384/repos","events_url":"https://api.github.com/users/SteveSmith16384/events{/privacy}","received_events_url":"https://api.github.com/users/SteveSmith16384/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-29T08:58:05Z","updated_at":"2016-04-29T09:48:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/pulls/227","html_url":"https://github.com/maven-nar/nar-maven-plugin/pull/227","diff_url":"https://github.com/maven-nar/nar-maven-plugin/pull/227.diff","patch_url":"https://github.com/maven-nar/nar-maven-plugin/pull/227.patch"},"body":"I've not been able to fully test this, as I don't use Maven NAR directly myself (only as part of a shared project).  However, you might find the suggested changes useful."},"comment":{"url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/comments/215672362","html_url":"https://github.com/maven-nar/nar-maven-plugin/pull/227#issuecomment-215672362","issue_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/227","id":215672362,"user":{"login":"GregDomjan","id":1988114,"avatar_url":"https://avatars.githubusercontent.com/u/1988114?v=3","gravatar_id":"","url":"https://api.github.com/users/GregDomjan","html_url":"https://github.com/GregDomjan","followers_url":"https://api.github.com/users/GregDomjan/followers","following_url":"https://api.github.com/users/GregDomjan/following{/other_user}","gists_url":"https://api.github.com/users/GregDomjan/gists{/gist_id}","starred_url":"https://api.github.com/users/GregDomjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregDomjan/subscriptions","organizations_url":"https://api.github.com/users/GregDomjan/orgs","repos_url":"https://api.github.com/users/GregDomjan/repos","events_url":"https://api.github.com/users/GregDomjan/events{/privacy}","received_events_url":"https://api.github.com/users/GregDomjan/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T09:48:19Z","updated_at":"2016-04-29T09:48:19Z","body":"Thanks @SteveSmith16384 \r\n\r\nI'd really prefer to avoid managing quotes as it tends to get messier and messier as additional layers are added.   But as sh is used it seems it has to be managed.\r\n\r\nDid a quick check of the regex used for splitting  `\"[^\\\\s\\\"']+|\\\"[^\\\"]*\\\"|'[^']*'\"`\r\nFound  http://stackoverflow.com/questions/366202/regex-for-splitting-a-string-using-space-when-not-surrounded-by-single-or-double\r\n\r\nThe following comments where interesting, do we need to account for unmatched quotes?\r\n\r\n- The problem with this answer is with unmatched quote: John's mother results splited in [John, s, mother] – leonbloy May 16 '14 at 20:10\t\r\n- To fix the issue leonbloy outlines, you can re-order the operands a bit and omit the quotes from the whitespace-group: `\"([^\"]*)\"|'([^']*)'|[^\\s]+`  – Ghostkeeper Sep 15 '14 at 1:26\r\n\r\n\r\nThinking we need to make this new version of splitting space separated values into a util function as there seem to be additional locations to potentially fix.\r\nIt would have been better I think to make some if not all of these inputs as list still instead of having to deal with issues of string splitting. \r\n\r\n```\r\nCompiler.java\r\n322: final String[] opts = this.optionSet.split(\"\\\\s\");  \r\nLinker.java\r\n344: final String[] opts = this.optionSet.split(\"\\\\s\");  \r\nNarGnuConfigureMojo.java\r\n139: gnuBuildconfArgsArray = this.gnuBuildconfArgs.split(\"\\\\s\");  \r\n\r\nCompiler.java (3 matches)\r\n338: final String[] option = optionsProperty.split(\" \");  \r\n503: final String[] exclude = defaultExcludes.split(\" \");  \r\n548: final String[] include = defaultIncludes.split(\" \");  \r\nLinker.java\r\n358: final String[] opt = option.split(\" \");  \r\nNarGnuConfigureMojo.java\r\n157: final String[] a = this.gnuConfigureArgs.split(\" \");  \r\nNarGnuMakeMojo.java (2 matches)\r\n74: args = this.gnuMakeArgs.split(\" \"); \r\n90: args = this.gnuMakeArgs.split(\" \"); \r\nNarIntegrationTestMojo.java\r\n952: final List args = Arrays.asList(this.argLine.split(\" \"));  \r\n\r\n```"}}