java - Running jar with parameters in gradle

I want to run a jar file with parameters located at C:/Users/nwuser/FitNesse/fitnesse-standalone.jar in my gradle script. I know how to do it without parameters:

apply plugin: 'java'

task runJar(dependsOn:jar) << {
  javaexec { 
    main="-jar"; args "C:/Users/nwuser/FitNesse/fitnesse-standalone.jar"
  } 
}

But now I want to do something similiar like (if using the console):

java -jar fitnesse-standalone.jar -c "FrontPage?suite&format=text"

How can I apply -c "FrontPage?suite&format=text" inside my gradle script?

Kind regards !

This question and all comments follow the "Attribution Required."

All Answers

Answers Loading...
Leave a Reply
You must be logged in to post a answer.
About the author