Closed cherylking closed 5 years ago
First attempt at fix resulted in this error:
command.add("--archive=" + "\\\"" + archivePath + "\\\"");
[INFO] [INFO] CWWKM2001I: Invoke command is ["C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\liberty\wlp\bin\server.bat", package, test, --archive=\"C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\package-type-config-with-space-it.jar\", --include=runnable].
[INFO] [INFO] Packaging server test.
[INFO] [INFO] CWWKE0056E: Unable to zip up directory due to an IO exception java.io.IOException: java.lang.reflect.InvocationTargetException.
I'm going to attempt quoting the whole argument myself and see what happens.
Second attempt also failed:
command.add("\"--archive=\\\"" + archivePath + "\\\"\"");
[INFO] [INFO] CWWKM2001I: Invoke command is ["C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\liberty\wlp\bin\server.bat", package, test, "--archive=\"C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\package-type-config-with-space-it.jar\"", --include=runnable].
[INFO] [INFO] Packaging server test.
[INFO] [INFO] CWWKE0056E: Unable to zip up directory due to an IO exception java.io.IOException: java.lang.reflect.InvocationTargetException.
[INFO] [INFO] Server test package failed. Check server logs for details.
The original code results in the reported error:
command.add("--archive=" + "\"" + archivePath + "\"");
[INFO] [INFO] CWWKM2001I: Invoke command is ["C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\liberty\wlp\bin\server.bat", package, test, --archive="C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\package-type-config-with-space-it.jar", --include=runnable].
[INFO] [INFO] CWWKE0027W: Only one server may be specified on the command line; subsequent names will be ignored (server=test, ignored=space-it\target\package-type-config-with-space-it.jar).
[INFO] [INFO] Packaging server test.
[INFO] [INFO] Server test package complete in C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with.jar.
Last commit finally resulted in a successful package command.
command.add("\"--archive=" + archivePath + "\"");
[INFO] [INFO] CWWKM2001I: Invoke command is ["C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\liberty\wlp\bin\server.bat", package, test, "--archive=C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\package-type-config-with-space-it.jar", --include=runnable].
[INFO] [INFO] Packaging server test.
[INFO] [INFO] Server test package complete in C:\projects\ci-maven\liberty-maven-plugin\target\it\package-type-config-with space-it\target\package-type-config-with-space-it.jar.
This fix attempts to resolve issue https://github.com/OpenLiberty/ci.maven/issues/677.