spring-security/gradle/maven-deployment.gradle

141 lines
3.4 KiB
Groovy
Raw Permalink Normal View History

2010-03-28 23:54:41 +01:00
apply plugin: 'maven'
// Create a source jar for uploading
task sourceJar(type: Jar) {
2015-03-23 11:14:26 -05:00
classifier = 'sources'
from sourceSets.main.java.srcDirs
include '**/*.java', '**/*.aj'
}
artifacts {
2015-03-23 11:14:26 -05:00
archives sourceJar
}
// Configuration for SpringSource s3 maven deployer
configurations {
2015-03-23 11:14:26 -05:00
deployerJars
}
dependencies {
2015-03-23 11:14:26 -05:00
deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
}
install {
2015-03-23 11:14:26 -05:00
repositories.mavenInstaller {
customizePom(pom, project)
}
}
2020-02-05 22:24:24 -06:00
uploadArchives {
repositories.mavenDeployer {
customizePom(pom, project)
}
}
def customizePom(pom, gradleProject) {
2015-03-23 11:14:26 -05:00
pom.whenConfigured { p ->
p.dependencies.findAll{ it.scope == "optional" }.each {
it.scope = "compile"
it.optional = true
}
p.dependencies.findAll{ it.groupId == "org.springframework" }.each {
it.version = null
}
2015-03-23 11:14:26 -05:00
// sort to make pom dependencies order consistent to ease comparison of older poms
p.dependencies = p.dependencies.sort { dep ->
"$dep.scope:$dep.optional:$dep.groupId:$dep.artifactId"
}
}
def isWar = project.hasProperty('war')
pom.project {
name = gradleProject.name
if(isWar) {
packaging = "war"
}
description = gradleProject.name
Polish URLs We have performed some polish on your URLs. We do not follow redirects to avoid expanding intentionally shorter URLs (i.e. URL shortened URLs) # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request, so we migrated them. Your review is recommended. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://repo.terracotta.org/maven2/ | https://repo.terracotta.org/maven2/ | HttpResponse(httpStatus = 403 FORBIDDEN) | HttpResponse(httpStatus = 403 FORBIDDEN) | 1 | ## Fixed Success These URLs were fixed successfully. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | https://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | HttpResponse(httpStatus = 200 OK) | null | 2 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api | https://docs.spring.io/spring/docs/3.2.x/javadoc-api | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = http://docs.spring.io/spring/docs/3.2.x/javadoc-api/) | null | 1 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | https://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | HttpResponse(httpStatus = 200 OK) | null | 1 | | http://download.oracle.com/javase/6/docs/api/ | https://download.oracle.com/javase/6/docs/api/ | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://docs.oracle.com/javase/6/docs/api/) | null | 2 | | http://spring.io/ | https://spring.io/ | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://spring.io/spring-security | https://spring.io/spring-security | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://projects.spring.io/spring-security) | null | 53 | | http://www.apache.org/licenses/LICENSE-2.0.txt | https://www.apache.org/licenses/LICENSE-2.0.txt | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://forums.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property) | 1 | | http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided) | 1 | # Ignored These URLs were intentionally ignored so we didn't migrate them. | HTTP URL | | --- | | http://maven.apache.org/POM/4.0.0 | | http://maven.apache.org/xsd/maven-4.0.0.xsd | | http://www.w3.org/2001/XMLSchema-instance |
2019-03-01 15:38:32 -06:00
url = 'https://spring.io/spring-security'
2015-03-23 11:14:26 -05:00
organization {
name = 'spring.io'
Polish URLs We have performed some polish on your URLs. We do not follow redirects to avoid expanding intentionally shorter URLs (i.e. URL shortened URLs) # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request, so we migrated them. Your review is recommended. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://repo.terracotta.org/maven2/ | https://repo.terracotta.org/maven2/ | HttpResponse(httpStatus = 403 FORBIDDEN) | HttpResponse(httpStatus = 403 FORBIDDEN) | 1 | ## Fixed Success These URLs were fixed successfully. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | https://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | HttpResponse(httpStatus = 200 OK) | null | 2 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api | https://docs.spring.io/spring/docs/3.2.x/javadoc-api | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = http://docs.spring.io/spring/docs/3.2.x/javadoc-api/) | null | 1 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | https://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | HttpResponse(httpStatus = 200 OK) | null | 1 | | http://download.oracle.com/javase/6/docs/api/ | https://download.oracle.com/javase/6/docs/api/ | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://docs.oracle.com/javase/6/docs/api/) | null | 2 | | http://spring.io/ | https://spring.io/ | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://spring.io/spring-security | https://spring.io/spring-security | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://projects.spring.io/spring-security) | null | 53 | | http://www.apache.org/licenses/LICENSE-2.0.txt | https://www.apache.org/licenses/LICENSE-2.0.txt | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://forums.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property) | 1 | | http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided) | 1 | # Ignored These URLs were intentionally ignored so we didn't migrate them. | HTTP URL | | --- | | http://maven.apache.org/POM/4.0.0 | | http://maven.apache.org/xsd/maven-4.0.0.xsd | | http://www.w3.org/2001/XMLSchema-instance |
2019-03-01 15:38:32 -06:00
url = 'https://spring.io/'
2015-03-23 11:14:26 -05:00
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
Polish URLs We have performed some polish on your URLs. We do not follow redirects to avoid expanding intentionally shorter URLs (i.e. URL shortened URLs) # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request, so we migrated them. Your review is recommended. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://repo.terracotta.org/maven2/ | https://repo.terracotta.org/maven2/ | HttpResponse(httpStatus = 403 FORBIDDEN) | HttpResponse(httpStatus = 403 FORBIDDEN) | 1 | ## Fixed Success These URLs were fixed successfully. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | https://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | HttpResponse(httpStatus = 200 OK) | null | 2 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api | https://docs.spring.io/spring/docs/3.2.x/javadoc-api | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = http://docs.spring.io/spring/docs/3.2.x/javadoc-api/) | null | 1 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | https://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | HttpResponse(httpStatus = 200 OK) | null | 1 | | http://download.oracle.com/javase/6/docs/api/ | https://download.oracle.com/javase/6/docs/api/ | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://docs.oracle.com/javase/6/docs/api/) | null | 2 | | http://spring.io/ | https://spring.io/ | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://spring.io/spring-security | https://spring.io/spring-security | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://projects.spring.io/spring-security) | null | 53 | | http://www.apache.org/licenses/LICENSE-2.0.txt | https://www.apache.org/licenses/LICENSE-2.0.txt | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://forums.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property) | 1 | | http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided) | 1 | # Ignored These URLs were intentionally ignored so we didn't migrate them. | HTTP URL | | --- | | http://maven.apache.org/POM/4.0.0 | | http://maven.apache.org/xsd/maven-4.0.0.xsd | | http://www.w3.org/2001/XMLSchema-instance |
2019-03-01 15:38:32 -06:00
url 'https://www.apache.org/licenses/LICENSE-2.0.txt'
2015-03-23 11:14:26 -05:00
distribution 'repo'
}
}
scm {
url = 'https://github.com/spring-projects/spring-security'
connection = 'scm:git:git://github.com/spring-projects/spring-security'
developerConnection = 'scm:git:git://github.com/spring-projects/spring-security'
}
developers {
developer {
id = 'rwinch'
name = 'Rob Winch'
email = 'rwinch@gopivotal.com'
}
}
// Exclude spring-framework-bom for sample Boot projects since spring-boot-starter-parent imports spring-framework-bom
2015-03-23 11:14:26 -05:00
if(isWar) {
properties {
'm2eclipse.wtp.contextRoot' '/' + project.war.baseName
}
}
if(project.snapshotBuild) {
repositories {
repository {
2015-09-25 15:29:04 -05:00
id 'spring-snapshot'
2015-03-23 11:14:26 -05:00
url 'https://repo.spring.io/snapshot'
}
}
} else if(!project.releaseBuild) {
repositories {
repository {
id 'spring-milestone'
url 'https://repo.spring.io/milestone'
}
}
}
}
2014-12-08 13:18:45 -06:00
Polish URLs We have performed some polish on your URLs. We do not follow redirects to avoid expanding intentionally shorter URLs (i.e. URL shortened URLs) # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request, so we migrated them. Your review is recommended. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://repo.terracotta.org/maven2/ | https://repo.terracotta.org/maven2/ | HttpResponse(httpStatus = 403 FORBIDDEN) | HttpResponse(httpStatus = 403 FORBIDDEN) | 1 | ## Fixed Success These URLs were fixed successfully. | HTTP URL | Result URL | HTTPS Result | HTTP Result | Count | | --- | --- | --- | --- | --- | | http://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | https://docs.spring.io/spring-ldap/docs/1.3.x/apidocs/ | HttpResponse(httpStatus = 200 OK) | null | 2 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api | https://docs.spring.io/spring/docs/3.2.x/javadoc-api | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = http://docs.spring.io/spring/docs/3.2.x/javadoc-api/) | null | 1 | | http://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | https://docs.spring.io/spring/docs/3.2.x/javadoc-api/ | HttpResponse(httpStatus = 200 OK) | null | 1 | | http://download.oracle.com/javase/6/docs/api/ | https://download.oracle.com/javase/6/docs/api/ | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://docs.oracle.com/javase/6/docs/api/) | null | 2 | | http://spring.io/ | https://spring.io/ | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://spring.io/spring-security | https://spring.io/spring-security | HttpResponse(httpStatus = 302 FOUND redirectUrl = https://projects.spring.io/spring-security) | null | 53 | | http://www.apache.org/licenses/LICENSE-2.0.txt | https://www.apache.org/licenses/LICENSE-2.0.txt | HttpResponse(httpStatus = 200 OK) | null | 53 | | http://forums.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property) | 1 | | http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided | HttpResponse(httpStatus = 404 NOT_FOUND) | HttpResponse(httpStatus = 301 MOVED_PERMANENTLY redirectUrl = https://discuss.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided) | 1 | # Ignored These URLs were intentionally ignored so we didn't migrate them. | HTTP URL | | --- | | http://maven.apache.org/POM/4.0.0 | | http://maven.apache.org/xsd/maven-4.0.0.xsd | | http://www.w3.org/2001/XMLSchema-instance |
2019-03-01 15:38:32 -06:00
// https://discuss.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property
2015-03-23 11:14:26 -05:00
pom.withXml {
def plugins = asNode().appendNode('build').appendNode('plugins')
plugins
.appendNode('plugin')
.appendNode('artifactId','maven-compiler-plugin').parent()
.appendNode('configuration')
.appendNode('source','1.7').parent()
.appendNode('target','1.7')
if(isWar) {
plugins
.appendNode('plugin')
.appendNode('artifactId','maven-war-plugin').parent()
.appendNode('version','2.3').parent()
.appendNode('configuration')
.appendNode('failOnMissingWebXml','false')
}
}
}
task generatePom {
2015-03-23 11:14:26 -05:00
group = 'Build'
description = 'Generates a Maven pom.xml'
2015-03-23 11:14:26 -05:00
ext.generatedPomFileName = "pom.xml"
onlyIf { install.enabled }
2015-03-23 11:14:26 -05:00
inputs.files(fileTree(project.rootProject.rootDir).include("**/*.gradle").files)
inputs.files(new File(project.rootProject.rootDir, Project.GRADLE_PROPERTIES))
outputs.files(generatedPomFileName)
2015-03-23 11:14:26 -05:00
doLast() {
def p = pom {}
customizePom(p, project)
p.writeTo(generatedPomFileName)
}
2013-07-15 22:13:15 -05:00
}
build.dependsOn generatePom