Programmatically setting MAVEN_OPTS from groovy script -
i trying write build script in groovy , want ensure maven_opts set based on build scripts configuration.
what have is:
def process = ['export maven_opts=\"-xmx' + config.buildenvironment.maxmemory + ' -xx:maxpermsize=' + config.buildenvironment.maxpermsize + '\"'].execute() process.in.eachline { line -> println(line) } config.buildenvironment.maxmemory resolves 1024m while config.buildenvironment.maxpermsize resolves 512m
the output is:
caught: java.io.ioexception: cannot run program "export maven_opts="-xmx1024m -xx:maxpermsize=512m"": error=2, no such file or directory java.io.ioexception: cannot run program "export maven_opts="-xmx1024m -xx:maxpermsize=512m"": error=2, no such file or directory @ mavenutils.setmavendefaultopts(mavenutils.groovy:23) @ mavenutils$setmavendefaultopts.call(unknown source) @ build.run(build.groovy:19) caused by: java.io.ioexception: error=2, no such file or directory ... 3 more i'm using string.execute() functionality lot through script build maven projects, copy files etc, first time have come across type of error. ideas?
turns out not possible.
i encapsulate logic shell script , execute instead, , that's how around issue.
Comments
Post a Comment