Maven: downloading files from url

后端 未结 6 1978
生来不讨喜
生来不讨喜 2020-12-02 14:08

Can I download some files from http while maven lifecycle? any plugin?

6条回答
  •  渐次进展
    2020-12-02 14:54

    You can use the download-single goal in the wagon plugin. Here is an example to download an HTML page (notice that the URL have to be split in a "directory" url and a "file name")

    
      org.codehaus.mojo
      wagon-maven-plugin
      1.0
      
        
          validate
          download-single
          
            http://www.mojohaus.org/wagon-maven-plugin
            download-single-mojo.html
            [my dir]/mojo-help.html
          
        
      
    
    

提交回复
热议问题