-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #355 from rupertwaldron
* gh-355: Polish "Remove side-effect on bom ordering when configuring pom's dep mgmt" Remove side-effect on bom ordering when configuring pom's dep mgmt Closes gh-355
- Loading branch information
Showing
4 changed files
with
57 additions
and
8 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
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
40 changes: 40 additions & 0 deletions
40
...cymanagement/DMPIT/bomImportOrderIsReflectedInManagedVersionsWhenThePomIsPublished.gradle
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 @@ | ||
plugins { | ||
id "io.spring.dependency-management" | ||
id "java" | ||
id 'maven-publish' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencyManagement { | ||
imports { | ||
mavenBom 'org.springframework.boot:spring-boot-dependencies:1.2.7.RELEASE' | ||
mavenBom 'io.spring.platform:platform-bom:2.0.0.RELEASE' | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId = 'group-id' | ||
artifactId = 'dep-management' | ||
version = '1.0' | ||
|
||
from components.java | ||
} | ||
} | ||
} | ||
|
||
|
||
task managedVersionsAfterPublishPom { | ||
dependsOn generatePomFileForMavenPublication | ||
doFirst { | ||
def output = new File("${buildDir}/managed-versions.txt") | ||
output.parentFile.mkdirs() | ||
dependencyManagement.managedVersions.each { key, value -> | ||
output << "${key} -> ${value}\n" | ||
} | ||
} | ||
} |