Skip to content

Commit fc359ed

Browse files
authored
Merge branch 'main' into patch-2
2 parents d4f4fd5 + d802221 commit fc359ed

File tree

10 files changed

+11
-105
lines changed

10 files changed

+11
-105
lines changed

.sdkmanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
java=21.0.7-tem
3+
java=21.0.8-tem

gradle/wrapper/gradle-wrapper.jar

176 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
3+
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fi
202202

203203

204204
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
205-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
205+
DEFAULT_JVM_OPTS=
206206

207207
# Collect all arguments for the java command:
208208
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,

gradlew.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ set APP_HOME=%DIRNAME%
3636
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
3737

3838
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
39+
set DEFAULT_JVM_OPTS=
4040

4141
@rem Find java.exe
4242
if defined JAVA_HOME goto findJavaFromJavaHome

src/main/resources/META-INF/rewrite/add-common-annotations-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ recipeList:
3333
newGroupId: jakarta.annotation
3434
newArtifactId: jakarta.annotation-api
3535
newVersion: 1.3.x
36-
# set explicitly even if managed, as higher versions do not have the javax namespace
36+
# Set explicitly even if managed, as higher versions do not have the javax namespace
3737
overrideManagedVersion: true
3838
changeManagedDependency: false
3939
# Jakarta EE recommends `provided` scope

src/main/resources/META-INF/rewrite/java-version-11.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ recipeList:
140140
newVersion: 2.3.x
141141
# Add the jakarta JAXB artifact if it is missing but a project uses types in either javax.jws or javax.xml.ws
142142
- org.openrewrite.java.dependencies.AddDependency:
143-
groupId: jakarta.xml.ws
144-
artifactId: jakarta.xml.ws-api
145-
version: 2.3.x
143+
groupId: jakarta.jws
144+
artifactId: jakarta.jws-api
145+
version: 2.1.x
146146
onlyIfUsing: javax.jws..*
147147
acceptTransitive: true
148148
- org.openrewrite.java.dependencies.AddDependency:

src/main/resources/META-INF/rewrite/java-version-17.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ recipeList:
7272
artifactId: mapstruct*
7373
newVersion: 1.6.x
7474
- org.openrewrite.java.migrate.AddLombokMapstructBinding
75-
- org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfForJavax
76-
- org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfExistsForJakarta
7775

7876
---
7977
type: specs.openrewrite.org/v1beta/recipe
@@ -338,28 +336,4 @@ recipeList:
338336
groupId: org.projectlombok
339337
artifactId: lombok-mapstruct-binding
340338
version: 0.2.0
341-
---
342-
# The scanning phase comes before the editing phase, therefor we check if a javax.annotation dependency is on the classpath (with whatever version)
343-
type: specs.openrewrite.org/v1beta/recipe
344-
name: org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfForJavax
345-
displayName: Update `jakarta.annotation-api` dependency if it exists
346-
description: Counteract the `jakarta.annotation-api` by updating to `jakarta` namespace
347-
preconditions:
348-
- org.openrewrite.java.dependencies.search.ModuleHasDependency:
349-
groupIdPattern: javax.annotation
350-
artifactIdPattern: javax.annotation-api
351-
recipeList:
352-
- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation
353339

354-
---
355-
type: specs.openrewrite.org/v1beta/recipe
356-
name: org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfExistsForJakarta
357-
displayName: Update `jakarta.annotation-api` dependency if it exists
358-
description: Counteract the `jakarta.annotation-api` by updating to `jakarta` namespace
359-
preconditions:
360-
- org.openrewrite.java.dependencies.search.ModuleHasDependency:
361-
groupIdPattern: jakarta.annotation
362-
artifactIdPattern: jakarta.annotation-api
363-
version: 1.3.x
364-
recipeList:
365-
- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation

src/main/resources/META-INF/rewrite/java-version-8.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ tags:
2525
- java8
2626
recipeList:
2727
- org.openrewrite.java.migrate.UpgradeToJava7
28+
- org.openrewrite.java.migrate.UpgradeJavaVersion:
29+
version: 8
2830
- org.openrewrite.java.migrate.MXBeanRule
2931
- org.openrewrite.java.migrate.BounceCastleFromJdk15OntoJdk18On
3032
- org.openrewrite.java.RemoveMethodInvocations:

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

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -504,76 +504,6 @@ void test() throws Exception {
504504
);
505505
}
506506

507-
@Issue("https://github.com/openrewrite/rewrite-migrate-java/pull/816")
508-
@Test
509-
void javaxAnnotationApiToJakarta() {
510-
rewriteRun(
511-
spec -> spec.parser(JavaParser.fromJavaVersion().classpathFromResources(new InMemoryExecutionContext(), "javax.annotation-api-1.3.2")),
512-
version(
513-
mavenProject("project",
514-
//language=xml
515-
pomXml(
516-
"""
517-
<project>
518-
<modelVersion>4.0.0</modelVersion>
519-
<groupId>com.mycompany.app</groupId>
520-
<artifactId>my-app</artifactId>
521-
<version>1</version>
522-
<dependencies>
523-
<dependency>
524-
<groupId>javax.annotation</groupId>
525-
<artifactId>javax.annotation-api</artifactId>
526-
<version>1.3.2</version>
527-
</dependency>
528-
</dependencies>
529-
</project>
530-
""",
531-
"""
532-
<project>
533-
<modelVersion>4.0.0</modelVersion>
534-
<groupId>com.mycompany.app</groupId>
535-
<artifactId>my-app</artifactId>
536-
<version>1</version>
537-
<properties>
538-
<maven.compiler.release>17</maven.compiler.release>
539-
</properties>
540-
<dependencies>
541-
<dependency>
542-
<groupId>jakarta.annotation</groupId>
543-
<artifactId>jakarta.annotation-api</artifactId>
544-
<version>2.0.0</version>
545-
<scope>provided</scope>
546-
</dependency>
547-
</dependencies>
548-
</project>
549-
"""
550-
),
551-
//language=java
552-
srcMainJava(
553-
java(
554-
"""
555-
import javax.annotation.PostConstruct;
556-
557-
class A {
558-
@PostConstruct
559-
void init() {}
560-
}
561-
""",
562-
"""
563-
import jakarta.annotation.PostConstruct;
564-
565-
class A {
566-
@PostConstruct
567-
void init() {}
568-
}
569-
"""
570-
)
571-
)
572-
),
573-
8)
574-
);
575-
}
576-
577507
@Test
578508
void upgradeSpotbugsPluginVersion() {
579509
rewriteRun(

0 commit comments

Comments
 (0)