Skip to content

Instantly share code, notes, and snippets.

@alexcheng1982
Created February 13, 2018 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexcheng1982/12311d50ac0f3f990c1d71b1e27d14df to your computer and use it in GitHub Desktop.
Save alexcheng1982/12311d50ac0f3f990c1d71b1e27d14df to your computer and use it in GitHub Desktop.
Gradle publish to Maven repository
buildscript {
repositories {
mavenCentral()
maven {
url "http://repository.jboss.org/nexus/content/groups/public/"
}
}
dependencies {
classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
}
}
group 'com.mycompany'
version '1.0.0-SNAPSHOT'
apply plugin: 'maven-publish'
apply plugin: 'maven-publish-auth'
repositories {
mavenCentral()
}
dependencies {
testCompile "junit:junit:4.12"
}
publishing {
repositories {
maven {
name "snapshots"
url "http://local.maven"
}
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment