apply plugin: 'maven'
// ....
project.version = '1.0' : version
project.group = 'kr.pe.kwonnam.blah' // groupId
// project.name이 artifactId 가 되어줌.
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://your.maven.repository.com/nexus/content/repositories/releases/') {
authentication(userName: '계정명', password: '비밀번호')
}
snapshotRepository(url: 'http://your.maven.repository.com/nexus/content/repositories/snapshot/') {
authentication(userName: '계정명', password: '비밀번호')
}
}
}
}
// 소스와 JavaDoc 배포를 위한 작업
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}