download & upload with auth ?
CMingTseng opened this issue · 5 comments
Dear Sir
like this post https://stackoverflow.com/questions/12298178/maven-depend-on-assembled-zip
if i want upload with auth a Encryption zip to remote (like Sonatype Nexus)
and
download with auth
How to do ?
THX
Note that with gradle-download-task, you can only download a file but not upload it. Assuming that your ZIP file has already been uploaded to your Nexus server, you just have to find the right URL and then configure a download task.
Example: Let's say you wanted to download the Vert.x documentation from Maven Central, which is also provided as a ZIP file. The URL to this ZIP file is https://repo1.maven.org/maven2/io/vertx/vertx-stack-docs/4.3.0/vertx-stack-docs-4.3.0-docs.zip. The download task would then be:
task downloadFile(type: Download) {
src 'https://repo1.maven.org/maven2/io/vertx/vertx-stack-docs/4.3.0/vertx-stack-docs-4.3.0-docs.zip'
dest buildDir
}
If you need authentication, please read the section on authentication in the README. Basically, you just have to provide a username
and password
. That's all.
Let me know, if this helps and close the issue if it does. Thanks!
Dear Sir
thx
i can download
now i will try unzip
THX
Great! You may want to have a look at the following example for this:
https://github.com/michel-kraemer/gradle-download-task/blob/master/examples/groovy/unzip/build.gradle
Great! You may want to have a look at the following example for this: https://github.com/michel-kraemer/gradle-download-task/blob/master/examples/groovy/unzip/build.gradle
Dear Sir
thx ,your demo !!
now i have other problem .
i ref your demo
&
to create a demo
https://github.com/CMingTseng/gradle-download-task_qa/blob/master/extra.gradle
can teach me how get extra input paras ?
THX
This question does not seem to be related to gradle-download-task anymore. I would recommend to ask your question on the Gradle discussion board.