gradle application plugin rocks and creates the following directory structure
app bin - scripts to start the server lib - jar files {anything else from src/dist just goes in app}
The thing I can't figure out is the scripts do not make the server run in the app directory which is annoying. Is there a way so that it can be configured and will run in the app directory ? (or a way to make it set the user.dir to .. relative from the bin directory).
This is quite frustrating since I have to do some sort of check and error out saying the program must be run from app diretory so then I know how to lookup files.
Right now, if you have a property -Dlogback.configurationFile=config/logback.xml
and you run the start script from anywhere on the machine other than the app directory, logging silently stops working.
thanks, Dean
Based on Jeff Gaer's answer, I got to the following answer on my version of gradle/groovy. gradle version 2.14-rc-1 groovy 2.4.4
I only tested on mac.
BIG NOTE: The bash one has '"args"' in the script which is annoying while windows only had "args" so the replaces I had to do were a little different. I marked his answer as correct since it got me to the answer.
The following code worked for me ( only tested on linux , not sure about the windows section(