-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start of adding support for a Windows PowerShell platform 'windows-ps'
- Loading branch information
1 parent
974ee6c
commit 88a7aa1
Showing
9 changed files
with
305 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...ugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/windowsPsBinTemplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#LICENSE_HEADER# | ||
|
||
$baseDir = split-path -parent split-path -parent $MyInvocation.MyCommand.Definition | ||
|
||
#ENV_SETUP# | ||
|
||
if (-not (Test-Path env:JAVACMD) -Or ( $env:JAVACMD -eq "" )) { | ||
$javaCmd=#JAVA_BINARY# | ||
} else { | ||
$javaCmd=$env:JAVACMD | ||
} | ||
|
||
if (-not (Test-Path env:REPO) -Or ( $env:REPO -eq "" )) { | ||
$repo=$env:BASEDIR + "\" + #REPO# | ||
} else { | ||
$repo=$env:REPO | ||
} | ||
|
||
$classPath=#CLASSPATH# | ||
|
||
if ((Test-Path env:ENDORSED_DIR) -Or ( $env:ENDORSED_DIR -ne "")) { | ||
$classPath = $env:BASEDIR + "\" + $env:ENDORSED_DIR + "\*;" + $classPath; | ||
} | ||
|
||
if ((Test-Path env:CLASSPATH_PREFIX) -Or ( $env:CLASSPATH_PREFIX -ne "")) { | ||
$classPath = $env:CLASSPATH_PREFIX + "";" + $classPath; | ||
} | ||
|
||
iex $javaCmd $env:JAVA_OPTS #EXTRA_JVM_ARGUMENTS# -classpath $classPath -Dapp.name="#APP_NAME#" -Dapp.repo="$repo" -Dapp.home="$baseDir" -Dbasedir="$baseDir" #MAINCLASS# #APP_ARGUMENTS#$args |
47 changes: 47 additions & 0 deletions
47
...urces/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Copyright 2001-2006 The Apache Software Foundation. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2001-2006 The Apache Software Foundation. All rights | ||
# reserved. | ||
|
||
|
||
$baseDir = split-path -parent split-path -parent $MyInvocation.MyCommand.Definition | ||
|
||
$setupScript = $PSScriptRoot + "\setup.ps1"; if (Test-Path $setupScript ) { &$setupScript } | ||
|
||
if (-not (Test-Path env:JAVACMD) -Or ( $env:JAVACMD -eq "" )) { | ||
$javaCmd=java | ||
} else { | ||
$javaCmd=$env:JAVACMD | ||
} | ||
|
||
if (-not (Test-Path env:REPO) -Or ( $env:REPO -eq "" )) { | ||
$repo=$env:BASEDIR + "\" + repo | ||
} else { | ||
$repo=$env:REPO | ||
} | ||
|
||
$classPath= | ||
|
||
if ((Test-Path env:ENDORSED_DIR) -Or ( $env:ENDORSED_DIR -ne "")) { | ||
$classPath = $env:BASEDIR + "\" + $env:ENDORSED_DIR + "\*;" + $classPath; | ||
} | ||
|
||
if ((Test-Path env:CLASSPATH_PREFIX) -Or ( $env:CLASSPATH_PREFIX -ne "")) { | ||
$classPath = $env:CLASSPATH_PREFIX + "";" + $classPath; | ||
} | ||
iex $javaCmd $env:JAVA_OPTS Yo dude xyz="%BASEDIR%" -classpath $classPath -Dapp.name="basedir-test" -Dapp.repo="$repo" -Dapp.home="$baseDir" -Dbasedir="$baseDir" foo.Bar $args |
47 changes: 47 additions & 0 deletions
47
...esources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Copyright 2001-2006 The Apache Software Foundation. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2001-2006 The Apache Software Foundation. All rights | ||
# reserved. | ||
|
||
|
||
$baseDir = split-path -parent split-path -parent $MyInvocation.MyCommand.Definition | ||
|
||
$setupScript = $PSScriptRoot + "\setup.ps1"; if (Test-Path $setupScript ) { &$setupScript } | ||
|
||
if (-not (Test-Path env:JAVACMD) -Or ( $env:JAVACMD -eq "" )) { | ||
$javaCmd=java | ||
} else { | ||
$javaCmd=$env:JAVACMD | ||
} | ||
|
||
if (-not (Test-Path env:REPO) -Or ( $env:REPO -eq "" )) { | ||
$repo=$env:BASEDIR + "\" + repo | ||
} else { | ||
$repo=$env:REPO | ||
} | ||
|
||
$classPath= | ||
|
||
if ((Test-Path env:ENDORSED_DIR) -Or ( $env:ENDORSED_DIR -ne "")) { | ||
$classPath = $env:BASEDIR + "\" + $env:ENDORSED_DIR + "\*;" + $classPath; | ||
} | ||
|
||
if ((Test-Path env:CLASSPATH_PREFIX) -Or ( $env:CLASSPATH_PREFIX -ne "")) { | ||
$classPath = $env:CLASSPATH_PREFIX + "";" + $classPath; | ||
} | ||
iex $javaCmd $env:JAVA_OPTS Yo dude xyz="%REPO%" -classpath $classPath -Dapp.name="repo-test" -Dapp.repo="$repo" -Dapp.home="$baseDir" -Dbasedir="$baseDir" foo.Bar $args |
47 changes: 47 additions & 0 deletions
47
...haus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Copyright 2001-2006 The Apache Software Foundation. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2001-2006 The Apache Software Foundation. All rights | ||
# reserved. | ||
|
||
|
||
$baseDir = split-path -parent split-path -parent $MyInvocation.MyCommand.Definition | ||
|
||
$setupScript = $PSScriptRoot + "\setup.ps1"; if (Test-Path $setupScript ) { &$setupScript } | ||
|
||
if (-not (Test-Path env:JAVACMD) -Or ( $env:JAVACMD -eq "" )) { | ||
$javaCmd=start /min javaw | ||
} else { | ||
$javaCmd=$env:JAVACMD | ||
} | ||
|
||
if (-not (Test-Path env:REPO) -Or ( $env:REPO -eq "" )) { | ||
$repo=$env:BASEDIR + "\" + repo | ||
} else { | ||
$repo=$env:REPO | ||
} | ||
|
||
$classPath= | ||
|
||
if ((Test-Path env:ENDORSED_DIR) -Or ( $env:ENDORSED_DIR -ne "")) { | ||
$classPath = $env:BASEDIR + "\" + $env:ENDORSED_DIR + "\*;" + $classPath; | ||
} | ||
|
||
if ((Test-Path env:CLASSPATH_PREFIX) -Or ( $env:CLASSPATH_PREFIX -ne "")) { | ||
$classPath = $env:CLASSPATH_PREFIX + "";" + $classPath; | ||
} | ||
iex $javaCmd $env:JAVA_OPTS Yo dude -classpath $classPath -Dapp.name="test" -Dapp.repo="$repo" -Dapp.home="$baseDir" -Dbasedir="$baseDir" foo.Bar $args |
47 changes: 47 additions & 0 deletions
47
...est/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Copyright 2001-2006 The Apache Software Foundation. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2001-2006 The Apache Software Foundation. All rights | ||
# reserved. | ||
|
||
|
||
$baseDir = split-path -parent split-path -parent $MyInvocation.MyCommand.Definition | ||
|
||
$setupScript = $PSScriptRoot + "\setup.ps1"; if (Test-Path $setupScript ) { &$setupScript } | ||
|
||
if (-not (Test-Path env:JAVACMD) -Or ( $env:JAVACMD -eq "" )) { | ||
$javaCmd=java | ||
} else { | ||
$javaCmd=$env:JAVACMD | ||
} | ||
|
||
if (-not (Test-Path env:REPO) -Or ( $env:REPO -eq "" )) { | ||
$repo=$env:BASEDIR + "\" + repo | ||
} else { | ||
$repo=$env:REPO | ||
} | ||
|
||
$classPath= | ||
|
||
if ((Test-Path env:ENDORSED_DIR) -Or ( $env:ENDORSED_DIR -ne "")) { | ||
$classPath = $env:BASEDIR + "\" + $env:ENDORSED_DIR + "\*;" + $classPath; | ||
} | ||
|
||
if ((Test-Path env:CLASSPATH_PREFIX) -Or ( $env:CLASSPATH_PREFIX -ne "")) { | ||
$classPath = $env:CLASSPATH_PREFIX + "";" + $classPath; | ||
} | ||
iex $javaCmd $env:JAVA_OPTS Yo dude -classpath $classPath -Dapp.name="test-endorsed-lib" -Dapp.repo="$repo" -Dapp.home="$baseDir" -Dbasedir="$baseDir" foo.Bar $args |
47 changes: 47 additions & 0 deletions
47
...-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Copyright 2001-2006 The Apache Software Foundation. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2001-2006 The Apache Software Foundation. All rights | ||
# reserved. | ||
|
||
|
||
$baseDir = split-path -parent split-path -parent $MyInvocation.MyCommand.Definition | ||
|
||
$setupScript = $PSScriptRoot + "\setup.ps1"; if (Test-Path $setupScript ) { &$setupScript } | ||
|
||
if (-not (Test-Path env:JAVACMD) -Or ( $env:JAVACMD -eq "" )) { | ||
$javaCmd=java | ||
} else { | ||
$javaCmd=$env:JAVACMD | ||
} | ||
|
||
if (-not (Test-Path env:REPO) -Or ( $env:REPO -eq "" )) { | ||
$repo=$env:BASEDIR + "\" + repo | ||
} else { | ||
$repo=$env:REPO | ||
} | ||
|
||
$classPath= | ||
|
||
if ((Test-Path env:ENDORSED_DIR) -Or ( $env:ENDORSED_DIR -ne "")) { | ||
$classPath = $env:BASEDIR + "\" + $env:ENDORSED_DIR + "\*;" + $classPath; | ||
} | ||
|
||
if ((Test-Path env:CLASSPATH_PREFIX) -Or ( $env:CLASSPATH_PREFIX -ne "")) { | ||
$classPath = $env:CLASSPATH_PREFIX + "";" + $classPath; | ||
} | ||
iex $javaCmd $env:JAVA_OPTS Yo dude -classpath $classPath -Dapp.name="test" -Dapp.repo="$repo" -Dapp.home="$baseDir" -Dbasedir="$baseDir" foo.Bar $args |