-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
This works as expected:
$ mvn -X exec:exec -Dexec.executable=java -Dexec.args="com.example.Main"
...
[DEBUG] Executing command line: [java, com.example.Main]
Caused by: java.lang.ClassNotFoundException: com.example.Main
...
This works as expected as well:
$ mvn -X exec:exec -Dexec.executable=java -Dexec.args="
com.example.Main"
[DEBUG] Executing command line: [java, com.example.Main]
Error: Could not find or load main class com.example.Main
...
As does this:
$ mvn -X exec:exec -Dexec.executable=java -Dexec.args="
com.example.Main"
[DEBUG] Executing command line: [java, com.example.Main]
Error: Could not find or load main class com.example.Main
...
Changing to this (new line after " and spaces before com.example.Main on the next line) causes it to add an additional empty argument to the command line:
$ mvn -X exec:exec -Dexec.executable=java -Dexec.args="
com.example.Main"
...
[DEBUG] Executing command line: [java, , com.example.Main]
Error: Could not find or load main class
...
This repeats with multiple new line / space combinations:
$ mvn -X exec:exec -Dexec.executable=java -Dexec.args="
com.example.Main"
[DEBUG] Executing command line: [java, , , , com.example.Main]
Error: Could not find or load main class
...
It looks to only happen when there's a mix of new lines and spaces.
Metadata
Metadata
Assignees
Labels
No labels