Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/main/resources/META-INF/rewrite/java-version-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,19 @@ recipeList:
newGroupId: jakarta.xml.ws
newArtifactId: jakarta.xml.ws-api
newVersion: 2.3.x
# Add the jakarta JAXB artifact if it is missing but a project uses types in java.xml.bind
# Add the jakarta JAXB artifact if it is missing but a project uses types in either javax.jws or javax.xml.ws
- org.openrewrite.java.dependencies.AddDependency:
groupId: jakarta.xml.ws
artifactId: jakarta.xml.ws-api
version: 2.3.x
onlyIfUsing: javax.jws..*
acceptTransitive: true
- org.openrewrite.java.dependencies.AddDependency:
groupId: jakarta.xml.ws
artifactId: jakarta.xml.ws-api
version: 2.3.x
onlyIfUsing: javax.xml.ws..*
acceptTransitive: true
# If a project already had the jakarta api, make sure it is at the latest version.
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: jakarta.xml.ws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.openrewrite.java.migrate.javax;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.openrewrite.config.Environment;
import org.openrewrite.test.RecipeSpec;
Expand All @@ -29,7 +28,6 @@
import static org.openrewrite.gradle.toolingapi.Assertions.withToolingApi;
import static org.openrewrite.maven.Assertions.pomXml;

@Disabled
class AddJaxwsDependenciesTest implements RewriteTest {

@Override
Expand Down Expand Up @@ -173,13 +171,11 @@ void removeReferenceImplementationRuntime() {
}

dependencies {
compileOnly "com.sun.xml.ws:jaxws-rt:%s"
implementation "com.sun.xml.ws:jaxws-rt:%s"

implementation "jakarta.xml.ws:jakarta.xml.ws-api:%s"

testImplementation "com.sun.xml.ws:jaxws-rt:%s"
}
""".formatted(rtVersion, wsApiVersion, rtVersion);
""".formatted(rtVersion, wsApiVersion);
})
),
pomXml(
Expand Down Expand Up @@ -276,13 +272,11 @@ void renameAndUpdateApiAndRuntime() {
}

dependencies {
compileOnly "com.sun.xml.ws:jaxws-rt:%s"
implementation "com.sun.xml.ws:jaxws-rt:%s"

implementation "jakarta.xml.ws:jakarta.xml.ws-api:%s"

testImplementation "com.sun.xml.ws:jaxws-rt:%s"
}
""".formatted(rtVersion, wsApiVersion, rtVersion);
""".formatted(rtVersion, wsApiVersion);
})
),
pomXml(
Expand Down