[英]Groovy project won't build in GGTS
I have some Groovy code which will from fine from the command line, but when I try to use Springsource's GGTS fails: 我有一些Groovy代码,可以从命令行使用,但是当我尝试使用Springsource的GGTS失败时:
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) 我知道这是因为我在GGTS中没有正确设置路径或类似的东西,但是我无法解决该问题(我曾经使用STS没问题,这是我第一次尝试GGTS)
The non-compiling code is this (first line here is line 20 in the file): 非编译代码是这样的(此处的第一行是文件中的第20行):
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... 就像我说的那样,它可以从命令行正常运行...
To get the project to build I have to explictly add the necessary .jar files to the build path: 要构建项目,我必须将必要的.jar文件明确添加到构建路径:
project -> properties -> java build path -> libraries -> add JARs 项目->属性-> Java构建路径->库->添加JAR
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.