Andre's Blog

20160216 How To Upload Third-Party-Artifacts to Nexus Using Gradle


Add this to the script for uploading artifacts you did not build with gradle.

It will create a task uploadArchives which will upload your artifact to the releases repository in your local nexus.

FYI: You will most likely only upload every tool version once, so better adapt this script to take artifact, version and so on as project properties, so you can pass them as command-line arguments!

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "") {
                authentication(userName: "username", password: "password")
            pom.version = 'version'
            pom.artifactId = 'artifact'

    archives file: file('')

Select where to go ...

The Blog
My Technical Blogs
Blogs Of Friends