-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e995596
commit 5566f82
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/integTest/groovy/nebula/plugin/resolutionrules/CodehausJacksonSpec.groovy
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,32 @@ | ||
package nebula.plugin.resolutionrules | ||
|
||
import org.gradle.testkit.runner.BuildResult | ||
|
||
class CodehausJacksonSpec extends RulesBaseSpecification { | ||
def setup() { | ||
def ruleFile = new File(getClass().getResource('/codehaus-jackson.json').toURI()) | ||
buildFile << """\ | ||
dependencies { | ||
resolutionRules files('${ruleFile.absolutePath}') | ||
} | ||
""".stripIndent() | ||
} | ||
|
||
def 'duplicates are replaced and aligned'() { | ||
given: | ||
buildFile << """\ | ||
dependencies { | ||
implementation "org.codehaus.jackson:jackson-core-lgpl:1.9.13" | ||
implementation "org.codehaus.jackson:jackson-core-asl:1.9.13" | ||
implementation "org.codehaus.jackson:jackson-mapper-asl:1.9.12" | ||
} | ||
""".stripIndent() | ||
|
||
when: | ||
BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') | ||
|
||
then: | ||
result.output.contains "org.codehaus.jackson:jackson-core-lgpl:1.9.13 -> org.codehaus.jackson:jackson-core-asl:1.9.13" | ||
result.output.contains "org.codehaus.jackson:jackson-mapper-asl:1.9.12 -> 1.9.13" | ||
} | ||
} |
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,35 @@ | ||
{ | ||
"align": [ | ||
{ | ||
"group": "org\\.codehaus\\.jackson", | ||
"excludes": [ | ||
"jackson-asl", | ||
"jackson-lgpl" | ||
], | ||
"includes": [], | ||
"reason": "Align Jackson 1.x", | ||
"author": "Danny Thomas <dannyt@netflix.com>", | ||
"date": "2022-05-26" | ||
} | ||
], | ||
"replace": [ | ||
{ | ||
"module": "org.codehaus.jackson:jackson-core-lgpl", | ||
"with": "org.codehaus.jackson:jackson-core-asl", | ||
"reason": "Avoid Jackson 1.x classpath duplication", | ||
"author": "Danny Thomas <dannyt@netflix.com>", | ||
"date": "2022-05-26" | ||
}, | ||
{ | ||
"module": "org.codehaus.jackson:jackson-mapper-lgpl", | ||
"with": "org.codehaus.jackson:jackson-mapper-asl", | ||
"reason": "Avoid Jackson 1.x classpath duplication", | ||
"author": "Danny Thomas <dannyt@netflix.com>", | ||
"date": "2022-05-26" | ||
} | ||
], | ||
"substitute": [], | ||
"deny": [], | ||
"exclude": [], | ||
"reject": [] | ||
} |