Maven: downloading files from url

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

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

6条回答
  •  生来不讨喜
    2020-12-02 14:51

    Seems like wagon-maven-plugin from CodeHaus allows to download files over HTTP (though this is not is original goal).

    Here is an example downloading GlassFish zip before integration tests:

    
        org.codehaus.mojo
        wagon-maven-plugin
        1.0
        
            
                download-glassfish
                pre-integration-test
                
                    download-single
                
                
                    http://download.java.net
                    glassfish/3.1/release/glassfish-3.1.zip
                    ${project.build.directory}/glassfish
                
            
        
    
    

提交回复
热议问题