forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Maven publications with Gradle
Prior to this commit, the build would use a custom task to create a BOM and manually include/exclude/customize dependencies. It would also use the "maven" plugin to customize the POM before publication. This commit now uses a Gradle Java Platform for publishing the Spring Framework BOM. We're also now using the "maven-publish" plugin to prepare and customize publications. This commit also tells the artifactory plugin (which is currently applied only on the CI) not to publish internal modules. See spring-projectsgh-23282
- Loading branch information
Showing
7 changed files
with
82 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,23 @@ | ||
description = "Spring Framework (Bill of Materials)" | ||
|
||
apply plugin: "java" | ||
apply plugin: "maven" | ||
apply plugin: 'java-platform' | ||
apply from: "$rootDir/gradle/publications.gradle" | ||
|
||
configurations.archives.artifacts.clear() | ||
artifacts { | ||
// work around GRADLE-2406 by attaching text artifact | ||
archives(file("spring-framework-bom.txt")) | ||
} | ||
group = "org.springframework" | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom.whenConfigured { | ||
packaging = "pom" | ||
withXml { | ||
asNode().children().last() + { | ||
delegate.dependencyManagement { | ||
delegate.dependencies { | ||
parent.moduleProjects.sort { "$it.name" }.each { p -> | ||
if (p != project) { | ||
delegate.dependency { | ||
delegate.groupId(p.group) | ||
delegate.artifactId(p.name) | ||
delegate.version(p.version) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
dependencies { | ||
constraints { | ||
parent.moduleProjects.sort { "$it.name" }.each { | ||
api it | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
springFramework(MavenPublication) { | ||
artifactId = 'spring-framework-bom' | ||
from components.javaPlatform | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apply plugin: "maven-publish" | ||
|
||
publishing { | ||
publications { | ||
springFramework(MavenPublication) { | ||
pom { | ||
name = project.description | ||
description = project.description | ||
url = "https://github.com/spring-projects/spring-framework" | ||
organization { | ||
name = "Spring IO" | ||
url = "https://spring.io/projects/spring-framework" | ||
} | ||
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-framework" | ||
connection = "scm:git:git://github.com/spring-projects/spring-framework" | ||
developerConnection = "scm:git:git://github.com/spring-projects/spring-framework" | ||
} | ||
developers { | ||
developer { | ||
id = "jhoeller" | ||
name = "Juergen Hoeller" | ||
email = "jhoeller@pivotal.io" | ||
} | ||
} | ||
issueManagement { | ||
system = "GitHub" | ||
url = "https://github.com/spring-projects/spring-framework/issues" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters