开发者

Can I use a remote build file in Ant?

I have an ant script created by a previous employee of our company and it contains tasks to check projects out of Subversion. The only problem I have though is that开发者_StackOverflow社区 the build file is actually part of a project in subversion. So in order to use the script I first have to checkout that project so that I have a copy of the build.xml file locally.

Is it possible at all to point ant to a remote file in a subversion repository? e.g.:

ant -f svn+ssh://path/to/build.xml

I tried it like this and it doesn't like it, but I was wondering if there was another way of doing it?


According to the source, this is not possible because the -f parameter is used to construct a plain old java.io.File — no fancy network access or SVN integration.

Can you not keep a checkout of that repo locally, or copy of that custom Ant Task in your classpath, as presumably its unlikely to change often?


You could use the <Import> task to import a local or remote build file in your build.xml.

See this question : How can I best share Ant targets between projects?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜