From 5174a8020de387f469e6d5ecdf07b5b78a6de1a0 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 9 Aug 2012 22:44:01 -0500 Subject: [PATCH] SEC-1995: Maven Central validation changes Ensure projects have the following so that Maven Central publishing works - Project name - Project description - Project URL - SCM information - Javadoc jar --- gradle/javaprojects.gradle | 38 ++++++++++++++++++++++++++++++++++ gradle/maven-deployment.gradle | 17 +++++++++++++-- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/gradle/javaprojects.gradle b/gradle/javaprojects.gradle index 11e5a1418a..7e963581b5 100644 --- a/gradle/javaprojects.gradle +++ b/gradle/javaprojects.gradle @@ -106,3 +106,41 @@ def guessMaxForks() { return Math.max(2, (int) (processors / 2)) } +javadoc { + title = "Spring Security $version API" + source = sourceSets.main.allJava + classpath += configurations.compileOnly + configurations.provided + options { + memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED + author = true + header = project.name + outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET + links = [ + "http://static.springframework.org/spring/docs/3.0.x/javadoc-api", + "http://static.springsource.org/spring-ldap/docs/1.3.x/apidocs/", + "http://download.oracle.com/javase/6/docs/api/" + ] + groups = [ + 'Spring Security Core':[ + 'org.springframework.security.core*', + 'org.springframework.security.authentication*', + 'org.springframework.security.access*', + 'org.springframework.security.remoting*', + 'org.springframework.security.provisioning*', + 'org.springframework.security.util*'], + 'Spring Security Web':['org.springframework.security.web*'], + 'Spring Security LDAP':['org.springframework.security.ldap*'], + 'Spring Security Crypto':['org.springframework.security.crypto*'], + 'Spring Security OpenID':['org.springframework.security.openid*'], + 'Spring Security CAS':['org.springframework.security.cas*'], + 'Spring Security ACL':['org.springframework.security.acls*'], + 'Spring Security Config':['org.springframework.security.config*'], + 'Spring Security Taglibs':['org.springframework.security.taglibs*'], + ] + } +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} diff --git a/gradle/maven-deployment.gradle b/gradle/maven-deployment.gradle index 164de7a38e..79822c3cac 100644 --- a/gradle/maven-deployment.gradle +++ b/gradle/maven-deployment.gradle @@ -9,6 +9,7 @@ task sourceJar(type: Jar) { artifacts { archives sourceJar + archives javadocJar } // Configuration for SpringSource s3 maven deployer @@ -26,10 +27,10 @@ configurations.default.extendsFrom = [configurations.runtime] as Set artifacts { 'default' jar } install { - customizePom(repositories.mavenInstaller.pom) + customizePom(repositories.mavenInstaller.pom, project) } -def customizePom(pom) { +def customizePom(pom, gradleProject) { def optionalDeps = ['ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk', 'aspectjrt', 'aspectjweaver'] pom.scopeMappings.addMapping(10, configurations.provided, 'provided') @@ -58,6 +59,13 @@ def customizePom(pom) { } pom.project { + name = gradleProject.name + description = gradleProject.name + url = 'http://springsource.org/spring-security' + organization { + name = 'SpringSource' + url = 'http://springsource.org/' + } licenses { license { name 'The Apache Software License, Version 2.0' @@ -65,6 +73,11 @@ def customizePom(pom) { distribution 'repo' } } + scm { + url = 'https://github.com/SpringSource/spring-security' + connection = 'scm:git:git://github.com/SpringSource/spring-security' + developerConnection = 'scm:git:git://github.com/SpringSource/spring-security' + } dependencies { dependency { artifactId = groupId = 'commons-logging'