Skip to content

Commit 5adb91d

Browse files
cjobinabocjobinab
andauthored
Update module provided recipes (#726)
* Update Module provided recipes to use the provided scope * added gradle config support --------- Co-authored-by: cjobinab <[email protected]>
1 parent 866b433 commit 5adb91d

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

src/main/resources/META-INF/rewrite/ibm-java.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ recipeList:
128128
groupId: javax.xml.ws
129129
artifactId: jaxws-api
130130
newScope: provided
131+
- org.openrewrite.gradle.ChangeDependencyConfiguration:
132+
groupId: javax.xml.ws
133+
artifactId: jaxws-api
134+
newConfiguration: compileOnly
131135
---
132136
type: specs.openrewrite.org/v1beta/recipe
133137
name: org.openrewrite.java.migrate.RemovedJaxBModuleProvided
@@ -143,7 +147,15 @@ recipeList:
143147
groupId: javax.xml.bind
144148
artifactId: jaxb-api
145149
newScope: provided
150+
- org.openrewrite.gradle.ChangeDependencyConfiguration:
151+
groupId: javax.xml.bind
152+
artifactId: jaxb-api
153+
newConfiguration: compileOnly
146154
- org.openrewrite.maven.ChangeDependencyScope:
147155
groupId: javax.activation
148156
artifactId: activation
149157
newScope: provided
158+
- org.openrewrite.gradle.ChangeDependencyConfiguration:
159+
groupId: javax.activation
160+
artifactId: activation
161+
newConfiguration: compileOnly

src/test/java/org/openrewrite/java/migrate/IBMSemeruTest.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,17 @@ void gradleDependencyXMLWSModuleExclusion() {
431431
dependencies {
432432
implementation("javax.xml.ws:jaxws-api:2.0")
433433
}
434+
""",
435+
"""
436+
plugins {
437+
id 'java-library'
438+
}
439+
repositories {
440+
mavenCentral()
441+
}
442+
dependencies {
443+
compileOnly("javax.xml.ws:jaxws-api:2.0")
444+
}
434445
"""
435446
)
436447
);
@@ -533,6 +544,18 @@ void gradleDependencyXMLJaxBModuleExclusion() {
533544
implementation("javax.xml.bind:jaxb-api:2.3.1")
534545
implementation("javax.activation:activation:1.1.1")
535546
}
547+
""",
548+
"""
549+
plugins {
550+
id 'java-library'
551+
}
552+
repositories {
553+
mavenCentral()
554+
}
555+
dependencies {
556+
compileOnly("javax.xml.bind:jaxb-api:2.3.1")
557+
compileOnly("javax.activation:activation:1.1.1")
558+
}
536559
"""
537560
)
538561
);

0 commit comments

Comments
 (0)