---
title: "gradle上传jar到nexus"
author: "矮蛋蛋"
date: "2015-07-10T11:29:59Z"
tags: []
categories: ["企业架构"]
slug: "gradle-jar-nexus"
draft: false
lastmod: "2015-07-10T13:24:57Z"
id: 2226169
url: "https://aidandan.iteye.com/blog/2226169"
---

原文地址：<https://docs.gradle.org/current/userguide/maven_plugin.html>
configurations {
    deployerJars
}

dependencies {
    deployerJars "org.apache.maven.wagon:wagon-http:2.2"
}

uploadArchives {
    configuration = configurations.deployerJars
    repositories {
        mavenDeployer {
            repository(url: "http://127.0.0.1:9081/nexus/content/repositories/releases/") {
                authentication(userName: "admin", password: "admin123")
            }
        }
    }
}
I get

aromanov@ws:~/etc/apache-s4-0.6.0$ gradle -i upload