Skip to content

Commit

Permalink
Add bits to satisfy Sonatype POM validation requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldaley committed Jan 2, 2014
1 parent 8567ae1 commit 07a38c3
Show file tree
Hide file tree
Showing 18 changed files with 98 additions and 48 deletions.
14 changes: 5 additions & 9 deletions gradle/pom.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@
*/

ext {
ext.poms = []
afterEvaluate {
poms*.whenConfigured { pom ->
pomModifications.each {
configure(pom, it)
}
}
}
pomModifications = []
modifyPom = { pomModifications << it }
}

tasks.withType(Upload) {
repositories.withType(org.gradle.api.artifacts.maven.MavenResolver) {
poms << it.pom
it.pom.whenConfigured { pom ->
pomModifications.each {
configure(pom, it)
}
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions ratpack-codahale-metrics/ratpack-codahale-metrics.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Provides integration with the Coda Hale Metrics library - http://metrics.codahale.com/"

apply from: "$rootDir/gradle/javaModule.gradle"

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions ratpack-core/ratpack-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "The core HTTP and composition mechanisms of Ratpack"

apply from: "$rootDir/gradle/javaModule.gradle"

ext.apiLinks = [
Expand Down
2 changes: 2 additions & 0 deletions ratpack-gradle/ratpack-gradle.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Build time Ratpack support with the Gradle build tool - http://gradle.org"

apply plugin: 'groovy'

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions ratpack-groovy-test/ratpack-groovy-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Test time support for Groovy Ratpack apps (or for Groovy based tests)"

apply from: "$rootDir/gradle/groovyModule.gradle"

def restAssuredVersion = "1.8.1"
Expand Down
2 changes: 2 additions & 0 deletions ratpack-groovy/ratpack-groovy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Ratpack integration for the Groovy programmming language - http://groovy-lang.org"

apply from: "$rootDir/gradle/groovyModule.gradle"

ext.apiLinks = [
Expand Down
2 changes: 2 additions & 0 deletions ratpack-guice/ratpack-guice.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Integration with Google Guice for Ratpack applications - https://code.google.com/p/google-guice/"

apply from: "$rootDir/gradle/javaModule.gradle"

ext.apiLinks = [
Expand Down
2 changes: 1 addition & 1 deletion ratpack-h2/ratpack-h2.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/


description = "Integration with the H2 database for Ratpack - http://www.h2database.com/"

apply from: "$rootDir/gradle/javaModule.gradle"

Expand Down
2 changes: 2 additions & 0 deletions ratpack-handlebars/ratpack-handlebars.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

apply from: "$rootDir/gradle/javaModule.gradle"

description = "Support for Handlebars server side template rendering in Ratpack - https://github.com/jknack/handlebars.java"

dependencies {
compile project(":ratpack-guice")
compile ('com.github.jknack:handlebars:1.1.1'){
Expand Down
3 changes: 2 additions & 1 deletion ratpack-jackson/ratpack-jackson.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* limitations under the License.
*/

apply from: "$rootDir/gradle/javaModule.gradle"
description = "Support for JSON via the Jackson marshalling library - http://jackson.codehaus.org/"

apply from: "$rootDir/gradle/javaModule.gradle"

ext.apiLinks = [
"http://fasterxml.github.io/jackson-databind/javadoc/2.2.0"
Expand Down
2 changes: 2 additions & 0 deletions ratpack-manual/ratpack-manual.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "The manual for Ratpack (documentation & API reference)"

apply from: "$rootDir/gradle/javaModule.gradle"
configurations.runtime.artifacts.clear()
configurations.archives.artifacts.clear()
Expand Down
2 changes: 2 additions & 0 deletions ratpack-reactor/ratpack-reactor.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Integration with the Project Reactor library - https://github.com/reactor/reactor"

apply from: "$rootDir/gradle/javaModule.gradle"

repositories {
Expand Down
2 changes: 2 additions & 0 deletions ratpack-remote-test/ratpack-remote-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Test time integration with the Groovy Remote Control library for Ratpack applications - http://groovy.codehaus.org/modules/remote/"

apply from: "$rootDir/gradle/groovyModule.gradle"

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions ratpack-remote/ratpack-remote.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Integration with the Groovy Remote Control library for Ratpack applications - http://groovy.codehaus.org/modules/remote/"

apply from: "$rootDir/gradle/groovyModule.gradle"

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions ratpack-session/ratpack-session.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Support for HTTP sessions for Ratpack applications"

apply from: "$rootDir/gradle/javaModule.gradle"

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions ratpack-test/ratpack-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Test time support for developing Ratpack applications and extensions"

apply from: "$rootDir/gradle/javaModule.gradle"

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions ratpack-thymeleaf/ratpack-thymeleaf.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

description = "Integration with the Thymeleaf server side template rendering library - http://www.thymeleaf.org/"

apply from: "$rootDir/gradle/javaModule.gradle"

dependencies {
Expand Down
99 changes: 62 additions & 37 deletions ratpack.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@ if (jvmEncoding != "UTF-8") {
throw new IllegalStateException("Build environment must be UTF-8 (it is: $jvmEncoding) - add '-Dfile.encoding=UTF-8' to the GRADLE_OPTS environment variable ")
}

apply plugin: 'artifactory'

artifactory {
contextUrl = 'http://oss.jfrog.org'
}
gradle.buildFinished {
// Work around https://www.jfrog.com/jira/browse/GAP-145
[
org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention,
org.jfrog.build.client.ArtifactoryClientConfiguration.BuildInfoHandler,
org.jfrog.build.client.ArtifactoryClientConfiguration.ProxyHandler,
org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
].each {
GroovySystem.metaClassRegistry.removeMetaClass(it)
}
}

artifactoryPublish {
skip true
}
//apply plugin: 'artifactory'
//
//artifactory {
// contextUrl = 'http://oss.jfrog.org'
//}
//gradle.buildFinished {
// // Work around https://www.jfrog.com/jira/browse/GAP-145
// [
// org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention,
// org.jfrog.build.client.ArtifactoryClientConfiguration.BuildInfoHandler,
// org.jfrog.build.client.ArtifactoryClientConfiguration.ProxyHandler,
// org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
// ].each {
// GroovySystem.metaClassRegistry.removeMetaClass(it)
// }
//}
//
//artifactoryPublish {
// skip true
//}

allprojects {
group = "io.ratpack"
Expand Down Expand Up @@ -203,26 +203,29 @@ subprojects {
}

if (project in publishedModules) {
apply plugin: "artifactory"
artifactoryPublish { task ->
rootProject.artifactory {
publish {
repository {
repoKey = isSnapshot ? 'oss-snapshot-local' : 'oss-release-local'
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(task)) {
username = ratpackBintrayUser
password = ratpackBintrayApiKey
}
}
}
}
}
}
// apply plugin: "artifactory"
// artifactoryPublish { task ->
// rootProject.artifactory {
// publish {
// repository {
// repoKey = isSnapshot ? 'oss-snapshot-local' : 'oss-release-local'
// gradle.taskGraph.whenReady { taskGraph ->
// if (taskGraph.hasTask(task)) {
// username = ratpackBintrayUser
// password = ratpackBintrayApiKey
// }
// }
// }
// }
// }
// }

assert description: "Project $project.path is published, must have a description"

modifyPom {
project {
description "A toolkit for JVM web applications"
name project.name
description project.description
url "http://www.ratpack.io"
licenses {
license {
Expand All @@ -236,6 +239,28 @@ subprojects {
developerConnection "scm:[email protected]:ratpack/ratpack.git"
url "https://github.com/ratpack/ratpack"
}
developers {
developer {
id "ratpack"
name "Team Ratpack"
}
}
}
}

uploadArchives { task ->
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(task)) {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeOssUsername, password: sonatypeOssPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: sonatypeOssUsername, password: sonatypeOssPassword)
}
}
}
}
}
}
Expand Down

0 comments on commit 07a38c3

Please sign in to comment.