-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In 3d05983, the fix for gh-310, an attempt was made to prevent dependencies in a transitive platform dependency from stoping exclusions from being applied correctly. Unfortunately, it went to far which led to a dependency's parent pom being excluded. This could cause resolution failures if that parent contained dependency management that was required for the child's dependencies to resolve correctly. This commit reworks that changes so that the platform dependency itself is added to the included nodes but to then stop processing. This prevents the platform dependency itself from being excluded but ensures that any of its dependencies due not influence the application of exclusions. Fixes gh-360
- Loading branch information
1 parent
19e3971
commit cf49bef
Showing
7 changed files
with
109 additions
and
14 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
24 changes: 24 additions & 0 deletions
24
...DMPIT/resolutionSucceedsWhenDependencyReliesOnDependencyManagementFromItsAncestors.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,24 @@ | ||
plugins { | ||
id "java" | ||
id "io.spring.dependency-management" | ||
} | ||
|
||
repositories { | ||
maven { | ||
url file("maven-repo") | ||
} | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("test:dependency-management-child:1.0"); | ||
} | ||
|
||
tasks.register("resolve") { | ||
doFirst { | ||
def files = project.configurations.compileClasspath.resolve() | ||
def output = new File("${buildDir}/resolved.txt") | ||
output.parentFile.mkdirs() | ||
files.collect { it.name }.each { output << "${it}\n" } | ||
} | ||
} |
Empty file.
23 changes: 23 additions & 0 deletions
23
...urces/maven-repo/test/dependency-management-child/1.0/dependency-management-child-1.0.pom
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>test</groupId> | ||
<artifactId>dependency-management-parent</artifactId> | ||
<version>1.0</version> | ||
<relativePath></relativePath> | ||
</parent> | ||
|
||
<artifactId>dependency-management-child</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
22 changes: 22 additions & 0 deletions
22
...repo/test/dependency-management-grandparent/1.0/dependency-management-grandparent-1.0.pom
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,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>test</groupId> | ||
<artifactId>dependency-management-grandparent</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
<version>5.3.27</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
|
||
</project> |
16 changes: 16 additions & 0 deletions
16
...ces/maven-repo/test/dependency-management-parent/1.0/dependency-management-parent-1.0.pom
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>test</groupId> | ||
<artifactId>dependency-management-grandparent</artifactId> | ||
<version>1.0</version> | ||
<relativePath></relativePath> | ||
</parent> | ||
|
||
<artifactId>dependency-management-parent</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
</project> |