我可以像这样使用pom.xml使用目标来执行AntBuilder。
def ant = new AntBuilder()
ant.sequential {
exec(executable:'mvn') {
arg(value:'clean')
arg(value:'install')
}
}但是如何将执行目录指定给AntBuilder呢?我只想走一条绝对的路。
我已经试过了。
ant.project.setProperty('basedir', "${serviceRootDir}/")和
ant.sequential {
mkdir(dir:"${serviceRootDir}/")...你会认为这在医生中是清楚的。
发布于 2014-02-11 18:32:00
这对我来说很管用:
ant.exec(executable:"ls", dir:"/your/desired/directory")它在给定的目录中执行ls,因此mvn应该可以工作。
https://stackoverflow.com/questions/21709186
复制相似问题