Skip to content

Instantly share code, notes, and snippets.

@mylesjao
Last active August 29, 2015 14:01
Show Gist options
  • Save mylesjao/11637f54c076c320145e to your computer and use it in GitHub Desktop.
Save mylesjao/11637f54c076c320145e to your computer and use it in GitHub Desktop.
publish to maven proxy repository by gradle
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
//release repository for version with no suffix '-SNAPSHOT'
repository(url: "http://x.x.x.x/nexus/content/repositories/releases") {
authentication(userName: "name", password: "passwd")
}
//snapshot repository for version with suffix '-SNAPSHOT'
snapshotRepository(url: "http://x.x.x.x/nexus/content/repositories/snapshots"){
authentication(userName: "name", password: "passwd")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment