I'm using exec-maven-plugin to run javapackager from java 8 to bundle a javafx application and the system properties need to contain a space in the value.
When I use <argument>-BjvmProperties=log_path="%LOCALAPPDATA%/ERMS/Desktop Alerts/"
I get: Error: Unknown argument: Alerts /
I added a forward slash before the space, which makes javapackager run, but the argument does not seem to be passed correctly when the application runs. In the resulting app/ERMS Desktop Alerts.cfg file it comes out as -Dlog_path=%LOCALAPPDATA%/ERMS/Desktop" Alerts/
If I invoke java from the command line I can use java -Dlog_path="%LOCALAPPDATA%/ERMS/Desktop Alerts" -jar DesktopAlerts.jar
and that works fine.
Any (odd) number of slashes I've added has not changed the result at all.
From javapackager itself run from cmd I have found -BjvmProperties=log_path="${env:LOCALAPPDATA}/ERMS/Desktop Alerts/"
works. Now it's a matter of making exec-maven-plugin produce that argument.
答案 0 :(得分:0)
解决方案是用斜线逃离空间。
<argument>-BjvmProperties=log_path=${env:LOCALAPPDATA}/ERMS/Desktop\ Alerts/</argument>
看来引号是问题 - 可能与https://jira.atlassian.com/browse/BAM-9234
有关