Skip to content

Commit 5174a80

Browse files
committed
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
1 parent 8ad0e0e commit 5174a80

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

gradle/javaprojects.gradle

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,41 @@ def guessMaxForks() {
106106
return Math.max(2, (int) (processors / 2))
107107
}
108108

109+
javadoc {
110+
title = "Spring Security $version API"
111+
source = sourceSets.main.allJava
112+
classpath += configurations.compileOnly + configurations.provided
113+
options {
114+
memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
115+
author = true
116+
header = project.name
117+
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
118+
links = [
119+
"http://static.springframework.org/spring/docs/3.0.x/javadoc-api",
120+
"http://static.springsource.org/spring-ldap/docs/1.3.x/apidocs/",
121+
"http://download.oracle.com/javase/6/docs/api/"
122+
]
123+
groups = [
124+
'Spring Security Core':[
125+
'org.springframework.security.core*',
126+
'org.springframework.security.authentication*',
127+
'org.springframework.security.access*',
128+
'org.springframework.security.remoting*',
129+
'org.springframework.security.provisioning*',
130+
'org.springframework.security.util*'],
131+
'Spring Security Web':['org.springframework.security.web*'],
132+
'Spring Security LDAP':['org.springframework.security.ldap*'],
133+
'Spring Security Crypto':['org.springframework.security.crypto*'],
134+
'Spring Security OpenID':['org.springframework.security.openid*'],
135+
'Spring Security CAS':['org.springframework.security.cas*'],
136+
'Spring Security ACL':['org.springframework.security.acls*'],
137+
'Spring Security Config':['org.springframework.security.config*'],
138+
'Spring Security Taglibs':['org.springframework.security.taglibs*'],
139+
]
140+
}
141+
}
142+
143+
task javadocJar(type: Jar) {
144+
classifier = 'javadoc'
145+
from javadoc
146+
}

gradle/maven-deployment.gradle

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ task sourceJar(type: Jar) {
99

1010
artifacts {
1111
archives sourceJar
12+
archives javadocJar
1213
}
1314

1415
// Configuration for SpringSource s3 maven deployer
@@ -26,10 +27,10 @@ configurations.default.extendsFrom = [configurations.runtime] as Set
2627
artifacts { 'default' jar }
2728

2829
install {
29-
customizePom(repositories.mavenInstaller.pom)
30+
customizePom(repositories.mavenInstaller.pom, project)
3031
}
3132

32-
def customizePom(pom) {
33+
def customizePom(pom, gradleProject) {
3334
def optionalDeps = ['ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk', 'aspectjrt', 'aspectjweaver']
3435

3536
pom.scopeMappings.addMapping(10, configurations.provided, 'provided')
@@ -58,13 +59,25 @@ def customizePom(pom) {
5859
}
5960

6061
pom.project {
62+
name = gradleProject.name
63+
description = gradleProject.name
64+
url = 'http://springsource.org/spring-security'
65+
organization {
66+
name = 'SpringSource'
67+
url = 'http://springsource.org/'
68+
}
6169
licenses {
6270
license {
6371
name 'The Apache Software License, Version 2.0'
6472
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
6573
distribution 'repo'
6674
}
6775
}
76+
scm {
77+
url = 'https://github.com/SpringSource/spring-security'
78+
connection = 'scm:git:git://github.com/SpringSource/spring-security'
79+
developerConnection = 'scm:git:git://github.com/SpringSource/spring-security'
80+
}
6881
dependencies {
6982
dependency {
7083
artifactId = groupId = 'commons-logging'

0 commit comments

Comments
 (0)