Is this the easiest way of interacting with maven repositories?


(thirsch81) #1

Hi,

When introducing Gradle to other people, often the first question that gets asked what would be the easiest way to push to a maven repository.

I tried to produce the simplest script that would let you pull and push single files (or rather artifacts). I also wanted to do it without the java plugin, so “no components.java”. Here’s the result, please let me know if there was an even shorter way (i.e. without the AbstractArchiveTask)


(Peter Niederwieser) #2

You can omit the ‘artifactToUpload’ configuration and ‘artifacts’ block. If the file to be uploaded already exists, you can also omit the ‘createArtifact’ task. Note that ‘into “archive.zip”’ will create a directory with that name inside the Zip, which is probably not what you want.


(thirsch81) #3

Thanks again! Updated it accordingly!