如何从 Hudson 调用的 perl 脚本调用 ant
Hudson 允许我们指定我们想要使用的 ant 版本。现在,我想做的是让 Hudson 调用我的 perl 脚本,然后该脚本将调用 ant。我该怎么做?
当我尝试从 Hudson 调用的 perl 脚本调用 ant 时,出现以下错误:
Can't exec "ant": No such file or directory at ...........
我知道此错误意味着“ant”不在路径中。问题是,如果我提供确切的位置或将 ant 添加到路径中,则意味着我没有使用我从 Hudson 指定的 ant。
有人可以帮忙吗?
Hudson allows us to specify the ant version that we want to use. Now, what I want to do is having Hudson call my perl script which then will call ant. how do I do this?
When I tried to call ant from perl script that was called from Hudson, I got the following error:
Can't exec "ant": No such file or directory at ...........
I understand that this error means "ant" is not in the path. The thing is that if I provide the exact location or add ant to the path, then that means I am not using ant that I specified from Hudson.
Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您实际上并不希望调用 ant 作为 Hudson 构建步骤,如果您将其添加为构建步骤,则会发生这种情况。如何将其设置为 ANT_VERSION 参数化选项,并带有以下选项:/opt/apache-ant-1.8.0、/opt/apache-ant-xyz 等。然后在执行 Shell 构建步骤中执行以下操作:
您的脚本将 ant 版本的路径作为参数。
It looks like you don't actually want to invoke ant as a Hudson build step which will happen if you add it as a build step. How about making it a parameterized Choice as ANT_VERSION with options: /opt/apache-ant-1.8.0, /opt/apache-ant-x.y.z, etc. Then in your Execute Shell build step do:
where your script takes the path to the ant version as a paramter.