I’m trying to pass in parameters to tasks using program arguments through the Eclipse Buildship plugin and can’t seem to get it to accept program arguments with spaces. I’ve tried enclosing with quotes which works fine via the command line, but doesn’t seem to work with Buildship. It sees the space and interprets what comes next as a task. Is there another way to enclose program argument values to include spaces?
Buildship: 2.2.0
Gradle: 4.4
Java: 1.8.0_121
An example of trying to enclose with quotes through the Buildship plugin…
…
Gradle Distribution: Specific Gradle version 4.4
Gradle Version: 4.4
Java Home: C:\Program Files\Java\jdk1.8.0_121
JVM Arguments: None
Program Arguments: -PwebDriver=chrome -PappEnv=DEVELOPMENT -PappVersion="Version no : 005.014"
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: test
webDriver: chrome
appEnv: DEVELOPMENT
appVersion: "Version
FAILURE: Build failed with an exception.
- What went wrong:
Task ‘no’ not found in root project ‘MyProject’.
…
And running from the command line…
C:\MyProject>gradlew build -PwebDriver=chrome -PappEnv=DEVELOPMENT -PappVersion=“Version no : 005.014”
webDriver: chrome
appEnv: DEVELOPMENT
appVersion: Version no : 005.014
:compileJava UP-TO-DATE
…