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
This commit is contained in:
Rob Winch 2012-08-09 22:44:01 -05:00
parent 8ad0e0e8e8
commit 5174a8020d
2 changed files with 53 additions and 2 deletions

View File

@ -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
}

View File

@ -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'