From f7f0657f7bff4837835f446cb52a4c9e9d0b98a7 Mon Sep 17 00:00:00 2001 From: Luke Nezda Date: Mon, 27 Mar 2017 12:38:47 -0500 Subject: [PATCH] [#48] just swap $JAVA_OPTS @EXTRA_JVM_ARGUMENTS@ to env is last and has a chance for its values to take precedence --- .../src/it/binFolderTest/verify.groovy | 4 ++-- .../src/it/booterLicenseHeaderTest/verify.groovy | 8 ++++---- .../configurationSourceDirectoryTest/verify.groovy | 4 ++-- .../src/it/environmentSetupTest/verify.groovy | 4 ++-- .../src/it/programCLIArgumentsTest/verify.groovy | 4 ++-- .../verify.groovy | 4 ++-- .../src/it/programJvmArgumentsTest/verify.groovy | 12 ++++++------ .../src/it/programLicenseHeaderTest/verify.groovy | 8 ++++---- .../mojo/appassembler/daemon/script/unixBinTemplate | 2 +- .../appassembler/daemon/script/windowsBinTemplate | 2 +- .../daemon/script-basedir-repo/expected-basedir-test | 2 +- .../script-basedir-repo/expected-basedir-test.bat | 2 +- .../daemon/script-basedir-repo/expected-repo-test | 2 +- .../script-basedir-repo/expected-repo-test.bat | 2 +- .../background/expected-false-showConsoleWindow-test | 2 +- .../expected-false-showConsoleWindow-test.bat | 2 +- .../mojo/appassembler/daemon/script/expected-test | 2 +- .../daemon/script/expected-test-endorsed-lib | 2 +- .../daemon/script/expected-test-endorsed-lib.bat | 2 +- .../appassembler/daemon/script/expected-test.bat | 2 +- 20 files changed, 36 insertions(+), 36 deletions(-) diff --git a/appassembler-maven-plugin/src/it/binFolderTest/verify.groovy b/appassembler-maven-plugin/src/it/binFolderTest/verify.groovy index 8fd87e47..66c08b38 100644 --- a/appassembler-maven-plugin/src/it/binFolderTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/binFolderTest/verify.groovy @@ -37,7 +37,7 @@ def unixScriptFile = new File( fileBinFolder, "basic-test" ); t.checkExistenceAndContentOfAFile(unixScriptFile, [ '[ -f "$BASEDIR"/xbin/setup-env ] && . "$BASEDIR"/xbin/setup-env', 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/envrionmentSetup-test/1.0-SNAPSHOT/envrionmentSetup-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS -Xms16m \\', + 'exec "$JAVACMD" -Xms16m $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="basic-test" \\', ' -Dapp.pid="$$" \\', @@ -54,7 +54,7 @@ File windowsBatchFile = new File( fileBinFolder, "basic-test.bat" ); t.checkExistenceAndContentOfAFile(windowsBatchFile, [ /if exist "%BASEDIR%\xbin\setup-env.bat" call "%BASEDIR%\xbin\setup-env.bat"/, /set CLASSPATH="%BASEDIR%"\etc;"%REPO%"\org\codehaus\mojo\appassembler-maven-plugin\it\envrionmentSetup-test\1.0-SNAPSHOT\envrionmentSetup-test-1.0-SNAPSHOT.jar/, - /%JAVACMD% %JAVA_OPTS% -Xms16m -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%/, + /%JAVACMD% -Xms16m %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%/, ]) //Check the existence of the generated repository. diff --git a/appassembler-maven-plugin/src/it/booterLicenseHeaderTest/verify.groovy b/appassembler-maven-plugin/src/it/booterLicenseHeaderTest/verify.groovy index eefe8098..b885e56f 100644 --- a/appassembler-maven-plugin/src/it/booterLicenseHeaderTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/booterLicenseHeaderTest/verify.groovy @@ -36,7 +36,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "booter-unix/bin/boot '# ******************************************', '# --- This is my own license header file ---', '# ******************************************', - 'exec "$JAVACMD" $JAVA_OPTS \\', + 'exec "$JAVACMD" $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="booterLicenseHeaderTest" \\', ' -Dapp.pid="$$" \\', @@ -58,7 +58,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "booter-windows/bin/b '@REM ******************************************', '@REM --- This is my own license header file ---', '@REM ******************************************', - '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="booterLicenseHeaderTest" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.booter.AppassemblerBooter %CMD_LINE_ARGS%', + '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="booterLicenseHeaderTest" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.booter.AppassemblerBooter %CMD_LINE_ARGS%', ]) t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "booter-windows/etc/booterLicenseHeaderTest.xml" ), [ @@ -73,7 +73,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "booter-unix/bin/boot '# ******************************************', '# --- This is LicenseHeader File 01 ---', '# ******************************************', - 'exec "$JAVACMD" $JAVA_OPTS \\', + 'exec "$JAVACMD" $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="booterLicenseHeaderTest-01" \\', ' -Dapp.pid="$$" \\', @@ -95,7 +95,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "booter-windows/bin/b '@REM ******************************************', '@REM --- This is LicenseHeader File 01 ---', '@REM ******************************************', - '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="booterLicenseHeaderTest-01" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.booter.AppassemblerBooter %CMD_LINE_ARGS%', + '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="booterLicenseHeaderTest-01" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.booter.AppassemblerBooter %CMD_LINE_ARGS%', ]) t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "booter-windows/etc/booterLicenseHeaderTest-01.xml" ), [ diff --git a/appassembler-maven-plugin/src/it/configurationSourceDirectoryTest/verify.groovy b/appassembler-maven-plugin/src/it/configurationSourceDirectoryTest/verify.groovy index 14f5d7fd..ae09b234 100644 --- a/appassembler-maven-plugin/src/it/configurationSourceDirectoryTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/configurationSourceDirectoryTest/verify.groovy @@ -36,7 +36,7 @@ def unixScriptFile = new File( fileBinFolder, "basic-test" ); t.checkExistenceAndContentOfAFile(unixScriptFile, [ 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/configurationSourceDirectory-test/1.0-SNAPSHOT/configurationSourceDirectory-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS -Xms16m \\', + 'exec "$JAVACMD" -Xms16m $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="basic-test" \\', ' -Dapp.pid="$$" \\', @@ -51,7 +51,7 @@ File windowsBatchFile = new File( fileBinFolder, "basic-test.bat" ); t.checkExistenceAndContentOfAFile(windowsBatchFile, [ /set CLASSPATH="%BASEDIR%"\etc;"%REPO%"\org\codehaus\mojo\appassembler-maven-plugin\it\configurationSourceDirectory-test\1.0-SNAPSHOT\configurationSourceDirectory-test-1.0-SNAPSHOT.jar/, - '%JAVACMD% %JAVA_OPTS% -Xms16m -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', + '%JAVACMD% -Xms16m %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', ]) //Check the existence of the generated repository. diff --git a/appassembler-maven-plugin/src/it/environmentSetupTest/verify.groovy b/appassembler-maven-plugin/src/it/environmentSetupTest/verify.groovy index ce228209..214fad92 100644 --- a/appassembler-maven-plugin/src/it/environmentSetupTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/environmentSetupTest/verify.groovy @@ -37,7 +37,7 @@ def unixScriptFile = new File( fileBinFolder, "basic-test" ); t.checkExistenceAndContentOfAFile(unixScriptFile, [ '[ -f "$BASEDIR"/bin/setup-env ] && . "$BASEDIR"/bin/setup-env', 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/envrionmentSetup-test/1.0-SNAPSHOT/envrionmentSetup-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS -Xms16m \\', + 'exec "$JAVACMD" -Xms16m $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="basic-test" \\', ' -Dapp.pid="$$" \\', @@ -54,7 +54,7 @@ File windowsBatchFile = new File( fileBinFolder, "basic-test.bat" ); t.checkExistenceAndContentOfAFile(windowsBatchFile, [ 'if exist "%BASEDIR%\\bin\\setup-env.bat" call "%BASEDIR%\\bin\\setup-env.bat"', 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\envrionmentSetup-test\\1.0-SNAPSHOT\\envrionmentSetup-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% -Xms16m -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', + '%JAVACMD% -Xms16m %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', ]) //Check the existence of the generated repository. diff --git a/appassembler-maven-plugin/src/it/programCLIArgumentsTest/verify.groovy b/appassembler-maven-plugin/src/it/programCLIArgumentsTest/verify.groovy index 0b3f2ab6..bc9aeb4c 100644 --- a/appassembler-maven-plugin/src/it/programCLIArgumentsTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/programCLIArgumentsTest/verify.groovy @@ -36,7 +36,7 @@ def unixScriptFile = new File( fileBinFolder, "basic-test" ); t.checkExistenceAndContentOfAFile(unixScriptFile, [ 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/programCLIArguments-test/1.0-SNAPSHOT/programCLIArguments-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS -Xms16m \\', + 'exec "$JAVACMD" -Xms16m $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="basic-test" \\', ' -Dapp.pid="$$" \\', @@ -53,7 +53,7 @@ File windowsBatchFile = new File( fileBinFolder, "basic-test.bat" ); t.checkExistenceAndContentOfAFile(windowsBatchFile, [ 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\programCLIArguments-test\\1.0-SNAPSHOT\\programCLIArguments-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% -Xms16m -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', + '%JAVACMD% -Xms16m %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', ]) //Check the existence of the generated repository. diff --git a/appassembler-maven-plugin/src/it/programCLIArgumentsWithExpandingTest/verify.groovy b/appassembler-maven-plugin/src/it/programCLIArgumentsWithExpandingTest/verify.groovy index 5e1fd09a..c988fb63 100644 --- a/appassembler-maven-plugin/src/it/programCLIArgumentsWithExpandingTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/programCLIArgumentsWithExpandingTest/verify.groovy @@ -36,7 +36,7 @@ def unixScriptFile = new File( fileBinFolder, "basic-test" ); t.checkExistenceAndContentOfAFile(unixScriptFile, [ 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/programCLIArgumentsWithExpanding-test/1.0-SNAPSHOT/programCLIArgumentsWithExpanding-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS -Dx.y.basedir="$BASEDIR" -Dx.y.repo="$REPO" \\', + 'exec "$JAVACMD" -Dx.y.basedir="$BASEDIR" -Dx.y.repo="$REPO" $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="basic-test" \\', ' -Dapp.pid="$$" \\', @@ -53,7 +53,7 @@ def windowsScriptFile = new File( fileBinFolder, "basic-test.bat"); t.checkExistenceAndContentOfAFile(windowsScriptFile, [ 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\programCLIArgumentsWithExpanding-test\\1.0-SNAPSHOT\\programCLIArgumentsWithExpanding-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% -Dx.y.basedir="%BASEDIR%" -Dx.y.repo="%REPO%" -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 "%BASEDIR%" "%REPO%" %CMD_LINE_ARGS%', + '%JAVACMD% -Dx.y.basedir="%BASEDIR%" -Dx.y.repo="%REPO%" %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="basic-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 "%BASEDIR%" "%REPO%" %CMD_LINE_ARGS%', ]) //Check the existence of the generated repository. diff --git a/appassembler-maven-plugin/src/it/programJvmArgumentsTest/verify.groovy b/appassembler-maven-plugin/src/it/programJvmArgumentsTest/verify.groovy index 42c65793..caed73eb 100644 --- a/appassembler-maven-plugin/src/it/programJvmArgumentsTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/programJvmArgumentsTest/verify.groovy @@ -35,7 +35,7 @@ def scriptfile_program_01_test = new File( fileBinFolder, 'program-01-test'); t.checkExistenceAndContentOfAFile(scriptfile_program_01_test, [ 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/programJvmArguments-test/1.0-SNAPSHOT/programJvmArguments-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS "--port 1" "--option 2" \\', + 'exec "$JAVACMD" "--port 1" "--option 2" $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="program-01-test" \\', ' -Dapp.pid="$$" \\', @@ -50,14 +50,14 @@ def scriptfile_program_01_test_bat = new File( fileBinFolder, 'program-01-test.b t.checkExistenceAndContentOfAFile(scriptfile_program_01_test_bat, [ 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\programJvmArguments-test\\1.0-SNAPSHOT\\programJvmArguments-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% "--port 1" "--option 2" -classpath %CLASSPATH% -Dapp.name="program-01-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', + '%JAVACMD% "--port 1" "--option 2" %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="program-01-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', ]); def scriptfile_program_02_test = new File( fileBinFolder, 'program-02-test'); t.checkExistenceAndContentOfAFile(scriptfile_program_02_test, [ 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/programJvmArguments-test/1.0-SNAPSHOT/programJvmArguments-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS -Xms20M -Xmx256G \\', + 'exec "$JAVACMD" -Xms20M -Xmx256G $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="program-02-test" \\', ' -Dapp.pid="$$" \\', @@ -73,7 +73,7 @@ def scriptfile_program_02_test_bat = new File( fileBinFolder, 'program-02-test.b t.checkExistenceAndContentOfAFile(scriptfile_program_02_test_bat, [ 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\programJvmArguments-test\\1.0-SNAPSHOT\\programJvmArguments-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% -Xms20M -Xmx256G -classpath %CLASSPATH% -Dapp.name="program-02-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld test-environment %CMD_LINE_ARGS%', + '%JAVACMD% -Xms20M -Xmx256G %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="program-02-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld test-environment %CMD_LINE_ARGS%', ]); @@ -82,7 +82,7 @@ def scriptfile_program_03_test = new File( fileBinFolder, 'program-03-test'); t.checkExistenceAndContentOfAFile(scriptfile_program_03_test, [ 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/programJvmArguments-test/1.0-SNAPSHOT/programJvmArguments-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS -Xms20m -Xmx256m -Xss128m -Dtest=false -Dlog4j.properties=false -Danton=2345 -Dberta="xaz" \\', + 'exec "$JAVACMD" -Xms20m -Xmx256m -Xss128m -Dtest=false -Dlog4j.properties=false -Danton=2345 -Dberta="xaz" $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="program-03-test" \\', ' -Dapp.pid="$$" \\', @@ -98,7 +98,7 @@ def scriptfile_program_03_test_bat = new File( fileBinFolder, 'program-03-test.b t.checkExistenceAndContentOfAFile(scriptfile_program_03_test_bat, [ 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\programJvmArguments-test\\1.0-SNAPSHOT\\programJvmArguments-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% -Xms20m -Xmx256m -Xss128m -Dtest=false -Dlog4j.properties=false -Danton=2345 -Dberta="xaz" -classpath %CLASSPATH% -Dapp.name="program-03-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld test-environment %CMD_LINE_ARGS%', + '%JAVACMD% -Xms20m -Xmx256m -Xss128m -Dtest=false -Dlog4j.properties=false -Danton=2345 -Dberta="xaz" %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="program-03-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld test-environment %CMD_LINE_ARGS%', ]); diff --git a/appassembler-maven-plugin/src/it/programLicenseHeaderTest/verify.groovy b/appassembler-maven-plugin/src/it/programLicenseHeaderTest/verify.groovy index 33809407..03aebb4a 100644 --- a/appassembler-maven-plugin/src/it/programLicenseHeaderTest/verify.groovy +++ b/appassembler-maven-plugin/src/it/programLicenseHeaderTest/verify.groovy @@ -36,7 +36,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "programLicenseHeader '# --- This is my own license header file ---', '# ******************************************', 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/programLicenseHeader-test/1.0-SNAPSHOT/programLicenseHeader-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS \\', + 'exec "$JAVACMD" $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="programLicenseHeader-test" \\', ' -Dapp.pid="$$" \\', @@ -52,7 +52,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "programLicenseHeader '@REM --- This is my own license header file ---', '@REM ******************************************', 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\programLicenseHeader-test\\1.0-SNAPSHOT\\programLicenseHeader-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="programLicenseHeader-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', + '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="programLicenseHeader-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld arg1 arg2 %CMD_LINE_ARGS%', ]) t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "programLicenseHeader-01-test"), [ @@ -60,7 +60,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "programLicenseHeader '# --- This is LicenseHeader File 01 ---', '# ******************************************', 'CLASSPATH="$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/programLicenseHeader-test/1.0-SNAPSHOT/programLicenseHeader-test-1.0-SNAPSHOT.jar', - 'exec "$JAVACMD" $JAVA_OPTS \\', + 'exec "$JAVACMD" $JAVA_OPTS \\', ' -classpath "$CLASSPATH" \\', ' -Dapp.name="programLicenseHeader-01-test" \\', ' -Dapp.pid="$$" \\', @@ -76,7 +76,7 @@ t.checkExistenceAndContentOfAFile(new File( fileBinFolder, "programLicenseHeader '@REM --- This is LicenseHeader File 01 ---', '@REM ******************************************', 'set CLASSPATH="%BASEDIR%"\\etc;"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\programLicenseHeader-test\\1.0-SNAPSHOT\\programLicenseHeader-test-1.0-SNAPSHOT.jar', - '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="programLicenseHeader-01-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld %CMD_LINE_ARGS%', + '%JAVACMD% %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="programLicenseHeader-01-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" org.codehaus.mojo.appassembler.example.helloworld.HelloWorld %CMD_LINE_ARGS%', ]) //Check the existence of the generated repository. diff --git a/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/unixBinTemplate b/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/unixBinTemplate index c3a65630..f93f6767 100644 --- a/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/unixBinTemplate +++ b/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/unixBinTemplate @@ -99,7 +99,7 @@ if $cygwin; then [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"` fi -exec "$JAVACMD" $JAVA_OPTS @EXTRA_JVM_ARGUMENTS@ \ +exec "$JAVACMD" @EXTRA_JVM_ARGUMENTS@ $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Dapp.name="@APP_NAME@" \ -Dapp.pid="$$" \ diff --git a/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/windowsBinTemplate b/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/windowsBinTemplate index 96fd8540..381a9fcc 100644 --- a/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/windowsBinTemplate +++ b/appassembler-maven-plugin/src/main/resources/org/codehaus/mojo/appassembler/daemon/script/windowsBinTemplate @@ -64,7 +64,7 @@ if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH% @REM Reaching here means variables are defined and arguments have been captured :endInit -%JAVACMD% %JAVA_OPTS% #EXTRA_JVM_ARGUMENTS# -classpath %CLASSPATH% -Dapp.name="#APP_NAME#" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" #MAINCLASS# #APP_ARGUMENTS#%CMD_LINE_ARGS% +%JAVACMD% #EXTRA_JVM_ARGUMENTS# %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="#APP_NAME#" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" #MAINCLASS# #APP_ARGUMENTS#%CMD_LINE_ARGS% if %ERRORLEVEL% NEQ 0 goto error goto end diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test index 62784247..bafe301a 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test @@ -117,7 +117,7 @@ if $cygwin; then [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"` fi -exec "$JAVACMD" $JAVA_OPTS Yo dude xyz="$BASEDIR" \ +exec "$JAVACMD" Yo dude xyz="$BASEDIR" $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Dapp.name="basedir-test" \ -Dapp.pid="$$" \ diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test.bat b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test.bat index 376003ba..5a103305 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test.bat +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-basedir-test.bat @@ -82,7 +82,7 @@ if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH% @REM Reaching here means variables are defined and arguments have been captured :endInit -%JAVACMD% %JAVA_OPTS% Yo dude xyz="%BASEDIR%" -classpath %CLASSPATH% -Dapp.name="basedir-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% +%JAVACMD% Yo dude xyz="%BASEDIR%" %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="basedir-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% if %ERRORLEVEL% NEQ 0 goto error goto end diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test index 33d5efe4..79985f93 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test @@ -117,7 +117,7 @@ if $cygwin; then [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"` fi -exec "$JAVACMD" $JAVA_OPTS Yo dude xyz="$REPO" \ +exec "$JAVACMD" Yo dude xyz="$REPO" $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Dapp.name="repo-test" \ -Dapp.pid="$$" \ diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test.bat b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test.bat index b0bb7c61..9bcb1c7d 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test.bat +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script-basedir-repo/expected-repo-test.bat @@ -82,7 +82,7 @@ if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH% @REM Reaching here means variables are defined and arguments have been captured :endInit -%JAVACMD% %JAVA_OPTS% Yo dude xyz="%REPO%" -classpath %CLASSPATH% -Dapp.name="repo-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% +%JAVACMD% Yo dude xyz="%REPO%" %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="repo-test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% if %ERRORLEVEL% NEQ 0 goto error goto end diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test index 7a295564..b6e31ba5 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test @@ -117,7 +117,7 @@ if $cygwin; then [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"` fi -exec "$JAVACMD" $JAVA_OPTS Yo dude \ +exec "$JAVACMD" Yo dude $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Dapp.name="test" \ -Dapp.pid="$$" \ diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test.bat b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test.bat index 15d7fe50..1f22614d 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test.bat +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/background/expected-false-showConsoleWindow-test.bat @@ -82,7 +82,7 @@ if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH% @REM Reaching here means variables are defined and arguments have been captured :endInit -%JAVACMD% %JAVA_OPTS% Yo dude -classpath %CLASSPATH% -Dapp.name="test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% +%JAVACMD% Yo dude %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% if %ERRORLEVEL% NEQ 0 goto error goto end diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test index 965b2612..aff161f2 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test @@ -117,7 +117,7 @@ if $cygwin; then [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"` fi -exec "$JAVACMD" $JAVA_OPTS Yo dude \ +exec "$JAVACMD" Yo dude $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Dapp.name="test" \ -Dapp.pid="$$" \ diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib index a048459c..b001ee3b 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib @@ -117,7 +117,7 @@ if $cygwin; then [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"` fi -exec "$JAVACMD" $JAVA_OPTS Yo dude \ +exec "$JAVACMD" Yo dude $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Dapp.name="test-endorsed-lib" \ -Dapp.pid="$$" \ diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib.bat b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib.bat index 2b64527d..dde90752 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib.bat +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test-endorsed-lib.bat @@ -82,7 +82,7 @@ if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH% @REM Reaching here means variables are defined and arguments have been captured :endInit -%JAVACMD% %JAVA_OPTS% Yo dude -classpath %CLASSPATH% -Dapp.name="test-endorsed-lib" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% +%JAVACMD% Yo dude %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="test-endorsed-lib" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% if %ERRORLEVEL% NEQ 0 goto error goto end diff --git a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test.bat b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test.bat index 570c92a6..2f522044 100644 --- a/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test.bat +++ b/appassembler-maven-plugin/src/test/resources/org/codehaus/mojo/appassembler/daemon/script/expected-test.bat @@ -82,7 +82,7 @@ if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH% @REM Reaching here means variables are defined and arguments have been captured :endInit -%JAVACMD% %JAVA_OPTS% Yo dude -classpath %CLASSPATH% -Dapp.name="test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% +%JAVACMD% Yo dude %JAVA_OPTS% -classpath %CLASSPATH% -Dapp.name="test" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" foo.Bar %CMD_LINE_ARGS% if %ERRORLEVEL% NEQ 0 goto error goto end