diff --git a/.changes/next-release/feature-a6b77635-5ddb-42c9-a31a-518f8cae1ebc.json b/.changes/next-release/feature-a6b77635-5ddb-42c9-a31a-518f8cae1ebc.json new file mode 100644 index 0000000000..910934c045 --- /dev/null +++ b/.changes/next-release/feature-a6b77635-5ddb-42c9-a31a-518f8cae1ebc.json @@ -0,0 +1,4 @@ +{ + "type" : "feature", + "description" : "/transform: support transformations to Java 21" +} \ No newline at end of file diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/ArtifactHandler.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/ArtifactHandler.kt index 22bc863767..a55c2488fe 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/ArtifactHandler.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/ArtifactHandler.kt @@ -65,7 +65,8 @@ const val DOWNLOAD_PROXY_WILDCARD_ERROR: String = "Dangling meta character '*' n const val DOWNLOAD_SSL_HANDSHAKE_ERROR: String = "Unable to execute HTTP request: javax.net.ssl.SSLHandshakeException" const val INVALID_ARTIFACT_ERROR: String = "Invalid artifact" val patchDescriptions = mapOf( - "Prepare minimal upgrade to Java 17" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks.", + "Prepare minimal upgrade to Java 17" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 17.", + "Prepare minimal upgrade to Java 21" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 21.", "Popular Enterprise Specifications and Application Frameworks upgrade" to "This diff patch covers the set of upgrades for Jakarta EE 10, Hibernate 6.2, " + "and Micronaut 3.", "HTTP Client Utilities, Apache Commons Utilities, and Web Frameworks" to "This diff patch covers the set of upgrades for Apache HTTP Client 5, Apache " + diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerManager.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerManager.kt index 01df64995a..a827a4bab8 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerManager.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerManager.kt @@ -122,9 +122,10 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo } private val artifactHandler = ArtifactHandler(project, GumbyClient.getInstance(project)) private val supportedJavaMappings = mapOf( - JavaSdkVersion.JDK_1_8 to setOf(JavaSdkVersion.JDK_17), - JavaSdkVersion.JDK_11 to setOf(JavaSdkVersion.JDK_17), - JavaSdkVersion.JDK_17 to setOf(JavaSdkVersion.JDK_17), + JavaSdkVersion.JDK_1_8 to setOf(JavaSdkVersion.JDK_17, JavaSdkVersion.JDK_21), + JavaSdkVersion.JDK_11 to setOf(JavaSdkVersion.JDK_17, JavaSdkVersion.JDK_21), + JavaSdkVersion.JDK_17 to setOf(JavaSdkVersion.JDK_17, JavaSdkVersion.JDK_21), + JavaSdkVersion.JDK_21 to setOf(JavaSdkVersion.JDK_21), ) init { diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt index 9c03fbdf51..548ed02ac4 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt @@ -4,6 +4,7 @@ package software.aws.toolkits.jetbrains.services.codemodernizer.constants import com.intellij.openapi.project.Project +import com.intellij.openapi.projectRoots.JavaSdkVersion import com.intellij.openapi.vfs.VirtualFile import software.amazon.awssdk.services.codewhispererstreaming.model.TransformationDownloadArtifactType import software.aws.toolkits.jetbrains.services.amazonq.CODE_TRANSFORM_PREREQUISITES @@ -176,8 +177,12 @@ private val selectTargetVersionFormItem = FormItem( mandatory = true, options = listOf( FormItemOption( - label = "JDK17", - value = "17", + label = JavaSdkVersion.JDK_17.toString(), + value = JavaSdkVersion.JDK_17.toString(), + ), + FormItemOption( + label = JavaSdkVersion.JDK_21.toString(), + value = JavaSdkVersion.JDK_21.toString(), ) ) ) @@ -226,14 +231,14 @@ private val selectOneOrMultipleDiffsFlagFormItem = FormItem( ) ) -private fun getUserLanguageUpgradeSelectionFormattedMarkdown(moduleName: String): String = """ +private fun getUserLanguageUpgradeSelectionFormattedMarkdown(moduleName: String, targetJdkVersion: String): String = """ ### ${message("codemodernizer.chat.prompt.title.details")} ------------- | | | | :------------------- | -------: | | **${message("codemodernizer.chat.prompt.label.module")}** | $moduleName | - | **${message("codemodernizer.chat.prompt.label.target_version")}** | JDK17 | + | **${message("codemodernizer.chat.prompt.label.target_version")}** | $targetJdkVersion | """.trimIndent() private fun getUserSQLConversionSelectionFormattedMarkdown(moduleName: String, schema: String) = """ @@ -286,6 +291,7 @@ fun buildProjectInvalidChatContent(validationResult: ValidationResult): CodeTran CodeTransformPreValidationError.EmptyProject -> message("codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots") CodeTransformPreValidationError.UnsupportedBuildSystem -> message("codemodernizer.chat.message.validation.error.no_pom") CodeTransformPreValidationError.NoJavaProject -> message("codemodernizer.chat.message.validation.error.no_java_project") + CodeTransformPreValidationError.JavaDowngradeAttempt -> message("codemodernizer.chat.message.validation.error.downgrade_attempt") else -> message("codemodernizer.chat.message.validation.error.other") } @@ -318,9 +324,9 @@ fun buildUserInputSkipTestsFlagChatContent(): CodeTransformChatMessageContent = formItems = listOf(selectSkipTestsFlagFormItem), type = CodeTransformChatMessageType.FinalizedAnswer, ) -fun buildUserInputOneOrMultipleDiffsChatIntroContent(): CodeTransformChatMessageContent = +fun buildUserInputOneOrMultipleDiffsChatIntroContent(version: String): CodeTransformChatMessageContent = CodeTransformChatMessageContent( - message = message("codemodernizer.chat.message.one_or_multiple_diffs"), + message = message("codemodernizer.chat.message.one_or_multiple_diffs", version.substring(4)), // extract "17" / "21" from "JDK_17" / "JDK_21" type = CodeTransformChatMessageType.FinalizedAnswer, ) fun buildUserInputOneOrMultipleDiffsFlagChatContent(): CodeTransformChatMessageContent = @@ -441,9 +447,9 @@ fun buildUserSQLConversionSelectionSummaryChatContent(moduleName: String, schema message = getUserSQLConversionSelectionFormattedMarkdown(moduleName, schema) ) -fun buildUserLanguageUpgradeSelectionSummaryChatContent(moduleName: String) = CodeTransformChatMessageContent( +fun buildUserLanguageUpgradeSelectionSummaryChatContent(moduleName: String, targetJdkVersion: String) = CodeTransformChatMessageContent( type = CodeTransformChatMessageType.Prompt, - message = getUserLanguageUpgradeSelectionFormattedMarkdown(moduleName) + message = getUserLanguageUpgradeSelectionFormattedMarkdown(moduleName, targetJdkVersion) ) fun buildCompileLocalInProgressChatContent() = CodeTransformChatMessageContent( diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/controller/CodeTransformChatController.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/controller/CodeTransformChatController.kt index 16be893703..c7b68a6487 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/controller/CodeTransformChatController.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/controller/CodeTransformChatController.kt @@ -93,6 +93,7 @@ import software.aws.toolkits.jetbrains.services.codemodernizer.model.CodeTransfo import software.aws.toolkits.jetbrains.services.codemodernizer.model.CustomerSelection import software.aws.toolkits.jetbrains.services.codemodernizer.model.DownloadArtifactResult import software.aws.toolkits.jetbrains.services.codemodernizer.model.DownloadFailureReason +import software.aws.toolkits.jetbrains.services.codemodernizer.model.InvalidTelemetryReason import software.aws.toolkits.jetbrains.services.codemodernizer.model.JobId import software.aws.toolkits.jetbrains.services.codemodernizer.model.MAVEN_BUILD_RUN_UNIT_TESTS import software.aws.toolkits.jetbrains.services.codemodernizer.model.MAVEN_BUILD_SKIP_UNIT_TESTS @@ -115,6 +116,7 @@ import software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.QFeature import software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.broadcastQEvent import software.aws.toolkits.jetbrains.services.cwc.messages.ChatMessageType import software.aws.toolkits.resources.message +import software.aws.toolkits.telemetry.CodeTransformPreValidationError class CodeTransformChatController( private val context: AmazonQAppInitContext, @@ -298,14 +300,28 @@ class CodeTransformChatController( val moduleVirtualFile: VirtualFile = modulePath.toVirtualFile() as VirtualFile val moduleName = context.project.getModuleOrProjectNameForFile(moduleVirtualFile) - codeTransformChatHelper.addNewMessage(buildUserLanguageUpgradeSelectionSummaryChatContent(moduleName)) + codeTransformChatHelper.addNewMessage(buildUserLanguageUpgradeSelectionSummaryChatContent(moduleName, targetVersion)) val sourceJdk = getSourceJdk(moduleVirtualFile) + val sourceVersion = sourceJdk.toString() + + if (sourceVersion == JavaSdkVersion.JDK_21.toString() && targetVersion == JavaSdkVersion.JDK_17.toString()) { + codeTransformChatHelper.addNewMessage( + buildProjectInvalidChatContent( + ValidationResult( + false, + InvalidTelemetryReason(CodeTransformPreValidationError.JavaDowngradeAttempt) + ) + ) + ) + return + } + val selection = CustomerSelection( configurationFile = moduleVirtualFile, sourceJavaVersion = sourceJdk, - targetJavaVersion = JavaSdkVersion.JDK_17, + targetJavaVersion = if (targetVersion == JavaSdkVersion.JDK_17.toString()) JavaSdkVersion.JDK_17 else JavaSdkVersion.JDK_21, ) // Create and set a session @@ -387,8 +403,9 @@ class CodeTransformChatController( codeModernizerManager.codeTransformationSession?.let { it.sessionContext.customBuildCommand = customBuildCommand } + val targetJdkVersion = codeModernizerManager.codeTransformationSession?.sessionContext?.targetJavaVersion?.name.orEmpty() codeTransformChatHelper.run { - addNewMessage(buildUserInputOneOrMultipleDiffsChatIntroContent()) + addNewMessage(buildUserInputOneOrMultipleDiffsChatIntroContent(targetJdkVersion)) addNewMessage(buildUserInputOneOrMultipleDiffsFlagChatContent()) } } diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CodeModernizerSessionContext.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CodeModernizerSessionContext.kt index b3c0fc9fc4..e53cb14729 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CodeModernizerSessionContext.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CodeModernizerSessionContext.kt @@ -63,7 +63,7 @@ data class CodeModernizerSessionContext( val project: Project, var configurationFile: VirtualFile? = null, // used to ZIP module val sourceJavaVersion: JavaSdkVersion, // always needed for startJob API - val targetJavaVersion: JavaSdkVersion = JavaSdkVersion.JDK_17, // only one supported + val targetJavaVersion: JavaSdkVersion, // 17 or 21 var transformCapabilities: List = listOf(EXPLAINABILITY_V1), var customBuildCommand: String = MAVEN_BUILD_RUN_UNIT_TESTS, // run unit tests by default val sourceVendor: String = ORACLE_DB, // only one supported diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CustomerSelection.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CustomerSelection.kt index 9e08c7d91f..151187c165 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CustomerSelection.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/model/CustomerSelection.kt @@ -10,7 +10,7 @@ import java.io.File data class CustomerSelection( val configurationFile: VirtualFile? = null, // used to ZIP module val sourceJavaVersion: JavaSdkVersion, // always needed, use default of JDK_8 for SQL conversions for startJob API call - val targetJavaVersion: JavaSdkVersion = JavaSdkVersion.JDK_17, + val targetJavaVersion: JavaSdkVersion, // 17 or 21 val sourceVendor: String = ORACLE_DB, // only one supported val targetVendor: String? = null, val sourceServerName: String? = null, diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformUtils.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformUtils.kt index 8f086e5eb0..5c8a01f20a 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformUtils.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformUtils.kt @@ -80,5 +80,6 @@ fun String.toTransformationLanguage() = when (this) { "JDK_1_8" -> TransformationLanguage.JAVA_8 "JDK_11" -> TransformationLanguage.JAVA_11 "JDK_17" -> TransformationLanguage.JAVA_17 + "JDK_21" -> TransformationLanguage.JAVA_21 else -> TransformationLanguage.UNKNOWN_TO_SDK_VERSION } diff --git a/plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/CodeWhispererCodeModernizerGumbyClientTest.kt b/plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/CodeWhispererCodeModernizerGumbyClientTest.kt index 114c949e31..ab3a4985b3 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/CodeWhispererCodeModernizerGumbyClientTest.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/CodeWhispererCodeModernizerGumbyClientTest.kt @@ -136,7 +136,7 @@ class CodeWhispererCodeModernizerGumbyClientTest : CodeWhispererCodeModernizerTe } @Test - fun `check startCodeModernization`() { + fun `check startCodeModernization on JAVA_17 target`() { val actual = gumbyClient.startCodeModernization("jobId", TransformationLanguage.JAVA_8, TransformationLanguage.JAVA_17) argumentCaptor().apply { verify(bearerClient).startTransformation(capture()) @@ -146,6 +146,17 @@ class CodeWhispererCodeModernizerGumbyClientTest : CodeWhispererCodeModernizerTe } } + @Test + fun `check startCodeModernization on JAVA_21 target`() { + val actual = gumbyClient.startCodeModernization("jobId", TransformationLanguage.JAVA_8, TransformationLanguage.JAVA_21) + argumentCaptor().apply { + verify(bearerClient).startTransformation(capture()) + verifyNoInteractions(streamingBearerClient) + assertThat(actual).isInstanceOf(StartTransformationResponse::class.java) + assertThat(actual).usingRecursiveComparison().comparingOnlyFields("transformationJobId").isEqualTo(exampleStartCodeMigrationResponse) + } + } + @Test fun `check getCodeModernizationPlan`() { val actual = gumbyClient.getCodeModernizationPlan(JobId("JobId")) diff --git a/plugins/amazonq/mynah-ui/src/mynah-ui/ui/apps/codeTransformChatConnector.ts b/plugins/amazonq/mynah-ui/src/mynah-ui/ui/apps/codeTransformChatConnector.ts index 4a9dc9a141..86ac9a3fe6 100644 --- a/plugins/amazonq/mynah-ui/src/mynah-ui/ui/apps/codeTransformChatConnector.ts +++ b/plugins/amazonq/mynah-ui/src/mynah-ui/ui/apps/codeTransformChatConnector.ts @@ -244,7 +244,7 @@ export class CodeTransformChatConnector { tabID, tabType: 'codetransform', modulePath: action.formItemValues?.module, - targetVersion: 'Java 17', + targetVersion: action.formItemValues?.targetVersion, }) } else if (action.id === FormButtonIds.CodeTransformInputSQLMetadata) { this.sendMessageToExtension({ diff --git a/plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties b/plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties index cdccf69783..de12279d42 100644 --- a/plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties +++ b/plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties @@ -633,7 +633,7 @@ codemodernizer.chat.message.button.view_diff=View diff codemodernizer.chat.message.button.view_failure_build_log=View build log codemodernizer.chat.message.button.view_summary=View summary codemodernizer.chat.message.changes_applied=I applied the changes to your project. -codemodernizer.chat.message.choose_objective=I can help you with the following tasks:\n- Upgrade your Java 8 and Java 11 codebases to Java 17, or upgrade Java 17 code with up-to-date libraries and other dependencies.\n- Convert embedded SQL code for Oracle to PostgreSQL database migrations in AWS DMS. [Learn more](https://docs.aws.amazon.com/dms/latest/userguide/schema-conversion-embedded-sql.html).\n\nWhat would you like to do? You can enter "language upgrade" or "sql conversion". +codemodernizer.chat.message.choose_objective=I can help you with the following tasks:\n- Upgrade your Java 8, Java 11, and Java 17 codebases to Java 17 or Java 21.\n- Upgrade Java 17 or Java 21 code with up-to-date libraries and other dependencies.\n- Convert embedded SQL code for Oracle to PostgreSQL database migrations in AWS DMS.\n\nWhat would you like to do? You can enter "language upgrade" or "sql conversion". codemodernizer.chat.message.choose_objective_placeholder=Enter "language upgrade" or "sql conversion" codemodernizer.chat.message.download_failed_client_instructions_expired=Your transformation is not available anymore. Your code and transformation summary are deleted 24 hours after the transformation completes. Please try starting the transformation again. codemodernizer.chat.message.download_failed_invalid_artifact=Sorry, I was unable to find your {0}. Artifacts are deleted after 24 hours. Please try starting the transformation again. @@ -653,7 +653,7 @@ codemodernizer.chat.message.hil.error.cancel_dependency_search=I cancelled the l codemodernizer.chat.message.hil.error.cancel_upload=I cancelled the dependency upload. codemodernizer.chat.message.hil.error.cannot_download_artifact=I ran into an error trying to download the dependency information. codemodernizer.chat.message.hil.error.cannot_upload=I'm sorry, I wasn't able to upload the dependency you chose. -codemodernizer.chat.message.hil.error.no_other_versions_found=I couldn''t find any other versions of this dependency in your local Maven repository. Try transforming the **{0}** dependency to make it compatible with Java 17, and then try transforming this module again. +codemodernizer.chat.message.hil.error.no_other_versions_found=I couldn''t find any other versions of this dependency in your local Maven repository. Try transforming the **{0}** dependency to make it compatible with your target Java version, and then try transforming this module again. codemodernizer.chat.message.hil.pom_snippet_title=Here is the dependency causing the issue: codemodernizer.chat.message.hil.resumed=I received your target version dependency. I'll continue transforming your code. You can monitor progress in the Transformation Hub. codemodernizer.chat.message.hil.searching=I'm searching for other dependency versions available in your Maven repository... @@ -663,7 +663,7 @@ codemodernizer.chat.message.hil.user_rejected=I'll continue upgrading your modul codemodernizer.chat.message.local_build_begin=I'm building your module. This can take up to 10 minutes, depending on the size of your module. codemodernizer.chat.message.local_build_failed=Sorry, I couldn't run the Maven clean install command to build your module. codemodernizer.chat.message.local_build_success=I was able to build your module and will start uploading your code. -codemodernizer.chat.message.one_or_multiple_diffs=If you'd like to update and test your code with fewer changes at a time, I can divide the transformation results into separate diff patches. If applicable to your application, I can split up the diffs up into the following groups of upgrades. Here are the upgrades included in each diff:\n\n\ - Minimal Compatible Library Upgrade to Java 17: Dependencies to the minimum compatible versions in Java 17, including Springboot, JUnit, and PowerMockito.\n\n\ - Popular Enterprise Specifications Application Frameworks: Popular enterprise and application frameworks like Jakarta EE, Hibernate, and Micronaut 3.\n\n\ - HTTP Client Utilities Web Frameworks: HTTP client libraries, Apache Commons utilities, and Struts frameworks.\n\n\ - Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper.\n\n\ - Miscellaneous Processing Documentation: Diverse set spanning ORMs, XML processing, and API documentation like Swagger to SpringDoc/OpenAPI.\n\n\ - Deprecated API replacement, dependency upgrades, and formatting: Replaces deprecated APIs, makes additional dependency version upgrades, and formats code changes. +codemodernizer.chat.message.one_or_multiple_diffs=If you would like to update and test your code with fewer changes at a time, I can divide the transformation results into separate diff patches. If applicable to your application, I can split up the diffs up into the following groups of upgrades. Here are the upgrades included in each diff:\n\n\ - Minimal Compatible Library Upgrade to Java {0}: Dependencies to the minimum compatible versions in Java {0}, including Springboot, JUnit, and PowerMockito.\n\n\ - Popular Enterprise Specifications Application Frameworks: Popular enterprise and application frameworks like Jakarta EE, Hibernate, and Micronaut 3.\n\n\ - HTTP Client Utilities Web Frameworks: HTTP client libraries, Apache Commons utilities, and Struts frameworks.\n\n\ - Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper.\n\n\ - Miscellaneous Processing Documentation: Diverse set spanning ORMs, XML processing, and API documentation like Swagger to SpringDoc/OpenAPI.\n\n\ - Deprecated API replacement, dependency upgrades, and formatting: Replaces deprecated APIs, makes additional dependency version upgrades, and formats code changes. codemodernizer.chat.message.one_or_multiple_diffs_form.multiple_diffs=Multiple diffs codemodernizer.chat.message.one_or_multiple_diffs_form.one_diff=One diff codemodernizer.chat.message.one_or_multiple_diffs_form.response=Okay, I will create {0} with my proposed changes. @@ -696,16 +696,17 @@ codemodernizer.chat.message.upload_failed_ssl_error=Sorry, I was unable to uploa codemodernizer.chat.message.upload_failed_url_expired=Sorry, I couldn't upload your project to begin the transformation. The Amazon S3 pre-signed URL used to upload your code expired after 30 minutes. This might have been caused by delays introduced by intermediate services in your network infrastructure.\n\nCheck your network configuration for services that might be causing delays. If the issue persists, you might need to allow list the following Amazon S3 bucket: 'amazonq-code-transformation-us-east-1-c6160f047e0.s3.amazonaws.com'. codemodernizer.chat.message.validation.check_eligible_modules=Checking for eligible modules... codemodernizer.chat.message.validation.check_passed=I can upgrade your Java module. To start the transformation, I need some information from you. Choose the module you want to upgrade and the target code version to upgrade to. Then, choose **Confirm**.\n\nIf you do not see the module you want to transform, you might need to configure your project so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and language level. In the Modules tab, set the correct module JDK and language level. +codemodernizer.chat.message.validation.error.downgrade_attempt=I can't transform a project from Java 21 to Java 17, but I can upgrade Java 21 code with up-to-date libraries and other dependencies. Try again with a supported language upgrade. codemodernizer.chat.message.validation.error.invalid_sct=It looks like the .sct file you provided isn't valid. Make sure that you've uploaded the .zip file you retrieved from your schema conversion in AWS DMS. codemodernizer.chat.message.validation.error.invalid_source_db=I can only convert SQL for migrations from an Oracle source database. The provided .sct file indicates another source database for this migration. codemodernizer.chat.message.validation.error.invalid_target_db=I can only convert SQL for migrations to Aurora PostgreSQL or Amazon RDS for PostgreSQL target databases. The provided .sct file indicates another target database for this migration. codemodernizer.chat.message.validation.error.missing_sct_file=An .sct file is required for transformation. Make sure that you've uploaded the .zip file you retrieved from your schema conversion in AWS DMS. codemodernizer.chat.message.validation.error.more_info=For more information, see the [Amazon Q documentation]({0}). codemodernizer.chat.message.validation.error.no_java_project=Sorry, I could not find an open Java module with embedded Oracle SQL statements. Make sure you have a Java module open that has at least 1 content root. -codemodernizer.chat.message.validation.error.no_pom=I couldn't find a module that I can upgrade. Your Java module must be built on Maven and contain a pom.xml file. For more information, see the [Amazon Q documentation]({0}). -codemodernizer.chat.message.validation.error.other=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 modules built on Maven. Make sure your module is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level. -codemodernizer.chat.message.validation.error.unsupported_java_version=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 projects built on Maven. Make sure your project is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level. -codemodernizer.chat.message.validation.no_jdk=I couldn't build your module with your current JDK configuration. To update your JDK, go to File and choose Project Structure. In the Projects tab, set the correct project JDK in the SDK field. In the Modules tab, set the correct module JDK in the SDK field. In Maven Runner settings, set the correct JDK in the JRE field. +codemodernizer.chat.message.validation.error.no_pom=I couldn't find a module that I can upgrade. Your Java project must be built on Maven and contain a pom.xml file. For more information, see the [Amazon Q documentation]({0}). +codemodernizer.chat.message.validation.error.other=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, Java 17, and Java 21 projects built on Maven. Make sure your project is open in the IDE. If you have a Java 8, Java 11, Java 17, or Java 21 module in your workspace, you might need to configure your project so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level. +codemodernizer.chat.message.validation.error.unsupported_java_version=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, Java 17, and Java 21 projects built on Maven. Make sure your project is open in the IDE. If you have a Java 8, Java 11, Java 17, or Java 21 in your workspace, you might need to configure your project so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level. +codemodernizer.chat.message.validation.no_jdk=I couldn't build your project with your current JDK configuration. To update your JDK, go to File and choose Project Structure. In the Projects tab, set the correct project JDK in the SDK field. In the Modules tab, set the correct module JDK in the SDK field. In Maven Runner settings, set the correct JDK in the JRE field. codemodernizer.chat.prompt.label.dependency_current_version=Current version codemodernizer.chat.prompt.label.dependency_name=Dependency name codemodernizer.chat.prompt.label.dependency_selected_version=Target version @@ -721,7 +722,7 @@ codemodernizer.explorer.show_transformation_status=Show transformation status codemodernizer.explorer.show_transformation_status_description=View transformation status codemodernizer.explorer.show_transformation_summary_title=View your code transformation summary codemodernizer.explorer.stop_migration_job=Stop Transformation -codemodernizer.file.invalid_pom_version=Amazon Q experienced an issue upgrading this dependency version. Use Amazon Q chat to upgrade the version of this dependency to a Java 17 compatible version. +codemodernizer.file.invalid_pom_version=Amazon Q experienced an issue upgrading this dependency version. Use Amazon Q chat to upgrade the version of this dependency to a version compatible with your target Java version. codemodernizer.manager.job_ongoing_content=Amazon Q is still transforming your code. To see the current status of the transformation, go to the Transformation Hub. codemodernizer.manager.job_ongoing_title=Code Transformation ongoing codemodernizer.migration_plan.body.info.action_column=Action @@ -778,7 +779,7 @@ codemodernizer.notification.warn.download_failed_other.content=Amazon Q ran into codemodernizer.notification.warn.download_failed_ssl.content=Please make sure all your certificates for your proxy client have been set up correctly for your IDE. codemodernizer.notification.warn.download_failed_wildcard.content=Check your IDE proxy settings and remove any wildcard (*) references, and then try viewing the diff again. codemodernizer.notification.warn.expired_credentials.title=Your connection to Q has expired -codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots=None of your open modules are supported for code transformation with Amazon Q. Amazon Q can upgrade Java 8, Java 11, and Java 17 modules built on Maven, with content roots configured. +codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots=None of your open modules are supported for code transformation with Amazon Q. Amazon Q can upgrade Java 8, Java 11, Java 17, and Java 21 projects built on Maven, with content roots configured. codemodernizer.notification.warn.invalid_project.description.reason.not_logged_in=Amazon Q cannot start the transformation as you are not logged in with Identity Center or Builder ID. Also ensure that you are not using IntelliJ version 232.8660.185 and that you are not developing on a remote host (uncommon). codemodernizer.notification.warn.invalid_project.description.reason.remote_backend=None of your open modules are supported for code transformation with Amazon Q. Amazon Q cannot transform modules running on a remote host. codemodernizer.notification.warn.maven_failed.content=Amazon Q could not run the Maven clean install command to build your module. diff --git a/plugins/core/sdk-codegen/codegen-resources/codewhispererruntime/service-2.json b/plugins/core/sdk-codegen/codegen-resources/codewhispererruntime/service-2.json index bf28b26a6d..2541167599 100644 --- a/plugins/core/sdk-codegen/codegen-resources/codewhispererruntime/service-2.json +++ b/plugins/core/sdk-codegen/codegen-resources/codewhispererruntime/service-2.json @@ -2291,7 +2291,7 @@ }, "TransformationJavaRuntimeEnv": { "type": "string", - "enum": ["JVM_8", "JVM_11", "JVM_17"] + "enum": ["JVM_8", "JVM_11", "JVM_17", "JVM_21"] }, "TransformationJob": { "type": "structure", @@ -2312,7 +2312,7 @@ }, "TransformationLanguage": { "type": "string", - "enum": ["JAVA_8", "JAVA_11", "JAVA_17", "C_SHARP", "COBOL", "PL_I", "JCL"] + "enum": ["JAVA_8", "JAVA_11", "JAVA_17", "JAVA_21", "C_SHARP", "COBOL", "PL_I", "JCL"] }, "TransformationLanguages": { "type": "list",