我正在尝试运行一个使用 ANT 构建的脚本,但我不想必须从我的 build.xml 文件所在的位置运行它。有没有办法将位置传递给 Ant ?
最佳答案
使用 -buildfile
选项。例如
$ cd /some/other/directory/
$ ant -buildfile /path/to/build/file.xml
这里有两个同义选项,-file
和 -f
。因此,您可以使用任何一个
$ ant -file /path/to/build/file.xml
或
$ ant -f /path/to/build/file.xml
关于linux - 在 ant 中传递 build.xml 的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3770656/