update maven upload to also produce javadoc and source jars

This commit is contained in:
kimchy 2010-04-06 11:44:41 +03:00
parent 11e8141069
commit b760ab18b6
2 changed files with 30 additions and 0 deletions

View File

@ -80,6 +80,21 @@ dependencies {
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
}
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
}
uploadArchives {
repositories.mavenDeployer {
// repository(url: "file://localhost/" + rootProject.projectDir.absolutePath + "/build/maven/repository")

View File

@ -87,6 +87,21 @@ dependencies {
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
}
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
}
uploadArchives {
repositories.mavenDeployer {
// repository(url: "file://localhost/" + rootProject.projectDir.absolutePath + "/build/maven/repository")