To get the project to build I have to explictly add the necessary .jar files to the build path:
project -> properties -> java build path -> libraries -> add JARs
Question
I have some Groovy code which will from fine from the command line, but when I try to use Springsource's GGTS fails:
Caught: java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
at empyrean.Empyrean.run(Empyrean.groovy:20)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException
... 1 more
I know this is because I have not got paths or something similar set correctly in GGTS but I cannot work out how to fix this (I used to use STS without a problem, this is the first time I have tried GGTS)
The non-compiling code is this (first line here is line 20 in the file):
def empyreanCli = new CliBuilder(usage:'empyrean [-d] <empyrean script>')
empyreanCli.d(longOpt:'debug',
'output debug data as we go')
empyreanCli.f(longOpt:'file',
'Empyrean script to run')
empyreanCli.u(longOpt:'usage',
'show this usage message')
def empyreanParse = empyreanCli.parse(args)
if (empyreanParse.u || args.size() == 0)
empyreanCli.usage()
else {
def engine = new EmpyreanEngine()
if (empyreanParse.d)
engine.debug = true
if (empyreanParse.f)
engine.process(binsicParse.f)
else
engine.process(args[args.size() - 1])
}
Which, as I say, runs fine from the command line...
La solution
To get the project to build I have to explictly add the necessary .jar files to the build path:
project -> properties -> java build path -> libraries -> add JARs