Replace artifactory by standard repository structure
This commit removes the usage of the Artifactory plugin and replaces it with a standard repository structure using the -PdeploymentRepository option. This also updates the generated POM to be current.
This commit is contained in:
15
build.gradle
15
build.gradle
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.1.3' apply false
|
||||
id 'com.jfrog.artifactory' version '5.1.4' apply false
|
||||
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
|
||||
id 'org.asciidoctor.jvm.gems' version '3.3.2'
|
||||
id 'org.asciidoctor.jvm.convert' version '3.3.2'
|
||||
@@ -19,6 +18,7 @@ allprojects {
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
apply plugin: "org.springframework.build.optional-dependencies"
|
||||
apply from: "${rootProject.projectDir}/ide.gradle"
|
||||
apply from: "${rootDir}/gradle/publications.gradle"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
@@ -111,16 +111,19 @@ configure(javaProjects) { javaProject ->
|
||||
from javadoc
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects { subproject ->
|
||||
|
||||
apply from: "${rootDir}/gradle/publish-maven.gradle"
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
apply plugin: "maven-publish"
|
||||
apply plugin: "com.jfrog.artifactory"
|
||||
|
||||
configurations {
|
||||
asciidoctorExtensions
|
||||
@@ -179,7 +178,3 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifactoryPublish {
|
||||
publications(publishing.publications.mavenJava)
|
||||
}
|
||||
70
gradle/publications.gradle
Normal file
70
gradle/publications.gradle
Normal file
@@ -0,0 +1,70 @@
|
||||
apply plugin: "maven-publish"
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
pom {
|
||||
afterEvaluate {
|
||||
name = project.description
|
||||
description = project.description
|
||||
}
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
organization {
|
||||
name = "Spring IO"
|
||||
url = "https://spring.io/projects/spring-webflow"
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name = "Apache License, Version 2.0"
|
||||
url = "https://www.apache.org/licenses/LICENSE-2.0"
|
||||
distribution = "repo"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
connection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
developerConnection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "rstoyanchev"
|
||||
name = "Rossen Stoyanchev"
|
||||
email = "rstoyanchev@vmware.com"
|
||||
}
|
||||
}
|
||||
issueManagement {
|
||||
system = "GitHub"
|
||||
url = "https://github.com/spring-projects/spring-webflow/issues"
|
||||
}
|
||||
}
|
||||
versionMapping {
|
||||
usage('java-api') {
|
||||
fromResolutionResult()
|
||||
}
|
||||
usage('java-runtime') {
|
||||
fromResolutionResult()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configureDeploymentRepository(project)
|
||||
|
||||
void configureDeploymentRepository(Project project) {
|
||||
project.plugins.withType(MavenPublishPlugin.class).all {
|
||||
PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class);
|
||||
if (project.hasProperty("deploymentRepository")) {
|
||||
publishing.repositories.maven {
|
||||
it.url = project.property("deploymentRepository")
|
||||
it.name = "deployment"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Disable generation of Gradle Module Metadata for compatibility
|
||||
// with older versions of Spring Web Flow.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
apply plugin: "maven-publish"
|
||||
apply plugin: "com.jfrog.artifactory"
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
if (project.name != 'spring-js-resources') {
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
}
|
||||
versionMapping {
|
||||
usage('java-api') {
|
||||
fromResolutionOf('compileClasspath')
|
||||
}
|
||||
usage('java-runtime') {
|
||||
fromResolutionResult()
|
||||
}
|
||||
}
|
||||
pom {
|
||||
afterEvaluate {
|
||||
description = project.description
|
||||
name = project.description
|
||||
}
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
organization {
|
||||
name = "Spring IO"
|
||||
url = "https://spring.io/projects/spring-webflow"
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name = "The Apache Software License, Version 2.0"
|
||||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
distribution = "repo"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
connection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
developerConnection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "rstoyanchev"
|
||||
name = "Rossen Stoyanchev"
|
||||
email = "rstoyanchev@vmware.com"
|
||||
}
|
||||
}
|
||||
issueManagement {
|
||||
system = "Jira"
|
||||
url = "https://jira.spring.io/browse/SWF"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifactoryPublish {
|
||||
publications(publishing.publications.mavenJava)
|
||||
}
|
||||
|
||||
// Disable generation of Gradle Module Metadata for compatibility
|
||||
// with older versions of Spring Web Flow.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
||||
@@ -46,3 +46,11 @@ jar {
|
||||
dependsOn prepareResources
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user