{"action":"created","comment":{"url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments/40732123","id":40732123,"diff_hunk":"@@ -4,5 +4,83 @@\n #                                                                          ##\n #############################################################################\n \n-# for now just call domain.bat, so we can have complete set of ps scripts\n-& .\\domain.bat\n+$RESOLVED_JBOSS_HOME = (Get-ChildItem $MyInvocation.MyCommand.Path).Directory.Parent.FullName\n+. \"$RESOLVED_JBOSS_HOME\\bin\\common.ps1\"\n+\n+$SERVER_OPTS = Process-Script-Parameters -Params $ARGS\n+\n+# Read an optional running configuration file\n+$DOMAIN_CONF = $JBOSS_HOME + '\\bin\\domain.conf.ps1'\n+$DOMAIN_CONF = Get-Env RUN_CONF $DOMAIN_CONF\n+. $DOMAIN_CONF\n+\n+Set-Global-Variables-Domain\n+\n+# consolidate the host-controller and command line opts\n+$HOST_CONTROLLER_OPTS=$HOST_CONTROLLER_JAVA_OPTS+$SERVER_OPTS\n+# process the host-controller options\n+foreach($p in $HOST_CONTROLLER_OPTS){\n+\tif ($p -eq $null){# odd but could happen\n+\t\tcontinue\n+\t}\n+\t$arg = $p.Trim()\n+\tif ($arg.StartsWith('-Djboss.domain.base.dir')){\n+\t\t$JBOSS_BASE_DIR=$p.Substring('-Djboss.domain.base.dir='.Length)\n+\t}elseif ($arg.StartsWith('-Djboss.domain.log.dir')){\n+\t\t$JBOSS_LOG_DIR=$p.Substring('-Djboss.domain.log.dir='.Length)\n+\t}elseif ($arg.StartsWith('-Djboss.domain.config.dir')){\n+\t\t$JBOSS_CONFIG_DIR=$p.Substring('-Djboss.domain.config.dir='.Length)\n+\t}\n+}\n+\n+# If the -Djava.security.manager is found, enable the -secmgr and include a bogus security manager for JBoss Modules to replace\n+# Note that HOST_CONTROLLER_JAVA_OPTS will not need to be handled here\n+\n+if ( $PROCESS_CONTROLLER_JAVA_OPTS -contains 'java.security.manager') {\n+    echo \"ERROR: The use of -Djava.security.manager has been removed. Please use the -secmgr command line argument or SECMGR=true environment variable.\"\n+    exit\n+}\n+\n+# Set debug settings if not already set\n+if ($global:DEBUG_MODE){\n+    if (-not $PROCESS_CONTROLLER_JAVA_OPTS -contains '-agentlib:jdwp'){\n+        $PROCESS_CONTROLLER_JAVA_OPTS+= \"-agentlib:jdwp=transport=dt_socket,address=$global:DEBUG_MODE,server=y,suspend=n\"\n+    }else{\n+        echo \"Debug already enabled in JAVA_OPTS, ignoring --debug argument\"\n+    }\n+}\n+\n+Display-Environment\n+\n+$MODULE_OPTS += \"-jvm\"\n+$MODULE_OPTS += \"$JAVA\"\n+$MODULE_OPTS += \"-jboss-home\"\n+$MODULE_OPTS += \"$JBOSS_HOME\"\n+         \n+\n+$PROG_ARGS = @()\n+$PROG_ARGS +='-D[Process Controller]' \n+$PROG_ARGS += $PROCESS_CONTROLLER_JAVA_OPTS\n+$PROG_ARGS += \"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/process-controller.log\"\n+$PROG_ARGS += \"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\"\n+$PROG_ARGS += \"-Djboss.home.dir=$JBOSS_HOME\"\n+$PROG_ARGS += \"-jar\"\n+$PROG_ARGS += \"$JBOSS_HOME\\jboss-modules.jar\"","path":"core-feature-pack/src/main/resources/content/bin/domain.ps1","position":67,"original_position":67,"commit_id":"351df783463b8400b375bb94fc43f2c089a33d56","original_commit_id":"351df783463b8400b375bb94fc43f2c089a33d56","user":{"login":"jamezp","id":420065,"avatar_url":"https://avatars.githubusercontent.com/u/420065?v=3","gravatar_id":"","url":"https://api.github.com/users/jamezp","html_url":"https://github.com/jamezp","followers_url":"https://api.github.com/users/jamezp/followers","following_url":"https://api.github.com/users/jamezp/following{/other_user}","gists_url":"https://api.github.com/users/jamezp/gists{/gist_id}","starred_url":"https://api.github.com/users/jamezp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamezp/subscriptions","organizations_url":"https://api.github.com/users/jamezp/orgs","repos_url":"https://api.github.com/users/jamezp/repos","events_url":"https://api.github.com/users/jamezp/events{/privacy}","received_events_url":"https://api.github.com/users/jamezp/received_events","type":"User","site_admin":false},"body":"It probably doesn't matter, but everywhere else we use the `\\` delimiter. Should it be that here too?","created_at":"2015-09-29T21:26:20Z","updated_at":"2015-09-29T21:26:20Z","html_url":"https://github.com/wildfly/wildfly-core/pull/1118#discussion_r40732123","pull_request_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118","_links":{"self":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments/40732123"},"html":{"href":"https://github.com/wildfly/wildfly-core/pull/1118#discussion_r40732123"},"pull_request":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118"}}},"pull_request":{"url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118","id":45960014,"html_url":"https://github.com/wildfly/wildfly-core/pull/1118","diff_url":"https://github.com/wildfly/wildfly-core/pull/1118.diff","patch_url":"https://github.com/wildfly/wildfly-core/pull/1118.patch","issue_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/1118","number":1118,"state":"open","locked":false,"title":"Add missing powershell scripts & fix existing","user":{"login":"ctomc","id":824084,"avatar_url":"https://avatars.githubusercontent.com/u/824084?v=3","gravatar_id":"","url":"https://api.github.com/users/ctomc","html_url":"https://github.com/ctomc","followers_url":"https://api.github.com/users/ctomc/followers","following_url":"https://api.github.com/users/ctomc/following{/other_user}","gists_url":"https://api.github.com/users/ctomc/gists{/gist_id}","starred_url":"https://api.github.com/users/ctomc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctomc/subscriptions","organizations_url":"https://api.github.com/users/ctomc/orgs","repos_url":"https://api.github.com/users/ctomc/repos","events_url":"https://api.github.com/users/ctomc/events{/privacy}","received_events_url":"https://api.github.com/users/ctomc/received_events","type":"User","site_admin":false},"body":"- WFCORE-745 Standalone powershell script does't support --debug and -secmgr option\r\n- WFCORE-742 Unify linux and PowerShell scripts for jboss-cli in printing environment information\r\n- WFCORE-744 Unify add-user script functionality in windows (powershell, bat) and linux\r\n- WFCORE-737 PowerShell script \"vault.ps1\" is missing","created_at":"2015-09-24T22:54:34Z","updated_at":"2015-09-29T21:26:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab8d8aaee040ff5fb1ec3021c946493683a82c10","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118/commits","review_comments_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118/comments","review_comment_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/1118/comments","statuses_url":"https://api.github.com/repos/wildfly/wildfly-core/statuses/351df783463b8400b375bb94fc43f2c089a33d56","head":{"label":"ctomc:powershell","ref":"powershell","sha":"351df783463b8400b375bb94fc43f2c089a33d56","user":{"login":"ctomc","id":824084,"avatar_url":"https://avatars.githubusercontent.com/u/824084?v=3","gravatar_id":"","url":"https://api.github.com/users/ctomc","html_url":"https://github.com/ctomc","followers_url":"https://api.github.com/users/ctomc/followers","following_url":"https://api.github.com/users/ctomc/following{/other_user}","gists_url":"https://api.github.com/users/ctomc/gists{/gist_id}","starred_url":"https://api.github.com/users/ctomc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctomc/subscriptions","organizations_url":"https://api.github.com/users/ctomc/orgs","repos_url":"https://api.github.com/users/ctomc/repos","events_url":"https://api.github.com/users/ctomc/events{/privacy}","received_events_url":"https://api.github.com/users/ctomc/received_events","type":"User","site_admin":false},"repo":{"id":21428688,"name":"wildfly-core","full_name":"ctomc/wildfly-core","owner":{"login":"ctomc","id":824084,"avatar_url":"https://avatars.githubusercontent.com/u/824084?v=3","gravatar_id":"","url":"https://api.github.com/users/ctomc","html_url":"https://github.com/ctomc","followers_url":"https://api.github.com/users/ctomc/followers","following_url":"https://api.github.com/users/ctomc/following{/other_user}","gists_url":"https://api.github.com/users/ctomc/gists{/gist_id}","starred_url":"https://api.github.com/users/ctomc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctomc/subscriptions","organizations_url":"https://api.github.com/users/ctomc/orgs","repos_url":"https://api.github.com/users/ctomc/repos","events_url":"https://api.github.com/users/ctomc/events{/privacy}","received_events_url":"https://api.github.com/users/ctomc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ctomc/wildfly-core","description":"The core runtime that is used by the Wildfly application server","fork":true,"url":"https://api.github.com/repos/ctomc/wildfly-core","forks_url":"https://api.github.com/repos/ctomc/wildfly-core/forks","keys_url":"https://api.github.com/repos/ctomc/wildfly-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ctomc/wildfly-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ctomc/wildfly-core/teams","hooks_url":"https://api.github.com/repos/ctomc/wildfly-core/hooks","issue_events_url":"https://api.github.com/repos/ctomc/wildfly-core/issues/events{/number}","events_url":"https://api.github.com/repos/ctomc/wildfly-core/events","assignees_url":"https://api.github.com/repos/ctomc/wildfly-core/assignees{/user}","branches_url":"https://api.github.com/repos/ctomc/wildfly-core/branches{/branch}","tags_url":"https://api.github.com/repos/ctomc/wildfly-core/tags","blobs_url":"https://api.github.com/repos/ctomc/wildfly-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ctomc/wildfly-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ctomc/wildfly-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ctomc/wildfly-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ctomc/wildfly-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ctomc/wildfly-core/languages","stargazers_url":"https://api.github.com/repos/ctomc/wildfly-core/stargazers","contributors_url":"https://api.github.com/repos/ctomc/wildfly-core/contributors","subscribers_url":"https://api.github.com/repos/ctomc/wildfly-core/subscribers","subscription_url":"https://api.github.com/repos/ctomc/wildfly-core/subscription","commits_url":"https://api.github.com/repos/ctomc/wildfly-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ctomc/wildfly-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ctomc/wildfly-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ctomc/wildfly-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ctomc/wildfly-core/contents/{+path}","compare_url":"https://api.github.com/repos/ctomc/wildfly-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ctomc/wildfly-core/merges","archive_url":"https://api.github.com/repos/ctomc/wildfly-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ctomc/wildfly-core/downloads","issues_url":"https://api.github.com/repos/ctomc/wildfly-core/issues{/number}","pulls_url":"https://api.github.com/repos/ctomc/wildfly-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ctomc/wildfly-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ctomc/wildfly-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ctomc/wildfly-core/labels{/name}","releases_url":"https://api.github.com/repos/ctomc/wildfly-core/releases{/id}","created_at":"2014-07-02T15:06:51Z","updated_at":"2015-04-01T14:12:16Z","pushed_at":"2015-09-29T17:06:55Z","git_url":"git://github.com/ctomc/wildfly-core.git","ssh_url":"git@github.com:ctomc/wildfly-core.git","clone_url":"https://github.com/ctomc/wildfly-core.git","svn_url":"https://github.com/ctomc/wildfly-core","homepage":null,"size":45789,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"wildfly:master","ref":"master","sha":"395a8800afa8c5f19e5885cdae077d185c6ce04b","user":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"repo":{"id":21394954,"name":"wildfly-core","full_name":"wildfly/wildfly-core","owner":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wildfly/wildfly-core","description":"The core runtime that is used by the Wildfly application server","fork":false,"url":"https://api.github.com/repos/wildfly/wildfly-core","forks_url":"https://api.github.com/repos/wildfly/wildfly-core/forks","keys_url":"https://api.github.com/repos/wildfly/wildfly-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wildfly/wildfly-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wildfly/wildfly-core/teams","hooks_url":"https://api.github.com/repos/wildfly/wildfly-core/hooks","issue_events_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/events{/number}","events_url":"https://api.github.com/repos/wildfly/wildfly-core/events","assignees_url":"https://api.github.com/repos/wildfly/wildfly-core/assignees{/user}","branches_url":"https://api.github.com/repos/wildfly/wildfly-core/branches{/branch}","tags_url":"https://api.github.com/repos/wildfly/wildfly-core/tags","blobs_url":"https://api.github.com/repos/wildfly/wildfly-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wildfly/wildfly-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wildfly/wildfly-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/wildfly/wildfly-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wildfly/wildfly-core/statuses/{sha}","languages_url":"https://api.github.com/repos/wildfly/wildfly-core/languages","stargazers_url":"https://api.github.com/repos/wildfly/wildfly-core/stargazers","contributors_url":"https://api.github.com/repos/wildfly/wildfly-core/contributors","subscribers_url":"https://api.github.com/repos/wildfly/wildfly-core/subscribers","subscription_url":"https://api.github.com/repos/wildfly/wildfly-core/subscription","commits_url":"https://api.github.com/repos/wildfly/wildfly-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/wildfly/wildfly-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/wildfly/wildfly-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/wildfly/wildfly-core/contents/{+path}","compare_url":"https://api.github.com/repos/wildfly/wildfly-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wildfly/wildfly-core/merges","archive_url":"https://api.github.com/repos/wildfly/wildfly-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wildfly/wildfly-core/downloads","issues_url":"https://api.github.com/repos/wildfly/wildfly-core/issues{/number}","pulls_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls{/number}","milestones_url":"https://api.github.com/repos/wildfly/wildfly-core/milestones{/number}","notifications_url":"https://api.github.com/repos/wildfly/wildfly-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wildfly/wildfly-core/labels{/name}","releases_url":"https://api.github.com/repos/wildfly/wildfly-core/releases{/id}","created_at":"2014-07-01T16:33:34Z","updated_at":"2015-09-19T16:42:31Z","pushed_at":"2015-09-29T21:03:42Z","git_url":"git://github.com/wildfly/wildfly-core.git","ssh_url":"git@github.com:wildfly/wildfly-core.git","clone_url":"https://github.com/wildfly/wildfly-core.git","svn_url":"https://github.com/wildfly/wildfly-core","homepage":null,"size":82201,"stargazers_count":33,"watchers_count":33,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":153,"mirror_url":null,"open_issues_count":14,"forks":153,"open_issues":14,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118"},"html":{"href":"https://github.com/wildfly/wildfly-core/pull/1118"},"issue":{"href":"https://api.github.com/repos/wildfly/wildfly-core/issues/1118"},"comments":{"href":"https://api.github.com/repos/wildfly/wildfly-core/issues/1118/comments"},"review_comments":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118/comments"},"review_comment":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1118/commits"},"statuses":{"href":"https://api.github.com/repos/wildfly/wildfly-core/statuses/351df783463b8400b375bb94fc43f2c089a33d56"}}}}