ant的get任务

  • ant的get任务表示从 URL获取文件。运行时(runtime)支持的URL schema都可以在此处使用,包括http:,https:,ftp: 和 jar:
  • 必须包含属性src、或者内嵌的资源集合,用来指明从哪边获取文件。
  • 必须包含dest属性,指明获取到的文件保存在哪个文件或者目录。

例如下面示例,表示从https://ant.apache.org/获取内容,保存到help/index.html文件中:

  • 可以内嵌任意数量的header元素,作为请求的HTTP头。
    例如,下面的示例,在http请求中增加了三个定制的头:
<get src="https://ant.apache.org/index.html" dest="downloads">
  <header name="header1" value="headerValue1"/>
  <header name="header2" value="headerValue2"/>
  <header name="header3" value="headerValue3"/>
</get>

你可能感兴趣的:(ant)