├── .gitignore ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── THIRD_PARTY_LICENSES.TXT ├── ci.hocon ├── cleaner ├── .vscode │ ├── launch.json │ └── tasks.json ├── README.md ├── package-lock.json ├── package.json ├── src │ ├── main.ts │ └── ociUtils.ts └── tsconfig.json ├── common ├── .eslintrc.json ├── .vscodeignore ├── README.md ├── package-lock.json ├── package.json ├── src │ ├── connections.ts │ ├── dialogs.ts │ ├── logUtils.ts │ ├── micronautToolsIntegration.ts │ ├── types.ts │ └── utils.ts └── tsconfig.json ├── extension-tests ├── .npmignore ├── README.md ├── bin │ └── main.js ├── package-lock.json ├── package.json ├── src │ ├── bin.ts │ ├── extensionHelper.ts │ ├── index.ts │ ├── runTest-ui.ts │ ├── runTest.ts │ └── vscodeHelper.ts └── tsconfig.json ├── gcn ├── .eslintrc.js ├── .nvmrc ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── .vscodeignore ├── CHANGELOG.MD ├── LICENSE.txt ├── README.MD ├── download-launcher.mjs ├── fixtures │ └── project-structure │ │ ├── README.md │ │ ├── aws-proj.json │ │ ├── base-example.json │ │ ├── custom-services.json │ │ ├── maven-basic.json │ │ └── oci-proj.json ├── images │ ├── GraalVM_icon_rgb.png │ ├── experimental_features.png │ ├── gcn-vscode-actions.png │ └── install-tools.png ├── package-lock.json ├── package.json ├── src │ ├── browser │ │ ├── extension.ts │ │ └── gcnProjectCreateWeb.ts │ ├── common.ts │ ├── extension.ts │ ├── gcnProjectCreate.ts │ └── test │ │ ├── README.md │ │ └── suite │ │ ├── codelense.ui-test.ts │ │ ├── database.ui-test.ts │ │ ├── extension.test.ts │ │ ├── extension.ui-test.ts │ │ ├── index.ts │ │ ├── project-generator.test.ts │ │ └── project-structure.test.ts ├── tsconfig.eslint.json ├── tsconfig.json └── webpack.config.js ├── graal-cloud-native-pack ├── .vscodeignore ├── CHANGELOG.md ├── GraalVM_icon_rgb.png ├── LICENSE.txt ├── README.md ├── package-lock.json ├── package.json └── vsc-extension-quickstart.md ├── micronaut-tools ├── .eslintrc.js ├── .gitignore ├── .nvmrc ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── buildagent │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.jar │ │ │ ├── maven-wrapper.properties │ │ │ ├── mvnw │ │ │ └── mvnw.cmd │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── oracle │ │ │ └── jdtls │ │ │ └── ext │ │ │ └── launcher │ │ │ ├── GradleLauncher.java │ │ │ ├── Launcher.java │ │ │ ├── LauncherBuilder.java │ │ │ ├── LauncherDelegate.java │ │ │ ├── MavenLauncher.java │ │ │ ├── MavenMicronautLauncher.java │ │ │ ├── MavenTerminator.java │ │ │ ├── ProcessesImpl.java │ │ │ └── QuotedLineParser.java │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── oracle │ │ │ └── jdtls │ │ │ └── ext │ │ │ └── launcher │ │ │ ├── MavenLauncherTest.java │ │ │ └── QuotedLineParserTest.java │ │ └── resources │ │ └── com │ │ └── oracle │ │ └── jdtls │ │ └── ext │ │ └── launcher │ │ ├── continuations.cmdfile │ │ ├── continuations.golden │ │ ├── multiModuleBuildRootProject.args │ │ ├── multiModuleBuildSubproject.args │ │ ├── multiModuleBuildSubproject.golden │ │ ├── noWrapperLaunch.args │ │ ├── noWrapperLaunch.golden │ │ ├── projects │ │ ├── maven │ │ │ ├── .mvn │ │ │ │ └── wrapper │ │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ │ ├── maven-wrapper.jar │ │ │ │ │ └── maven-wrapper.properties │ │ │ ├── micronaut-cli.yml │ │ │ ├── mvnw │ │ │ ├── mvnw.bat │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── DemoCommand.java │ │ │ │ └── resources │ │ │ │ │ ├── application.yml │ │ │ │ │ └── logback.xml │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── DemoCommandTest.java │ │ ├── mavenNoWrapper │ │ │ ├── .mvn │ │ │ │ └── wrapper │ │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ │ ├── maven-wrapper.jar │ │ │ │ │ └── maven-wrapper.properties │ │ │ ├── micronaut-cli.yml │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── DemoCommand.java │ │ │ │ └── resources │ │ │ │ │ ├── application.yml │ │ │ │ │ └── logback.xml │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── DemoCommandTest.java │ │ └── multi │ │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ │ ├── lib │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ ├── controller │ │ │ │ │ └── GenreController.java │ │ │ │ │ ├── domain │ │ │ │ │ └── Genre.java │ │ │ │ │ ├── repository │ │ │ │ │ └── GenreRepository.java │ │ │ │ │ └── service │ │ │ │ │ └── GenreService.java │ │ │ │ └── resources │ │ │ │ ├── META-INF │ │ │ │ └── native-image │ │ │ │ │ └── resource-config.json │ │ │ │ └── db │ │ │ │ └── migration │ │ │ │ └── V1__schema.sql │ │ │ ├── main │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ ├── Application.java │ │ │ │ │ │ └── Main.java │ │ │ │ └── resources │ │ │ │ │ ├── application-oraclecloud.yml │ │ │ │ │ ├── bootstrap-oraclecloud.yml │ │ │ │ │ └── logback.xml │ │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ ├── GenreControllerTest.java │ │ │ │ │ └── OciTest.java │ │ │ │ └── resources │ │ │ │ └── application-test.yml │ │ │ ├── micronaut-cli.yml │ │ │ ├── mvnw │ │ │ ├── mvnw.bat │ │ │ └── pom.xml │ │ ├── quotedAndUnquoted.cmdfile │ │ ├── quotedAndUnquoted.golden │ │ ├── quotedEscape.cmdfile │ │ ├── quotedEscape.golden │ │ ├── wrapperLaunch.args │ │ └── wrapperLaunch.golden ├── images │ ├── add_to_oci_vault.png │ ├── applications-view.png │ ├── beans_endpoints_view.png │ ├── build_and_run_container_image.gif │ ├── clear_all_results.png │ ├── cloud_assets_panel.png │ ├── compose_rest_query.png │ ├── controller-source-actions.png │ ├── create-controllers.gif │ ├── create-entities.gif │ ├── create-repositories.gif │ ├── create_external_config.png │ ├── create_external_config_choose_target.png │ ├── create_oci_policies.png │ ├── debug_main_method.png │ ├── debugee_timeout.png │ ├── micronaut-build-commands.png │ ├── micronaut-expression-language.png │ ├── micronaut-navigation.png │ ├── micronaut.png │ ├── run-continuous-config.png │ ├── run-continuous.png │ ├── run_main_method.png │ ├── run_tests_parallel.gif │ ├── run_tests_parallel_shortcut.png │ ├── ssh_to_compute_instance.png │ └── test_case_click.gif ├── javaConfig.json ├── jdtls.ext │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── .project │ ├── check_style.xml │ ├── com.oracle.jdtls.ext.core │ │ ├── .classpath │ │ ├── .project │ │ ├── .settings │ │ │ ├── org.eclipse.core.resources.prefs │ │ │ ├── org.eclipse.jdt.core.prefs │ │ │ └── org.eclipse.m2e.core.prefs │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ ├── build.properties │ │ ├── plugin.xml │ │ ├── pom.xml │ │ └── src │ │ │ └── com │ │ │ └── oracle │ │ │ └── jdtls │ │ │ └── ext │ │ │ └── core │ │ │ ├── CommandHandler.java │ │ │ ├── FindProjectTypeParams.java │ │ │ ├── FindProjectTypeResult.java │ │ │ ├── JavaCodeLens.java │ │ │ └── JdtlsExtActivator.java │ ├── com.oracle.jdtls.ext.target │ │ ├── .project │ │ ├── com.oracle.jdtls.ext.tp.target │ │ └── pom.xml │ ├── mvnw │ ├── mvnw.cmd │ └── pom.xml ├── mexp-language-configuration.json ├── package-lock.json ├── package.json ├── package.nls.json ├── resources │ ├── launch-wrappers │ │ ├── launcher.cmd │ │ ├── launcher.groovy │ │ └── launcher.sh │ ├── visualvm_icon_dark.svg │ └── visualvm_icon_light.svg ├── scripts │ └── buildJdtlsExt.js ├── src │ ├── database │ │ ├── database-drivers.ts │ │ ├── dbsupport.ts │ │ └── typeUtils.ts │ ├── extension.ts │ ├── kubernetes │ │ ├── kubernetesChannel.ts │ │ ├── kubernetesDeploy.ts │ │ ├── kubernetesDeployment.ts │ │ ├── kubernetesRun.ts │ │ └── kubernetesUtil.ts │ ├── launcher │ │ ├── extension.ts │ │ ├── launch.ts │ │ ├── projectLaunchSupport.ts │ │ └── utils.ts │ ├── navigation │ │ ├── actions.ts │ │ ├── applicationEnvironments.ts │ │ ├── applicationModules.ts │ │ ├── applications.ts │ │ ├── codeLens.ts │ │ ├── formatters.ts │ │ ├── hosts.ts │ │ ├── management │ │ │ ├── beanHandler.ts │ │ │ ├── beansEndpoint.ts │ │ │ ├── cachesEndpoint.ts │ │ │ ├── controlPanel.ts │ │ │ ├── environmentEndpoint.ts │ │ │ ├── healthEndpoint.ts │ │ │ ├── loggersEndpoint.ts │ │ │ ├── management.ts │ │ │ ├── metricsEndpoint.ts │ │ │ ├── refreshEndpoint.ts │ │ │ ├── routesEndpoint.ts │ │ │ └── serverStopEndpoint.ts │ │ ├── nodes.ts │ │ ├── projectUtils.ts │ │ ├── rest.ts │ │ ├── restQueries.ts │ │ ├── settings.ts │ │ ├── symbols.ts │ │ ├── targetAddress.ts │ │ ├── views.ts │ │ ├── visualvmIntegration.ts │ │ └── workspaceFolders.ts │ ├── projectBuild.ts │ ├── projectCreate.ts │ ├── test-matrix │ │ ├── TestMatrixViewProvider.ts │ │ ├── gdkProjectUtils.ts │ │ ├── initializer.ts │ │ ├── testUtils.ts │ │ ├── types.ts │ │ └── vscodeUtils.ts │ └── welcome.ts ├── syntaxes │ ├── mexp-injection.json │ └── mexp.tmLanguage.json ├── templates │ ├── deploy.yaml.handlebars │ └── service.yaml.handlebars ├── tsconfig.eslint.json ├── tsconfig.json ├── vsc-extension-quickstart.md ├── webpack.config.js └── webviews │ ├── icons │ ├── micronaut_dark.png │ └── micronaut_light.png │ ├── scripts │ ├── testMatrix.js │ └── welcome.js │ ├── styles │ ├── testMatrix.css │ └── welcome.css │ ├── testMatrix.handlebars │ └── welcome.handlebars ├── micronaut ├── .eslintrc.js ├── .nvmrc ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── images │ ├── install-tools.png │ ├── micronaut-cli-setting.png │ ├── micronaut-project-features_view.png │ └── micronaut.png ├── package-lock.json ├── package.json ├── src │ ├── extension.ts │ ├── projectCreate.ts │ └── utils.ts ├── tsconfig.eslint.json ├── tsconfig.json ├── vsc-extension-quickstart.md └── webpack.config.js ├── nbcode-gcn-database ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── nbcode-gcn-database-drivers │ ├── pom.xml │ └── src │ │ └── main │ │ ├── nbm │ │ └── manifest.mf │ │ └── resources │ │ └── org │ │ └── netbeans │ │ └── modules │ │ └── gcn │ │ └── database │ │ └── drivers │ │ ├── Bundle.properties │ │ ├── layer.xml │ │ ├── mysql2.xml │ │ └── ojdbc.xml └── pom.xml ├── oci-devops ├── .eslintrc.js ├── .gitignore ├── .nvmrc ├── .test-extension-list ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── .vscodeignore ├── CHANGELOG.MD ├── LICENSE.txt ├── README.MD ├── fixtures │ └── base-oci-template │ │ ├── README.md │ │ ├── gradle.properties │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── lib │ │ └── build.gradle │ │ ├── micronaut-cli.yml │ │ ├── oci │ │ ├── build.gradle │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── Application.java │ │ │ └── resources │ │ │ │ ├── application-oraclecloud.yml │ │ │ │ ├── bootstrap-oraclecloud.yml │ │ │ │ └── logback.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── OciTest.java │ │ └── settings.gradle ├── images │ ├── add_to_oci_vault.png │ ├── create_devops_prj.png │ ├── more-ci-jobs.png │ ├── oke_test_app.png │ ├── oracle-logo.png │ ├── project_audit.png │ ├── proxy.png │ └── set_oke_access.png ├── package-lock.json ├── package.json ├── resources │ ├── extension_icon.png │ ├── issue_template.handlebars │ └── oci │ │ ├── Dockerfile.jvm.handlebars │ │ ├── Dockerfile.native.handlebars │ │ ├── create_secret_service_account.yaml.handlebars │ │ ├── devbuild_spec.yaml.handlebars │ │ ├── devbuild_spec_no_output_artifacts.yaml.handlebars │ │ ├── docker_build_spec.yaml.handlebars │ │ ├── docker_jvmbuild_spec.yaml.handlebars │ │ ├── docker_nibuild_spec.yaml.handlebars │ │ ├── nibuild_spec.yaml.handlebars │ │ ├── nibuild_spec_no_output_artifacts.yaml.handlebars │ │ ├── oke_configmap.yaml.handlebars │ │ ├── oke_deploy_config.yaml.handlebars │ │ ├── oke_pod_deletion.yaml.handlebars │ │ └── oke_secret_rotation_cronjob.yaml.handlebars ├── src │ ├── devopsServices.ts │ ├── dialogs.ts │ ├── dockerUtils.ts │ ├── extension.ts │ ├── folderStorage.ts │ ├── gitUtils.ts │ ├── graalvmUtils.ts │ ├── importExportUtils.ts │ ├── kubernetesUtils.ts │ ├── model.ts │ ├── nodes.ts │ ├── oci │ │ ├── artifactServices.ts │ │ ├── buildServices.ts │ │ ├── containerInstanceServices.ts │ │ ├── containerServices.ts │ │ ├── dataSupport.ts │ │ ├── deployArtifactServices.ts │ │ ├── deployUtils.ts │ │ ├── deploymentServices.ts │ │ ├── importUtils.ts │ │ ├── knowledgeBaseServices.ts │ │ ├── ociAuthentication.ts │ │ ├── ociContext.ts │ │ ├── ociDialogs.ts │ │ ├── ociFeatures.ts │ │ ├── ociNodes.ts │ │ ├── ociResources.ts │ │ ├── ociService.ts │ │ ├── ociServices.ts │ │ ├── ociSupport.ts │ │ ├── ociUtils.ts │ │ ├── okeUtils.ts │ │ ├── secretRotationCronjob.ts │ │ ├── sshUtils.ts │ │ ├── undeployUtils.ts │ │ └── vcnUtils.ts │ ├── persistenceUtils.ts │ ├── projectUtils.ts │ ├── servicesView.ts │ ├── test │ │ ├── README.md │ │ └── suite │ │ │ ├── build-pipeline.test.ts │ │ │ ├── common.ts │ │ │ ├── configuration.test.ts │ │ │ ├── deployment-pipeline.test.ts │ │ │ ├── deployment.test.ts │ │ │ ├── extension.test.ts │ │ │ └── index.ts │ └── welcome.ts ├── tsconfig.eslint.json ├── tsconfig.json ├── webpack.config.js └── webviews │ ├── imgs │ └── gcnBanner.png │ ├── scripts │ └── welcome.js │ ├── styles │ └── welcome.css │ └── welcome.handlebars ├── package.json └── tests ├── .prettierrc ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── README.md ├── ci.hocon ├── package-lock.json ├── package.json ├── src ├── .npmignore ├── Common │ ├── abstractTestDescriptor.ts │ ├── extensionHelper.ts │ ├── gcn-generator.ts │ ├── helpers.ts │ ├── micronaut-generator.ts │ ├── project-generator.ts │ ├── projectHelper.ts │ ├── testHelper.ts │ ├── types.ts │ └── vscodeHelper.ts ├── bin.ts ├── env.d.ts ├── generate.ts ├── runTest-ui.ts ├── runTest.ts └── test │ └── suite │ ├── Gates │ ├── API │ │ ├── NITests │ │ │ ├── ACTIVATE_ME_testDescriptor.ts │ │ │ ├── GCNnativeimage.test.ts │ │ │ ├── Micronautnativeimage.test.ts │ │ │ └── NItest.ts │ │ ├── OCITests │ │ │ ├── combined.test.ts │ │ │ ├── extension.test.ts │ │ │ ├── helpers.ts │ │ │ └── testDescriptor.ts │ │ ├── TestsWithSimpleWorkspace │ │ │ ├── extension.test.ts │ │ │ ├── micronaut-symbols.test.ts │ │ │ ├── project-structure.test.ts │ │ │ └── testDescriptor.ts │ │ ├── adm │ │ │ ├── adm.test.ts │ │ │ └── testDescriptor.ts │ │ ├── helpers.ts │ │ └── index.ts │ └── UI │ │ ├── CodelenseAndAutocomplete │ │ ├── codelense.ui-test.ts │ │ └── testDescriptor.ts │ │ ├── MicronautRESTUI │ │ ├── micronaut-RESTUI.ui-test.ts │ │ └── testDescriptor.ts │ │ ├── MicronautSymbols │ │ ├── micronaut-symbols.ui-test.ts │ │ └── testDescriptor.ts │ │ ├── TestsThatDoesNotNeedWorkspace │ │ ├── extension.ui-test.ts │ │ ├── helper.ts │ │ ├── micronaut.ui-test.ts │ │ └── testDescriptor.ts │ │ ├── testRunner-ui.ts │ │ └── ui-helpers.ts │ ├── generate.test.ts │ ├── genindex.ts │ └── index.ts ├── test-projects └── adm │ ├── oci-adm-g-simple │ ├── build.gradle │ ├── build.gradle.first │ ├── buildSrc │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ └── groovy │ │ │ └── cloud.graal.gcn.gcn-bom.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── micronaut-cli.yml │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ ├── .gitkeep │ │ │ ├── InventoryService.java │ │ │ ├── StoreController.java │ │ │ ├── WarehouseClient.java │ │ │ ├── WarehouseController.java │ │ │ ├── controller │ │ │ └── GenreController.java │ │ │ ├── domain │ │ │ └── Genre.java │ │ │ ├── repository │ │ │ └── GenreRepository.java │ │ │ └── service │ │ │ ├── GenreService.java │ │ │ └── MetricsService.java │ │ └── resources │ │ ├── .gitkeep │ │ ├── META-INF │ │ └── native-image │ │ │ └── resource-config.json │ │ └── db │ │ └── migration │ │ └── V1__schema.sql │ ├── oci-adm-g │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── buildSrc │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ └── groovy │ │ │ └── cloud.graal.gcn.gcn-bom.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── lib │ │ ├── build.gradle │ │ ├── build.gradle.first │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── exampleg │ │ │ │ ├── .gitkeep │ │ │ │ ├── InventoryService.java │ │ │ │ ├── StoreController.java │ │ │ │ ├── WarehouseClient.java │ │ │ │ ├── WarehouseController.java │ │ │ │ ├── controller │ │ │ │ └── GenreController.java │ │ │ │ ├── domain │ │ │ │ └── Genre.java │ │ │ │ ├── repository │ │ │ │ └── GenreRepository.java │ │ │ │ └── service │ │ │ │ ├── GenreService.java │ │ │ │ └── MetricsService.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── native-image │ │ │ │ └── resource-config.json │ │ │ └── db │ │ │ └── migration │ │ │ └── V1__schema.sql │ ├── micronaut-cli.yml │ ├── oci │ │ ├── build.gradle │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── exampleg │ │ │ │ │ ├── Application.java │ │ │ │ │ └── LogController.java │ │ │ └── resources │ │ │ │ ├── application-oraclecloud.properties │ │ │ │ ├── bootstrap-oraclecloud.properties │ │ │ │ └── logback.xml │ │ │ └── test │ │ │ ├── java │ │ │ └── com │ │ │ │ └── exampleg │ │ │ │ ├── GenreControllerTest.java │ │ │ │ ├── OciTest.java │ │ │ │ ├── StoreControllerTest.java │ │ │ │ └── service │ │ │ │ └── MetricsServiceTest.java │ │ │ └── resources │ │ │ └── application-test.properties │ └── settings.gradle │ └── oci-adm-m │ ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── lib │ ├── pom.xml │ ├── pom.xml.first │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── example │ │ ├── .gitkeep │ │ ├── InventoryService.java │ │ ├── StoreController.java │ │ ├── WarehouseClient.java │ │ ├── WarehouseController.java │ │ └── service │ │ └── MetricsService.java │ ├── micronaut-cli.yml │ ├── mvnw │ ├── mvnw.bat │ ├── oci │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── Application.java │ │ │ │ └── LogController.java │ │ └── resources │ │ │ ├── application-oraclecloud.properties │ │ │ ├── bootstrap-oraclecloud.properties │ │ │ └── logback.xml │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ ├── OciTest.java │ │ │ ├── StoreControllerTest.java │ │ │ └── service │ │ │ └── MetricsServiceTest.java │ │ └── resources │ │ └── application-test.properties │ └── pom.xml ├── tsconfig.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | **/dist 3 | **/out 4 | **/node_modules 5 | **/.vscode-test/ 6 | **/*.vsix 7 | **/.vscode-test-web 8 | .vscode 9 | /common/lib 10 | /package-lock.json 11 | /mxbuild 12 | /.project 13 | .DS_Store 14 | .gitignore 15 | /nbcode-graalvm/nbcode-graalvm-ojdbc/target/ 16 | /graalvm/nbcode/ 17 | /gcn-database-drivers/nbcode 18 | /nbcode-gcn-database/nbcode-gcn-database-drivers/target/ 19 | /oci-devops/fixtures/base-oci-template/oci/bin/ 20 | /*/test-resources/ 21 | /*/mochawesome-report/ 22 | /*/mochawesome-report-generator/ 23 | **/projects 24 | tests/generated-projects/ 25 | tests/test-projects/**/.gradle 26 | tests/test-projects/**/build/tmp 27 | tests/test-projects/**/buildSrc/build 28 | **/target 29 | oci-devops/fixtures/oci-adm-g/lib/bin/ 30 | oci-devops/fixtures/oci-adm-g/oci/bin/ 31 | tests/test-projects/adm/oci-adm-g-simple/bin/ 32 | gcn/lib -------------------------------------------------------------------------------- /cleaner/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "typescript", 6 | "tsconfig": "tsconfig.json", 7 | "problemMatcher": [ 8 | "$tsc" 9 | ], 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /cleaner/README.md: -------------------------------------------------------------------------------- 1 | # OCI Cleaner 2 | 3 | This project is a cleaner for OCI devops project resources. It cleans contents of a single compartment from resources whose names match the given regexp. **USE AT YOUR OWN RISK**, the utility DELETES data from the OCI. 4 | 5 | It accepts two parameters: 6 | - *compartment name*, as a path from the root compartment. 7 | - *a single regexp* to select project, container images and container registries. 8 | If more names resources should be cleared, use `|` to combine them in the regexp. So for example `"oci-adm-.*|MAVEN_DATABASE_.*|maven_micronaut.*|adm-test-.*"` 9 | 10 | The cleaner will enumerate projects with matching names. Deletes build pipelines, artifacts, code repositories. As usual container image and registry names derive from the project name, the cleaner will also list images in the compartment with matching name and delete them as well as container registries. 11 | 12 | -------------------------------------------------------------------------------- /cleaner/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "@types/bunyan": "^1.8.11", 4 | "@types/glob": "^8.0.1", 5 | "@types/node": "^14.16.0", 6 | "typescript": "^5.5.0-dev.20240422", 7 | "undici": "^6.21.2" 8 | }, 9 | "dependencies": { 10 | "bunyan": "^1.8.15", 11 | "node-fetch": "^2.7.0", 12 | "oci-sdk": "^2.68.1" 13 | }, 14 | "name": "ocicleaner", 15 | "version": "1.0.0", 16 | "description": "OCI project cleaner", 17 | "main": "main.ts", 18 | "type": "module", 19 | "scripts": { 20 | "build": "tsc --outDir out", 21 | "test": "echo \"Error: no test specified\" && exit 1", 22 | "main": "node ./out/main.js" 23 | }, 24 | "author": "Svata Dedic", 25 | "license": "ISC" 26 | } 27 | -------------------------------------------------------------------------------- /cleaner/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://www.typescriptlang.org/tsconfig#compilerOptions 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "lib": ["es2020", "DOM"], 6 | "module": "ES2020", 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "sourceMap": true, 10 | "target": "es2017", 11 | "outDir": "dist", 12 | "esModuleInterop": true, 13 | "skipLibCheck": true, 14 | "resolveJsonModule": true, 15 | }, 16 | "include": ["src/**/*"], 17 | "exclude": ["node_modules"] 18 | } -------------------------------------------------------------------------------- /common/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "parserOptions": { 5 | "ecmaVersion": 6, 6 | "sourceType": "module" 7 | }, 8 | "plugins": [ 9 | "@typescript-eslint" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/naming-convention": "warn", 13 | "@typescript-eslint/semi": "warn", 14 | "curly": "warn", 15 | "eqeqeq": "warn", 16 | "no-throw-literal": "warn", 17 | "semi": "off" 18 | }, 19 | "ignorePatterns": [ 20 | "out", 21 | "dist", 22 | "**/*.d.ts" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /common/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | lib/** 4 | node_modules/** 5 | src/** 6 | .gitignore 7 | .yarnrc 8 | webpack.config.js 9 | vsc-extension-quickstart.md 10 | **/tsconfig.json 11 | **/.eslintrc.json 12 | **/*.map 13 | **/*.ts 14 | -------------------------------------------------------------------------------- /common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gdk-common", 3 | "version": "0.0.1", 4 | "displayName": "VSCode Common Utils", 5 | "description": "Common Utils module of Oracle Labs Extensions for VSCode.", 6 | "publisher": "oracle-labs-graalvm", 7 | "author": { 8 | "name": "Oracle Labs" 9 | }, 10 | "scripts": { 11 | "clean": "rm -rf ./out ./dist", 12 | "clean-all": "npm run clean", 13 | "lint": "eslint src --ext ts", 14 | "prebuild": "npm install", 15 | "compile": "tsc -p . --declaration", 16 | "build": "tsc" 17 | }, 18 | "browser": { 19 | "child_process": false, 20 | "fs": false, 21 | "path": false, 22 | "os": false 23 | }, 24 | "devDependencies": { 25 | "@types/node": "^14.16.0", 26 | "@types/vscode": "^1.76.0", 27 | "@typescript-eslint/eslint-plugin": "^5.54.1", 28 | "eslint": "^8.35.0", 29 | "typescript": "^4.9.5" 30 | }, 31 | "dependencies": { 32 | "child_process": "^1.0.2", 33 | "fs": "^0.0.1-security", 34 | "path": "^0.12.7", 35 | "os":"^0.1.2", 36 | "jdk-utils": "^0.5.1" 37 | } 38 | } -------------------------------------------------------------------------------- /common/src/micronautToolsIntegration.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | 10 | 11 | export const EXTENSION_NAME = 'Tools for Micronaut® framework'; 12 | const EXTENSION_ID = 'oracle-labs-graalvm.micronaut-tools'; 13 | 14 | export function canCheckExtensionInstalled(configurationSection: string): boolean { 15 | return vscode.workspace.getConfiguration(configurationSection).get('checkToolsExtension', true); 16 | } 17 | 18 | export function neverCheckExtensionInstalled(configurationSection: string): Thenable { 19 | return vscode.workspace.getConfiguration(configurationSection).update('checkToolsExtension', false, true); 20 | } 21 | 22 | export function isExtensionInstalled(): boolean { 23 | return !!vscode.extensions.getExtension(EXTENSION_ID); 24 | } 25 | 26 | export async function installExtension(): Promise { 27 | try { 28 | await vscode.commands.executeCommand('workbench.extensions.installExtension', EXTENSION_ID); 29 | return true; 30 | } catch (err) { 31 | vscode.window.showErrorMessage(`Failed to install ${EXTENSION_NAME} extension: ${err}`); 32 | return false; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /common/src/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Describes the shape of objects that hold information about javaVMs 10 | */ 11 | export type JavaVMType = { 12 | name: string; 13 | path: string; 14 | active: boolean; 15 | }; -------------------------------------------------------------------------------- /common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "ES2020", 5 | "lib": [ 6 | "ES2020" 7 | ], 8 | "sourceMap": true, 9 | "rootDir": "src", 10 | "strict": true, /* enable all strict type-checking options */ 11 | /* Additional Checks */ 12 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 13 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 14 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 15 | 16 | "outDir": "lib", 17 | "declaration": true 18 | }, 19 | 20 | "include": ["src/**/*"] 21 | } 22 | -------------------------------------------------------------------------------- /extension-tests/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | node_modules/ 3 | tsconfig.json -------------------------------------------------------------------------------- /extension-tests/bin/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | require("../out/bin"); -------------------------------------------------------------------------------- /extension-tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gcn-extension-tests", 3 | "version": "1.2.1", 4 | "description": "Test environment for GDK extensions", 5 | "main": "./out/index.js", 6 | "scripts": { 7 | "compile": "tsc -p .", 8 | "build": "npm install && npm run compile", 9 | "clean": "shx rm -rf ./out ./dist", 10 | "clean-all": "npm run clean" 11 | }, 12 | "author": { 13 | "name": "Oracle Labs" 14 | }, 15 | "license": "ISC", 16 | "devDependencies": { 17 | "@types/glob": "^8.0.1", 18 | "@types/mocha": "^10.0.1", 19 | "@types/node": "^18.14", 20 | "@types/semver": "^7.5.8", 21 | "@types/vscode": "^1.76.0", 22 | "@vscode/test-electron": "^2.3.10", 23 | "eslint": "^8.35.0", 24 | "glob": "^10.3.12", 25 | "mocha": "^10.1.0", 26 | "node-abort-controller": "^3.1.1", 27 | "nodejs-file-downloader": "^4.12.1", 28 | "semver": "^7.6.0", 29 | "shx": "^0.3.4", 30 | "typescript": "^5.5.2", 31 | "vscode-extension-tester": "^8.3.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /extension-tests/src/bin.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | function main() { 9 | if (process.argv.indexOf('--prepareVscode') != -1) { 10 | const test = require('./runTest'); 11 | test.prepareVscodeInstallation(); 12 | } else if (process.argv.indexOf('--runTest') != -1) { 13 | const test = require('./runTest'); 14 | test.runTest(); 15 | } else if (process.argv.indexOf('--runTest-ui') != -1) { 16 | const test = require('./runTest-ui'); 17 | test.runTestUI(); 18 | } else { 19 | console.log("Invalid arguments passed"); 20 | } 21 | 22 | } 23 | 24 | main() -------------------------------------------------------------------------------- /extension-tests/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import {runTest} from './runTest'; 9 | import {runTestUI} from './runTest-ui'; 10 | 11 | module.exports = { 12 | runTests: runTest, 13 | runTestsUI: runTestUI 14 | } -------------------------------------------------------------------------------- /extension-tests/src/runTest-ui.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as extest from 'vscode-extension-tester'; 9 | 10 | export async function runTestUI() { 11 | // run UI extension tests 12 | try { 13 | // download code and chromedriver 14 | let exTester : extest.ExTester = new extest.ExTester('test-resources', extest.ReleaseQuality.Stable, 'test-resources/extensions'); 15 | await exTester.downloadCode(); 16 | await exTester.downloadChromeDriver(); 17 | 18 | if (process.env['EXTESTER_EXTENSION_LIST']) { 19 | const extension_list : string[] = process.env['EXTESTER_EXTENSION_LIST'].split(','); 20 | for (let extension of extension_list) { 21 | exTester.installFromMarketplace(extension); 22 | } 23 | } 24 | 25 | // Run tests 26 | await exTester.runTests('**/**.ui-test.js'); 27 | } catch (err) { 28 | console.error('Failed to run tests', err); 29 | process.exit(1); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /extension-tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "compilerOptions": { 10 | "target": "es6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 11 | 12 | "module": "commonjs", /* Specify what module code is generated. */ 13 | "rootDir": "./src", /* Specify the root folder within your source files. */ 14 | 15 | "outDir": "./out", /* Specify an output folder for all emitted files. */ 16 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 17 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 18 | 19 | /* Type Checking */ 20 | "strict": true, /* Enable all strict type-checking options. */ 21 | 22 | "sourceMap": true 23 | } 24 | } -------------------------------------------------------------------------------- /gcn/.nvmrc: -------------------------------------------------------------------------------- 1 | v14.16.0 -------------------------------------------------------------------------------- /gcn/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | // See http://go.microsoft.com/fwlink/?LinkId=827846 10 | // for the documentation about the extensions.json format 11 | "recommendations": [ 12 | "dbaeumer.vscode-eslint" 13 | ] 14 | } -------------------------------------------------------------------------------- /gcn/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | }, 9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 10 | "typescript.tsc.autoDetect": "off" 11 | } -------------------------------------------------------------------------------- /gcn/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | }, 19 | { 20 | "type": "npm", 21 | "script": "watch-tests", 22 | "problemMatcher": "$tsc-watch", 23 | "isBackground": true, 24 | "presentation": { 25 | "reveal": "never", 26 | "group": "watchers" 27 | }, 28 | "group": "build" 29 | }, 30 | { 31 | "label": "tasks: watch-tests", 32 | "dependsOn": [ 33 | "npm: watch-tests" 34 | ], 35 | "problemMatcher": [] 36 | }, 37 | { 38 | "label": "tasks: tests-ui-prerequisites", 39 | "type": "shell", 40 | "command": "node node_modules/vscode-extension-tester/out/cli.js get-vscode; node node_modules/vscode-extension-tester/out/cli.js get-chromedriver; npm run test-compile" 41 | }, 42 | { 43 | "label": "tasks: prepare-launcher", 44 | "type": "npm", 45 | "script": "prepare-launcher" 46 | }, 47 | { 48 | "label": "tasks: compile", 49 | "type": "npm", 50 | "script": "compile" 51 | }, 52 | { 53 | "label": "tasks: prepare-for-launch", 54 | "type": "shell", 55 | "dependsOrder": "sequence", 56 | "dependsOn": ["tasks: prepare-launcher", "tasks: compile"], 57 | "group": { 58 | "kind": "build", 59 | "isDefault": true 60 | } 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /gcn/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | node_modules/** 3 | out/** 4 | src/** 5 | .gitignore 6 | vsc-extension-quickstart.md 7 | webpack.config.js 8 | **/tsconfig*.json 9 | **/tslint.json 10 | **/*.map 11 | **/*.ts 12 | fixtures/** 13 | mochawesome-report/** 14 | test-resources/** 15 | -------------------------------------------------------------------------------- /gcn/download-launcher.mjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { fileURLToPath } from 'url'; 9 | import fs from "fs"; 10 | import https from "https"; 11 | import path from "path"; 12 | 13 | const defaultLauncherVersion = 'v4.7.3.2'; 14 | const defaultBucketUrl = 'https://objectstorage.us-phoenix-1.oraclecloud.com/n/oraclelabs/b/gcn-js-files'; 15 | 16 | const launcherVersion = process.env['GDK_LAUNCHER_VERSION'] || defaultLauncherVersion; 17 | const bucketURL = process.env['GDK_LAUNCHER_BUCKET_URL'] || defaultBucketUrl; 18 | 19 | const filename = "cloud.graal.gdk.ui.api-single.js"; 20 | const fileBucketPath = encodeURIComponent(`${launcherVersion}/${filename}`); 21 | 22 | const filePath= fileURLToPath(import.meta.url); 23 | const dirname = path.dirname(filePath); 24 | 25 | const fileUrl = `${bucketURL}/o/${fileBucketPath}`; 26 | const dest = path.join(dirname, 'lib', filename); 27 | 28 | if (fs.existsSync(dest)) { 29 | console.log("File already exist, skipping..."); 30 | } else { 31 | const libDir = path.join(dirname, 'lib'); 32 | if (!fs.existsSync(libDir)) { 33 | fs.mkdirSync(path.join(dirname, 'lib')); 34 | } 35 | const file = fs.createWriteStream(dest); 36 | console.log("Downloading file..."); 37 | https.get(fileUrl, (response) => { 38 | response.pipe(file); 39 | file.on("finish", () => { 40 | file.close(() => console.log("Download complete.")); 41 | }); 42 | }).on("error", (err) => { 43 | console.error(`Download failed: ${err.message}`); 44 | process.exit(1); 45 | }); 46 | } 47 | 48 | -------------------------------------------------------------------------------- /gcn/fixtures/project-structure/README.md: -------------------------------------------------------------------------------- 1 | # JSON specification 2 | 3 | This `.json` specification provides rules for `project-structure` testing suit. It is composed of two sections that test file/directory presence and regex matching of file contents. 4 | 5 | ## Section `structure` 6 | 7 | This section is used for testing the following: 8 | 9 | 1. File/Directory is present 10 | 2. File/Directory is absent 11 | 3. Given path is a Directory or a file 12 | 13 | The following snippet is a `.json` specification of rules that check if `gradlew` file is present and if `pom.xml` is absent. 14 | 15 | ```json 16 | { 17 | "structure": { 18 | "contains": [ 19 | { 20 | "path": "./gradlew", 21 | "type": "file" 22 | }, 23 | ], 24 | "-contains": [ 25 | { 26 | "path": "./pom.xml" 27 | } 28 | ] 29 | } 30 | } 31 | ``` 32 | 33 | ## Section `contents` 34 | 35 | This section is used for matching regex expression against file contents. For each given path the following is checked (in order given): 36 | 37 | 1. Path exists 38 | 2. Given path is a file 39 | 3. Regex matched to file contents 40 | 41 | The following snippet illustrates if the word `oraclecloud` is present in file `Application.java`: 42 | 43 | ```json 44 | { 45 | "contents": { 46 | "contains": [ 47 | { 48 | "path": "./oci/src/main/java/com/example/Application.java", 49 | "match": "oraclecloud" 50 | } 51 | ] 52 | } 53 | } 54 | ``` -------------------------------------------------------------------------------- /gcn/fixtures/project-structure/aws-proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "structure": { 3 | "contains": [ 4 | { 5 | "path": "./buildSrc", 6 | "type": "directory" 7 | }, 8 | { 9 | "path": "./settings.gradle", 10 | "type": "file" 11 | }, 12 | { 13 | "path": "./aws", 14 | "type": "directory" 15 | }, 16 | { 17 | "path": "./gradlew", 18 | "type": "file" 19 | }, 20 | { 21 | "path": "./lib", 22 | "type": "directory" 23 | } 24 | ], 25 | "-contains": [ 26 | { 27 | "path": "./oci" 28 | }, 29 | { 30 | "path": "./src" 31 | }, 32 | { 33 | "path": "./pom.xml" 34 | } 35 | ] 36 | } 37 | } -------------------------------------------------------------------------------- /gcn/fixtures/project-structure/base-example.json: -------------------------------------------------------------------------------- 1 | { 2 | "structure": { 3 | "contains": [ 4 | { 5 | "path": "./src", 6 | "type": "directory" 7 | }, 8 | { 9 | "path": "./gradle", 10 | "type": "directory" 11 | }, 12 | { 13 | "path": "./build.gradle", 14 | "type": "file" 15 | }, 16 | { 17 | "path": "./gradlew", 18 | "type": "file" 19 | }, 20 | { 21 | "path": "./README.md", 22 | "type": "file" 23 | }, 24 | { 25 | "path": "./LICENSE", 26 | "type": "file" 27 | }, 28 | { 29 | "path": "./settings.gradle", 30 | "type": "file" 31 | } 32 | ], 33 | "-contains": [ 34 | { 35 | "path": "./oci" 36 | } 37 | ] 38 | }, 39 | "contents": { 40 | "contains": [ 41 | { 42 | "path": "./src/main/java/com/example/Application.java", 43 | "match": "public class Application" 44 | } 45 | ] 46 | } 47 | } -------------------------------------------------------------------------------- /gcn/fixtures/project-structure/custom-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "structure": { 3 | "contains": [ 4 | { 5 | "path": "./buildSrc", 6 | "type": "directory" 7 | }, 8 | { 9 | "path": "./oci/src/main/java/com/example/Application.java", 10 | "type": "file" 11 | }, 12 | { 13 | "path": "./oci/src/main/java/com/example/LogController.java", 14 | "type": "file" 15 | }, 16 | { 17 | "path": "./oci/src/main/java/com/example/OciEmailController.java", 18 | "type": "file" 19 | }, 20 | { 21 | "path": "./oci/src/main/java/com/example/OciSessionProvider.java", 22 | "type": "file" 23 | }, 24 | { 25 | "path": "./aws/src/main/java/com/example/Application.java", 26 | "type": "file" 27 | }, 28 | { 29 | "path": "./aws/src/main/java/com/example/LogController.java", 30 | "type": "file" 31 | }, 32 | { 33 | "path": "./aws/src/main/java/com/example/MailController.java", 34 | "type": "file" 35 | } 36 | ] 37 | } 38 | } -------------------------------------------------------------------------------- /gcn/fixtures/project-structure/maven-basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "structure": { 3 | "contains": [ 4 | { 5 | "path": "./src", 6 | "type": "directory" 7 | }, 8 | { 9 | "path": "./pom.xml", 10 | "type": "file" 11 | }, 12 | { 13 | "path": "./mvnw", 14 | "type": "file" 15 | }, 16 | { 17 | "path": "./README.md", 18 | "type": "file" 19 | }, 20 | { 21 | "path": "./LICENSE", 22 | "type": "file" 23 | } 24 | ], 25 | "-contains": [ 26 | { 27 | "path": "./oci" 28 | }, 29 | { 30 | "path": "./build.gradle" 31 | }, 32 | { 33 | "path": "./gradle" 34 | } 35 | ] 36 | }, 37 | "contents": { 38 | "contains": [ 39 | { 40 | "path": "./src/main/java/com/example/Application.java", 41 | "match": "public class Application" 42 | } 43 | ] 44 | } 45 | } -------------------------------------------------------------------------------- /gcn/fixtures/project-structure/oci-proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "structure": { 3 | "contains": [ 4 | { 5 | "path": "./buildSrc", 6 | "type": "directory" 7 | }, 8 | { 9 | "path": "./settings.gradle", 10 | "type": "file" 11 | }, 12 | { 13 | "path": "./oci", 14 | "type": "directory" 15 | }, 16 | { 17 | "path": "./gradlew", 18 | "type": "file" 19 | }, 20 | { 21 | "path": "./lib", 22 | "type": "directory" 23 | } 24 | ], 25 | "-contains": [ 26 | { 27 | "path": "./aws" 28 | }, 29 | { 30 | "path": "./src" 31 | }, 32 | { 33 | "path": "./pom.xml" 34 | } 35 | ] 36 | } 37 | } -------------------------------------------------------------------------------- /gcn/images/GraalVM_icon_rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/gcn/images/GraalVM_icon_rgb.png -------------------------------------------------------------------------------- /gcn/images/experimental_features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/gcn/images/experimental_features.png -------------------------------------------------------------------------------- /gcn/images/gcn-vscode-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/gcn/images/gcn-vscode-actions.png -------------------------------------------------------------------------------- /gcn/images/install-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/gcn/images/install-tools.png -------------------------------------------------------------------------------- /gcn/src/browser/extension.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | import * as gcnProjectCreate from './gcnProjectCreateWeb'; 10 | import * as logUtils from '../../../common/lib/logUtils'; 11 | import { micronautProjectExists } from '../../../common/lib/utils'; 12 | import { checkGCNExtensions } from '../../../common/lib/dialogs'; 13 | 14 | 15 | export function activate(context: vscode.ExtensionContext) { 16 | logUtils.registerExtensionForLogging(context); 17 | logUtils.logInfo('[extension] Activating extension'); 18 | 19 | context.subscriptions.push(vscode.commands.registerCommand('gdk.createGdkProject', () => gcnProjectCreate.createProject(context))); 20 | micronautProjectExists().then(exists => { 21 | if (exists) { 22 | checkGCNExtensions(context); 23 | } 24 | }); 25 | 26 | logUtils.logInfo('[extension] Extension successfully activated'); 27 | } 28 | -------------------------------------------------------------------------------- /gcn/src/extension.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | import * as gcnProjectCreate from './gcnProjectCreate'; 10 | import * as logUtils from '../../common/lib/logUtils'; 11 | import { micronautProjectExists } from '../../common/lib/utils'; 12 | import { checkGCNExtensions } from '../../common/lib/dialogs'; 13 | 14 | 15 | export function activate(context: vscode.ExtensionContext) { 16 | logUtils.registerExtensionForLogging(context); 17 | logUtils.logInfo('[extension] Activating extension'); 18 | 19 | context.subscriptions.push(vscode.commands.registerCommand('gdk.createGdkProject', () => gcnProjectCreate.createProject(context))); 20 | context.subscriptions.push(vscode.commands.registerCommand('gcn.createGcnProject', () => gcnProjectCreate.createProject(context))); 21 | micronautProjectExists().then(exists => { 22 | if (exists) { 23 | checkGCNExtensions(context); 24 | } 25 | }); 26 | 27 | logUtils.logInfo('[extension] Extension successfully activated'); 28 | } 29 | -------------------------------------------------------------------------------- /gcn/src/test/suite/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as path from 'path'; 9 | import * as Mocha from 'mocha'; 10 | import * as glob from 'glob'; 11 | 12 | export function run(): Promise { 13 | // Create the mocha test 14 | const mocha = new Mocha({ 15 | ui: 'tdd', 16 | color: true, 17 | reporter: "mochawesome" 18 | }); 19 | 20 | const testsRoot = path.resolve(__dirname, '..'); 21 | 22 | return new Promise((c, e) => { 23 | glob('**/**.test.js', { cwd: testsRoot }, (err, files) => { 24 | if (err) { 25 | return e(err); 26 | } 27 | 28 | // Add files to the test suite 29 | files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))); 30 | 31 | try { 32 | // Run the mocha test 33 | mocha.run(failures => { 34 | if (failures > 0) { 35 | e(new Error(`${failures} tests failed.`)); 36 | } else { 37 | c(); 38 | } 39 | }); 40 | } catch (err) { 41 | console.error(err); 42 | e(err); 43 | } 44 | }); 45 | }); 46 | } 47 | -------------------------------------------------------------------------------- /gcn/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "extends": "./tsconfig.json", 10 | "include": [ 11 | ".eslintrc.js", 12 | "**/*.ts", 13 | "webpack.config.js" 14 | ] 15 | } -------------------------------------------------------------------------------- /gcn/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "compilerOptions": { 10 | "allowJs": true, 11 | "module": "commonjs", 12 | "target": "es6", 13 | "outDir": "dist", 14 | "lib": [ 15 | "es6", "DOM" 16 | ], 17 | "sourceMap": true, 18 | "rootDir": "src", 19 | "allowSyntheticDefaultImports": true, 20 | /* Strict Type-Checking Option */ 21 | "strict": true, /* enable all strict type-checking options */ 22 | /* Additional Checks */ 23 | "noUnusedLocals": true, /* Report errors on unused locals. */ 24 | "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 25 | "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 26 | "noUnusedParameters": true, /* Report errors on unused parameters. */ 27 | // Pick types from our module and not from common/node_modules 28 | "baseUrl": ".", 29 | "paths": { 30 | "vscode": ["node_modules/@types/vscode"] 31 | } 32 | }, 33 | "include": [ 34 | "src/**/*" 35 | ], 36 | "exclude": [ 37 | "node_modules", 38 | "test-resources", 39 | ".vscode-test" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /graal-cloud-native-pack/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /graal-cloud-native-pack/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## Version 0.0.8 4 | * Dependency updated 5 | 6 | ## Version 0.0.7 7 | * Rebranding to Graal Development Kit for Micronaut 8 | * GitHub repo name updated 9 | 10 | ## Version 0.0.5 11 | * Open sourcing changes 12 | 13 | ## Version 0.0.4 14 | * Database Drivers extension removed 15 | 16 | ## Version 0.0.3 17 | * Micronaut extension added 18 | * Documentation updated 19 | 20 | ## Version 0.0.2 21 | * Documentation improvements 22 | 23 | ## Version 0.0.1 24 | * Initial release published on Visual Studio Marketplace -------------------------------------------------------------------------------- /graal-cloud-native-pack/GraalVM_icon_rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/graal-cloud-native-pack/GraalVM_icon_rgb.png -------------------------------------------------------------------------------- /graal-cloud-native-pack/vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension Pack 2 | 3 | ## What's in the folder 4 | 5 | * This folder contains all of the files necessary for your extension pack. 6 | * `package.json` - this is the manifest file that defines the list of extensions of the extension pack. 7 | 8 | ## Get up and running straight away 9 | 10 | * Press `F5` to open a new window with your extension loaded. 11 | * Open `Extensions Viewlet` and check your extensions are installed. 12 | 13 | ## Make changes 14 | 15 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 16 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 17 | 18 | ## Install your extension 19 | 20 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 21 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 22 | -------------------------------------------------------------------------------- /micronaut-tools/.gitignore: -------------------------------------------------------------------------------- 1 | **/target 2 | agent 3 | server 4 | 5 | # Ignore built database drivers 6 | nbcode 7 | 8 | # Ignore NB IDE custom files 9 | buildagent/nbactions.xml 10 | buildagent/nb-configuration.xml 11 | buildagent/nbproject 12 | 13 | # Ignore POM processing byproducts 14 | buildagent/dependency-reduced-pom.xml 15 | 16 | buildagent/bin 17 | buildagent/**/.project 18 | buildagent/**/.settings 19 | buildagent/**/.classpath 20 | buildagent/**/.factorypath 21 | 22 | jdtls.ext/**/.settings 23 | -------------------------------------------------------------------------------- /micronaut-tools/.nvmrc: -------------------------------------------------------------------------------- 1 | v14.16.0 -------------------------------------------------------------------------------- /micronaut-tools/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dbaeumer.vscode-eslint" 6 | "yaozheng.vscode-pde" 7 | ] 8 | } -------------------------------------------------------------------------------- /micronaut-tools/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "type": "java", 10 | "name": "Attach to Plugin", 11 | "request": "attach", 12 | "hostName": "localhost", 13 | "port": 1044, 14 | "projectName": "com.oracle.jdtls.ext.core" 15 | }, 16 | { 17 | "name": "Run Extension", 18 | "type": "extensionHost", 19 | "request": "launch", 20 | "runtimeExecutable": "${execPath}", 21 | "args": [ 22 | "--extensionDevelopmentPath=${workspaceFolder}" 23 | ], 24 | "env": { 25 | "DEBUG_VSCODE_JAVA":"true" 26 | }, 27 | "outFiles": [ 28 | "${workspaceFolder}/out/**/*.js", 29 | "${workspaceFolder}/dist/**/*.js" 30 | ], 31 | "preLaunchTask": "npm: compile" 32 | }, 33 | { 34 | "name": "Extension Tests", 35 | "type": "extensionHost", 36 | "request": "launch", 37 | "runtimeExecutable": "${execPath}", 38 | "args": [ 39 | "--extensionDevelopmentPath=${workspaceFolder}", 40 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" 41 | ], 42 | "outFiles": [ 43 | "${workspaceFolder}/out/test/**/*.js" 44 | ], 45 | "preLaunchTask": "npm: watch" 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /micronaut-tools/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | }, 9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 10 | "typescript.tsc.autoDetect": "off" 11 | } -------------------------------------------------------------------------------- /micronaut-tools/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /micronaut-tools/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | node_modules/** 4 | out/test/** 5 | src/** 6 | .gitignore 7 | vsc-extension-quickstart.md 8 | **/tsconfig*.json 9 | **/tslint.json 10 | **/*.map 11 | **/*.ts 12 | 13 | jdtls.ext 14 | scripts 15 | buildagent 16 | # Ignore output of code sign 17 | server/*.md 18 | mochawesome-report/** 19 | 20 | # Include @vscode/codicons from node_modules 21 | !node_modules/@vscode/codicons/** -------------------------------------------------------------------------------- /micronaut-tools/buildagent/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/buildagent/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /micronaut-tools/buildagent/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/continuations.cmdfile: -------------------------------------------------------------------------------- 1 | Continuation_\ 2 | without_whitespaces 3 | Continuation_\ 4 | from_start 5 | Continuation\ 6 | \ with_whitespaces 7 | "String Continuation \ 8 | without whitespaces" 9 | "String Continuation \ 10 | from start" 11 | "String Continuation \ 12 | \ with whitespaces" 13 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/continuations.golden: -------------------------------------------------------------------------------- 1 | Continuation_without_whitespaces 2 | Continuation_from_start 3 | Continuation 4 | with_whitespaces 5 | String Continuation without whitespaces 6 | String Continuation from start 7 | String Continuation with whitespaces 8 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/multiModuleBuildSubproject.golden: -------------------------------------------------------------------------------- 1 | -DskipTests 2 | --also-make 3 | --projects 4 | main 5 | install 6 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/noWrapperLaunch.golden: -------------------------------------------------------------------------------- 1 | -Dexec.executable=/ext/redhat.java-1.19.0-linux-x64/jre/17.0.7-linux-x86_64/bin/java 2 | -Dexec.args=-XX:+ShowCodeDetailsInExceptionMessages --class-path %classpath ${exec.mainClass} normal "arg space" "arg\"quote" 3 | -Dexec.mainClass=com.example.Main 4 | org.codehaus.mojo:exec-maven-plugin:3.1.0:exec 5 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: cli 2 | defaultPackage: com.example 3 | testFramework: junit 4 | sourceLanguage: java 5 | buildTool: maven 6 | features: [app-name, jackson-databind, java, junit, logback, maven, picocli, picocli-java-application, picocli-junit, readme, shade, yaml] 7 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/src/main/java/com/example/DemoCommand.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import io.micronaut.configuration.picocli.PicocliRunner; 4 | import io.micronaut.context.ApplicationContext; 5 | 6 | import picocli.CommandLine; 7 | import picocli.CommandLine.Command; 8 | import picocli.CommandLine.Option; 9 | import picocli.CommandLine.Parameters; 10 | 11 | @Command(name = "demo", description = "...", 12 | mixinStandardHelpOptions = true) 13 | public class DemoCommand implements Runnable { 14 | 15 | @Option(names = {"-v", "--verbose"}, description = "...") 16 | boolean verbose; 17 | 18 | public static void main(String[] args) throws Exception { 19 | PicocliRunner.run(DemoCommand.class, args); 20 | } 21 | 22 | public void run() { 23 | // business logic here 24 | if (verbose) { 25 | System.out.println("Hi!"); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | micronaut: 2 | application: 3 | name: demo 4 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 7 | 8 | %cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/maven/src/test/java/com/example/DemoCommandTest.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import io.micronaut.configuration.picocli.PicocliRunner; 4 | import io.micronaut.context.ApplicationContext; 5 | import io.micronaut.context.env.Environment; 6 | 7 | import java.io.ByteArrayOutputStream; 8 | import java.io.PrintStream; 9 | import org.junit.jupiter.api.Test; 10 | 11 | import static org.junit.jupiter.api.Assertions.assertTrue; 12 | 13 | public class DemoCommandTest { 14 | 15 | @Test 16 | public void testWithCommandLineOption() throws Exception { 17 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 18 | System.setOut(new PrintStream(baos)); 19 | 20 | try (ApplicationContext ctx = ApplicationContext.run(Environment.CLI, Environment.TEST)) { 21 | String[] args = new String[] { "-v" }; 22 | PicocliRunner.run(DemoCommand.class, ctx, args); 23 | 24 | // demo 25 | assertTrue(baos.toString().contains("Hi!")); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: cli 2 | defaultPackage: com.example 3 | testFramework: junit 4 | sourceLanguage: java 5 | buildTool: maven 6 | features: [app-name, jackson-databind, java, junit, logback, maven, picocli, picocli-java-application, picocli-junit, readme, shade, yaml] 7 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/src/main/java/com/example/DemoCommand.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import io.micronaut.configuration.picocli.PicocliRunner; 4 | import io.micronaut.context.ApplicationContext; 5 | 6 | import picocli.CommandLine; 7 | import picocli.CommandLine.Command; 8 | import picocli.CommandLine.Option; 9 | import picocli.CommandLine.Parameters; 10 | 11 | @Command(name = "demo", description = "...", 12 | mixinStandardHelpOptions = true) 13 | public class DemoCommand implements Runnable { 14 | 15 | @Option(names = {"-v", "--verbose"}, description = "...") 16 | boolean verbose; 17 | 18 | public static void main(String[] args) throws Exception { 19 | PicocliRunner.run(DemoCommand.class, args); 20 | } 21 | 22 | public void run() { 23 | // business logic here 24 | if (verbose) { 25 | System.out.println("Hi!"); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | micronaut: 2 | application: 3 | name: demo 4 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 7 | 8 | %cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/mavenNoWrapper/src/test/java/com/example/DemoCommandTest.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import io.micronaut.configuration.picocli.PicocliRunner; 4 | import io.micronaut.context.ApplicationContext; 5 | import io.micronaut.context.env.Environment; 6 | 7 | import java.io.ByteArrayOutputStream; 8 | import java.io.PrintStream; 9 | import org.junit.jupiter.api.Test; 10 | 11 | import static org.junit.jupiter.api.Assertions.assertTrue; 12 | 13 | public class DemoCommandTest { 14 | 15 | @Test 16 | public void testWithCommandLineOption() throws Exception { 17 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 18 | System.setOut(new PrintStream(baos)); 19 | 20 | try (ApplicationContext ctx = ApplicationContext.run(Environment.CLI, Environment.TEST)) { 21 | String[] args = new String[] { "-v" }; 22 | PicocliRunner.run(DemoCommand.class, ctx, args); 23 | 24 | // demo 25 | assertTrue(baos.toString().contains("Hi!")); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/lib/src/main/java/com/example/domain/Genre.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023, Oracle. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | package com.example.domain; 4 | 5 | import io.micronaut.data.annotation.GeneratedValue; 6 | import io.micronaut.data.annotation.Id; 7 | import io.micronaut.data.annotation.MappedEntity; 8 | 9 | import javax.validation.constraints.NotNull; 10 | 11 | @MappedEntity 12 | public class Genre { 13 | 14 | @Id 15 | @GeneratedValue 16 | private Long id; 17 | 18 | @NotNull 19 | private String name; 20 | 21 | public Long getId() { 22 | return id; 23 | } 24 | 25 | public void setId(Long id) { 26 | this.id = id; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "Genre{" + "id=" + id + ", name='" + name + "'}"; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/lib/src/main/java/com/example/repository/GenreRepository.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023, Oracle. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | package com.example.repository; 4 | 5 | import com.example.domain.Genre; 6 | import io.micronaut.core.annotation.NonNull; 7 | import io.micronaut.data.annotation.Id; 8 | import io.micronaut.data.jdbc.annotation.JdbcRepository; 9 | import io.micronaut.data.repository.PageableRepository; 10 | 11 | import javax.validation.constraints.NotBlank; 12 | 13 | import static io.micronaut.data.model.query.builder.sql.Dialect.MYSQL; 14 | 15 | @JdbcRepository(dialect = MYSQL) 16 | public interface GenreRepository extends PageableRepository { 17 | 18 | Genre save(@NonNull @NotBlank String name); 19 | 20 | long update(@Id long id, @NonNull @NotBlank String name); 21 | } 22 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/lib/src/main/java/com/example/service/GenreService.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023, Oracle. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | package com.example.service; 4 | 5 | import com.example.domain.Genre; 6 | import com.example.repository.GenreRepository; 7 | import io.micronaut.data.model.Pageable; 8 | import jakarta.inject.Singleton; 9 | 10 | import javax.transaction.Transactional; 11 | import java.util.List; 12 | import java.util.Optional; 13 | 14 | @Singleton 15 | public class GenreService { 16 | 17 | private final GenreRepository genreRepository; 18 | 19 | GenreService(GenreRepository genreRepository) { 20 | this.genreRepository = genreRepository; 21 | } 22 | 23 | public Optional findById(Long id) { 24 | return genreRepository.findById(id); 25 | } 26 | 27 | @Transactional 28 | public long update(long id, String name) { 29 | return genreRepository.update(id, name); 30 | } 31 | 32 | public List list(Pageable pageable) { 33 | return genreRepository.findAll(pageable).getContent(); 34 | } 35 | 36 | @Transactional 37 | public Genre save(String name) { 38 | return genreRepository.save(name); 39 | } 40 | 41 | @Transactional 42 | public void delete(long id) { 43 | genreRepository.deleteById(id); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/lib/src/main/resources/META-INF/native-image/resource-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": 3 | [ 4 | { "pattern": "db/migration/.*sql$" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/lib/src/main/resources/db/migration/V1__schema.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS genre; 2 | 3 | CREATE TABLE genre ( 4 | id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, 5 | name VARCHAR(255) NOT NULL UNIQUE 6 | ); 7 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/main/src/main/java/com/example/Application.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023, Oracle. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | package com.example; 4 | 5 | import io.micronaut.core.annotation.NonNull; 6 | 7 | import java.util.Arrays; 8 | 9 | import io.micronaut.context.ApplicationContextBuilder; 10 | import io.micronaut.context.ApplicationContextConfigurer; 11 | import io.micronaut.context.annotation.ContextConfigurer; 12 | import io.micronaut.runtime.Micronaut; 13 | 14 | public class Application { 15 | 16 | @ContextConfigurer 17 | public static class Configurer implements ApplicationContextConfigurer { 18 | @Override 19 | public void configure(@NonNull ApplicationContextBuilder builder) { 20 | builder.defaultEnvironments("oraclecloud"); 21 | } 22 | } 23 | public static void main(String[] args) { 24 | System.err.println("Commandline arguments: " + Arrays.asList(args)); 25 | Micronaut.run(Application.class, args); 26 | } 27 | } -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/main/src/main/java/com/example/Main.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import io.micronaut.runtime.Micronaut; 4 | 5 | public class Main { 6 | 7 | public static void main(String[] args) { 8 | Micronaut.run(Application.class, args); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/main/src/main/resources/application-oraclecloud.yml: -------------------------------------------------------------------------------- 1 | micronaut: 2 | application: 3 | name: oci 4 | datasources: 5 | default: 6 | driver-class-name: com.mysql.cj.jdbc.Driver 7 | db-type: mysql 8 | dialect: MYSQL 9 | netty: 10 | default: 11 | allocator: 12 | max-order: 3 13 | flyway: 14 | datasources: 15 | default: 16 | enabled: true 17 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/main/src/main/resources/bootstrap-oraclecloud.yml: -------------------------------------------------------------------------------- 1 | # Place application configuration here -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/main/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 7 | 8 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/main/src/test/java/com/example/OciTest.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023, Oracle. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | package com.example; 4 | 5 | import io.micronaut.runtime.EmbeddedApplication; 6 | import io.micronaut.test.extensions.junit5.annotation.MicronautTest; 7 | import org.junit.jupiter.api.Test; 8 | import org.junit.jupiter.api.Assertions; 9 | 10 | import jakarta.inject.Inject; 11 | 12 | @MicronautTest 13 | class OciTest { 14 | 15 | @Inject 16 | EmbeddedApplication application; 17 | 18 | @Test 19 | void testItWorks() { 20 | Assertions.assertTrue(application.isRunning()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/main/src/test/resources/application-test.yml: -------------------------------------------------------------------------------- 1 | flyway: 2 | datasources: 3 | default: 4 | enabled: true 5 | datasources: 6 | default: 7 | schema-generate: NONE 8 | dialect: MYSQL 9 | driver-class-name: com.mysql.cj.jdbc.Driver 10 | db-type: mysql 11 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: cli 2 | defaultPackage: com.example 3 | testFramework: junit 4 | sourceLanguage: java 5 | buildTool: maven 6 | features: [app-name, jackson-databind, java, junit, logback, maven, picocli, picocli-java-application, picocli-junit, readme, shade, yaml] 7 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/projects/multi/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 4.0.0 9 | 10 | io.micronaut 11 | micronaut-parent 12 | 3.8.5 13 | 14 | demo-maven-parent 15 | 1.0-SNAPSHOT 16 | com.example 17 | demo11 18 | pom 19 | 20 | 21 | lib 22 | main 23 | 24 | 25 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/quotedAndUnquoted.cmdfile: -------------------------------------------------------------------------------- 1 | first "second and third" fourth "fifth"",sixth" seventh "" "eighth" ninth "trailing space " " leading space" -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/quotedAndUnquoted.golden: -------------------------------------------------------------------------------- 1 | first 2 | second and third 3 | fourth 4 | fifth,sixth 5 | seventh 6 | 7 | eighth 8 | ninth 9 | trailing space 10 | leading space 11 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/quotedEscape.cmdfile: -------------------------------------------------------------------------------- 1 | "\quote\tand\ntab" 2 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/quotedEscape.golden: -------------------------------------------------------------------------------- 1 | quote\tand\ntab 2 | -------------------------------------------------------------------------------- /micronaut-tools/buildagent/src/test/resources/com/oracle/jdtls/ext/launcher/wrapperLaunch.golden: -------------------------------------------------------------------------------- 1 | -Dexec.executable=/ext/redhat.java-1.19.0-linux-x64/jre/17.0.7-linux-x86_64/bin/java 2 | -Dexec.args=-XX:+ShowCodeDetailsInExceptionMessages --class-path %classpath ${exec.mainClass} normal "arg space" "arg\"quote" 3 | -Dexec.mainClass=com.example.Main 4 | org.codehaus.mojo:exec-maven-plugin:3.1.0:exec 5 | -------------------------------------------------------------------------------- /micronaut-tools/images/add_to_oci_vault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/add_to_oci_vault.png -------------------------------------------------------------------------------- /micronaut-tools/images/applications-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/applications-view.png -------------------------------------------------------------------------------- /micronaut-tools/images/beans_endpoints_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/beans_endpoints_view.png -------------------------------------------------------------------------------- /micronaut-tools/images/build_and_run_container_image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/build_and_run_container_image.gif -------------------------------------------------------------------------------- /micronaut-tools/images/clear_all_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/clear_all_results.png -------------------------------------------------------------------------------- /micronaut-tools/images/cloud_assets_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/cloud_assets_panel.png -------------------------------------------------------------------------------- /micronaut-tools/images/compose_rest_query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/compose_rest_query.png -------------------------------------------------------------------------------- /micronaut-tools/images/controller-source-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/controller-source-actions.png -------------------------------------------------------------------------------- /micronaut-tools/images/create-controllers.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/create-controllers.gif -------------------------------------------------------------------------------- /micronaut-tools/images/create-entities.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/create-entities.gif -------------------------------------------------------------------------------- /micronaut-tools/images/create-repositories.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/create-repositories.gif -------------------------------------------------------------------------------- /micronaut-tools/images/create_external_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/create_external_config.png -------------------------------------------------------------------------------- /micronaut-tools/images/create_external_config_choose_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/create_external_config_choose_target.png -------------------------------------------------------------------------------- /micronaut-tools/images/create_oci_policies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/create_oci_policies.png -------------------------------------------------------------------------------- /micronaut-tools/images/debug_main_method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/debug_main_method.png -------------------------------------------------------------------------------- /micronaut-tools/images/debugee_timeout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/debugee_timeout.png -------------------------------------------------------------------------------- /micronaut-tools/images/micronaut-build-commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/micronaut-build-commands.png -------------------------------------------------------------------------------- /micronaut-tools/images/micronaut-expression-language.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/micronaut-expression-language.png -------------------------------------------------------------------------------- /micronaut-tools/images/micronaut-navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/micronaut-navigation.png -------------------------------------------------------------------------------- /micronaut-tools/images/micronaut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/micronaut.png -------------------------------------------------------------------------------- /micronaut-tools/images/run-continuous-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/run-continuous-config.png -------------------------------------------------------------------------------- /micronaut-tools/images/run-continuous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/run-continuous.png -------------------------------------------------------------------------------- /micronaut-tools/images/run_main_method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/run_main_method.png -------------------------------------------------------------------------------- /micronaut-tools/images/run_tests_parallel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/run_tests_parallel.gif -------------------------------------------------------------------------------- /micronaut-tools/images/run_tests_parallel_shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/run_tests_parallel_shortcut.png -------------------------------------------------------------------------------- /micronaut-tools/images/ssh_to_compute_instance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/ssh_to_compute_instance.png -------------------------------------------------------------------------------- /micronaut-tools/images/test_case_click.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/images/test_case_click.gif -------------------------------------------------------------------------------- /micronaut-tools/javaConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ 3 | "./jdtls.ext/com.oracle.jdtls.ext.core" 4 | ], 5 | "targetPlatform": "./jdtls.ext/com.oracle.jdtls.ext.target/com.oracle.jdtls.ext.tp.target" 6 | } 7 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/jdtls.ext/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jdtls-ext-parent 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | 19 | 1686132715187 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.oracle.jdtls.ext.core 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.m2e.core.maven2Builder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.m2e.core.maven2Nature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.jdt.core.javanature 33 | 34 | 35 | 36 | 1665551209562 37 | 38 | 30 39 | 40 | org.eclipse.core.resources.regexFilterMatcher 41 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 4 | org.eclipse.jdt.core.compiler.compliance=11 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.release=disabled 8 | org.eclipse.jdt.core.compiler.source=11 9 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: JDTLS EXT Test 4 | Bundle-SymbolicName: com.oracle.jdtls.ext.core;singleton:=true 5 | Bundle-Version: 0.1.0 6 | Bundle-Activator: com.oracle.jdtls.ext.core.JdtlsExtActivator 7 | Bundle-RequiredExecutionEnvironment: JavaSE-11 8 | Bundle-ActivationPolicy: lazy 9 | Import-Package: org.eclipse.jdt.core, 10 | org.eclipse.jdt.launching, 11 | org.osgi.framework;version="1.3.0" 12 | Require-Bundle: org.eclipse.core.runtime, 13 | org.eclipse.jdt.ls.core, 14 | org.eclipse.jdt.core, 15 | org.eclipse.core.resources, 16 | org.eclipse.lsp4j.jsonrpc, 17 | org.eclipse.lsp4j, 18 | org.eclipse.m2e.core, 19 | org.eclipse.m2e.maven.runtime, 20 | org.eclipse.buildship.core, 21 | org.eclipse.xtext.xbase.lib, 22 | org.apache.commons.lang3, 23 | com.google.gson 24 | Bundle-ClassPath: . 25 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | output.. = bin/ 3 | bin.includes = META-INF/,\ 4 | .,\ 5 | plugin.xml 6 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.oracle.jdtls.ext 7 | jdtls-ext-parent 8 | 0.1.0 9 | 10 | com.oracle.jdtls.ext.core 11 | com.oracle.jdtls.ext 12 | eclipse-plugin 13 | ${base.name} :: JDTLS Ext Plugin 14 | 15 | 16 | 17 | 18 | 19 | org.apache.maven.plugins 20 | maven-checkstyle-plugin 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.core/src/com/oracle/jdtls/ext/core/CommandHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.jdtls.ext.core; 8 | 9 | import java.util.List; 10 | 11 | import org.apache.commons.lang3.StringUtils; 12 | import org.eclipse.core.runtime.IProgressMonitor; 13 | import org.eclipse.jdt.ls.core.internal.IDelegateCommandHandler; 14 | 15 | public class CommandHandler implements IDelegateCommandHandler { 16 | 17 | @Override 18 | public Object executeCommand(String commandId, List arguments, IProgressMonitor monitor) throws Exception { 19 | if (!StringUtils.isBlank(commandId)) { 20 | switch (commandId) { 21 | case "extension.micronaut-tools.java.codeLens": 22 | return JavaCodeLens.collect(arguments, monitor); 23 | case "extension.micronaut-tools.java.project.type": 24 | // see FindProjectTypeParams & FindProjectTypeResult. 25 | return JavaCodeLens.findProjectType(arguments, monitor); 26 | default: 27 | break; 28 | } 29 | } 30 | throw new UnsupportedOperationException(String.format("Not supported commandId: '%s'.", commandId)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.target/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.oracle.jdtls.ext.tp 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | 19 | 1686132715184 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /micronaut-tools/jdtls.ext/com.oracle.jdtls.ext.target/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | com.oracle.jdtls.ext 6 | jdtls-ext-parent 7 | 0.1.0 8 | 9 | com.oracle.jdtls.ext.tp 10 | com.oracle.jdtls.ext 11 | ${base.name} :: Target Platform 12 | eclipse-target-definition 13 | 14 | -------------------------------------------------------------------------------- /micronaut-tools/mexp-language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "brackets": [ 3 | ["[", "]"], 4 | ["(", ")"] 5 | ], 6 | "autoClosingPairs": [ 7 | { "open": "[", "close": "]" }, 8 | { "open": "(", "close": ")" }, 9 | { "open": "'", "close": "'", "notIn": ["string"] } 10 | ], 11 | "surroundingPairs": [ 12 | ["[", "]"], 13 | ["(", ")"], 14 | ["'", "'"] 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /micronaut-tools/resources/launch-wrappers/launcher.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem 3 | rem Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 4 | rem DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 | rem 6 | rem Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 7 | rem 8 | if "%JDT_LAUNCHWRAP_PROJECT_LAUNCHER%" == "" ( 9 | SET "DIR=%~dp0" 10 | SET "LAUNCHER_DIR=%DIR%..\..\agent" 11 | ) else ( 12 | SET "LAUNCHER_DIR=%JDT_LAUNCHWRAP_PROJECT_LAUNCHER%" 13 | ) 14 | SET "JAVACMD=%1" 15 | rem echo "Commandline is: %*" 16 | 17 | rem DEBUG=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5011 18 | 19 | %JAVACMD% -jar "%LAUNCHER_DIR%\build-agent-0.1.0.jar" %* 20 | -------------------------------------------------------------------------------- /micronaut-tools/resources/launch-wrappers/launcher.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 4 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 | # 6 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 7 | # 8 | if [ -n "$JDT_LAUNCHWRAP_PROJECT_LAUNCHER" ] ; then 9 | LAUNCHER_DIR="$JDT_LAUNCHWRAP_PROJECT_LAUNCHER" 10 | else 11 | DIR="$(dirname "$(readlink -f "$0")")" 12 | LAUNCHER_DIR="$DIR/../../agent" 13 | fi 14 | export JAVACMD="$1" 15 | 16 | echo "Commandline is: $@" 17 | 18 | #DEBUG=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5011 19 | "$JAVACMD" $DEBUG -jar "$LAUNCHER_DIR/build-agent-0.1.0.jar" "$@" 20 | -------------------------------------------------------------------------------- /micronaut-tools/scripts/buildJdtlsExt.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | const cp = require('child_process'); 9 | const fse = require('fs-extra'); 10 | const path = require('path'); 11 | 12 | const server_dir = path.resolve('jdtls.ext'); 13 | const build_agent = path.resolve('buildagent'); 14 | 15 | fse.mkdirSync(path.resolve('agent'), { recursive: true }); 16 | 17 | cp.execSync(mvnw()+ ' clean package', {cwd:server_dir, stdio:[0,1,2]} ); 18 | copy(path.join(server_dir, 'com.oracle.jdtls.ext.core/target'), path.resolve('server'), (file) => { 19 | return /^com.oracle.jdtls.ext.core.*.jar$/.test(file); 20 | }); 21 | 22 | cp.execSync(mvnw()+ ' -DskipTests clean package', {cwd:build_agent, stdio:[0,1,2]} ); 23 | copy(path.join(build_agent, 'target'), path.resolve('agent'), (file) => { 24 | return /^build-agent-.*\.jar$/.test(file); 25 | }); 26 | 27 | function copy(sourceFolder, targetFolder, fileFilter) { 28 | const jars = fse.readdirSync(sourceFolder).filter(file => fileFilter(file)); 29 | fse.ensureDirSync(targetFolder); 30 | for (const jar of jars) { 31 | fse.copyFileSync(path.join(sourceFolder, jar), path.join(targetFolder, path.basename(jar))); 32 | } 33 | } 34 | 35 | function isWin() { 36 | return /^win/.test(process.platform); 37 | } 38 | 39 | function mvnw() { 40 | return isWin()?"mvnw.cmd":"./mvnw"; 41 | } 42 | -------------------------------------------------------------------------------- /micronaut-tools/src/database/dbsupport.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from 'vscode'; 2 | import { registerDatabases } from './database-drivers'; 3 | 4 | export function activate(context: vscode.ExtensionContext) { 5 | const odtEnabledCheck = () => 6 | vscode.commands.executeCommand('setContext', 'odt.extension.enabled', vscode.extensions.getExtension('oracle.oracledevtools') !== undefined); 7 | odtEnabledCheck(); 8 | context.subscriptions.push(vscode.extensions.onDidChange(odtEnabledCheck)); 9 | context.subscriptions.push(vscode.commands.registerCommand( 10 | "extension.micronaut-tools.database.register", (dbNode) => { 11 | registerDatabases(dbNode); 12 | })); 13 | } 14 | 15 | export function deactivate() { } 16 | -------------------------------------------------------------------------------- /micronaut-tools/src/database/typeUtils.ts: -------------------------------------------------------------------------------- 1 | export function isBoolean(obj: unknown): obj is boolean { 2 | return typeof obj === 'boolean'; 3 | } 4 | 5 | export function isNumber(obj: unknown): obj is number { 6 | return typeof obj === 'number'; 7 | } 8 | 9 | export function isString(obj: unknown): obj is string { 10 | return typeof obj === 'string'; 11 | } 12 | 13 | export function isObject(obj: unknown): obj is object { 14 | return obj !== null && typeof obj === 'object'; 15 | } 16 | 17 | export function isInIs( 18 | field: K, 19 | obj: object, 20 | typeTest: (obj: unknown) => obj is T, 21 | required?: R 22 | ): obj is R extends true ? { [P in K]: T } : { [P in K]?: T } { 23 | return field in obj ? typeTest((obj as any)[field]) : !required; 24 | } 25 | 26 | export function isTypeArray(obj: unknown, typeTest: (obj: unknown) => obj is T): obj is T[] { 27 | return Array.isArray(obj) && (obj.length === 0 || obj.every(typeTest)); 28 | } -------------------------------------------------------------------------------- /micronaut-tools/src/kubernetes/kubernetesChannel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from "vscode"; 9 | 10 | 11 | class KubernetesChannel { 12 | private readonly channel: vscode.OutputChannel = vscode.window.createOutputChannel("Kubernetes"); 13 | 14 | public appendLine(value: string) { 15 | this.channel.appendLine(value); 16 | } 17 | 18 | public clearAndShow() { 19 | this.channel.clear(); 20 | this.channel.show(); 21 | } 22 | } 23 | 24 | export const kubernetesChannel = new KubernetesChannel(); 25 | -------------------------------------------------------------------------------- /micronaut-tools/src/launcher/launch.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | import { resolveConfigurationAsync } from './projectLaunchSupport'; 10 | 11 | export async function launch(extensionPath : string, uriString: string, _noDebug: boolean) { 12 | const uri = uriString ? vscode.Uri.parse(uriString) : vscode.window.activeTextEditor?.document?.uri; 13 | if (!uri) { 14 | return false; 15 | } 16 | const workspaceFolder = vscode.workspace.getWorkspaceFolder(uri); 17 | if (workspaceFolder) { 18 | const launchConfig = { 19 | type: 'java', 20 | request: 'launch', 21 | noDebug: true, 22 | name: `Run Continuous`, 23 | env: { 24 | 'JDT_LAUNCHWRAP_MICRONAUT_CONTINUOUS': 'true' 25 | } 26 | }; 27 | try { 28 | return await vscode.debug.startDebugging(workspaceFolder, 29 | await resolveConfigurationAsync(uri, launchConfig, extensionPath)); 30 | } catch (err) { 31 | console.log(err); 32 | } 33 | } 34 | return false; 35 | } 36 | -------------------------------------------------------------------------------- /micronaut-tools/src/navigation/management/healthEndpoint.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as applications from '../applications'; 9 | import * as beanHandler from './beanHandler'; 10 | 11 | 12 | const SETTING_ENABLED_KEY = 'healthEndpointEnabled'; 13 | const RELATIVE_ADDRESS = '/health'; 14 | const DOWN_CODE = 503; 15 | 16 | export function forApplication(application: applications.Application) { 17 | return new HealthEndpoint(application); 18 | } 19 | 20 | export class HealthEndpoint extends beanHandler.UpdatableBeanHandler { 21 | 22 | constructor(application: applications.Application) { 23 | super(application, SETTING_ENABLED_KEY, RELATIVE_ADDRESS); 24 | } 25 | 26 | protected availableResp(response: { code: number | undefined; headers: any; data: any }): boolean { 27 | return super.availableResp(response) || response.code === DOWN_CODE; 28 | } 29 | 30 | protected async processResponse(response: { code: number | undefined; headers: any; data: any }) { 31 | // console.log('-------- HEALTH ---------------------') 32 | const data = JSON.parse(response.data); 33 | // console.log(data) 34 | this.notifyUpdated(data); 35 | } 36 | 37 | buildVmArgs(): string[] | undefined { 38 | // if (!this.isEnabled()) { 39 | // return undefined; 40 | // } 41 | return ['-Dendpoints.health.enabled=true', '-Dendpoints.health.sensitive=false', '-Dendpoints.health.details-visible=ANONYMOUS']; 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /micronaut-tools/src/test-matrix/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | interface Position { 9 | line: number; 10 | character: number; 11 | } 12 | interface Range { 13 | start: Position; 14 | end: Position; 15 | } 16 | 17 | export interface FilePosition { 18 | file?: string; 19 | range?: Range; 20 | } 21 | 22 | export type CurrentTestState = 'loaded' | 'started' | 'passed' | 'failed' | 'skipped' | 'errored' | 'enqueued'; 23 | 24 | export interface TestSuite extends TestState, FilePosition { 25 | name: string; 26 | moduleName?: string; 27 | modulePath?: string; 28 | tests?: TestCase[]; 29 | } 30 | 31 | export interface TestCase extends TestState, FilePosition { 32 | id: string; 33 | name: string; 34 | stackTrace?: string[]; 35 | } 36 | 37 | export interface ClickableState extends TestState, FilePosition { 38 | stringify: string; 39 | } 40 | 41 | export interface TestState { 42 | state: CurrentTestState; 43 | } 44 | 45 | export interface FlattenTestSuite { 46 | name: string; 47 | tests: FlattenTestCase[]; 48 | [key: string]: any; 49 | } 50 | 51 | export interface FlattenTestCase { 52 | name: string; 53 | [key: string]: any; 54 | } 55 | 56 | export interface ModuleWithVisibility { 57 | name: string; 58 | show: boolean; 59 | } -------------------------------------------------------------------------------- /micronaut-tools/syntaxes/mexp-injection.json: -------------------------------------------------------------------------------- 1 | { 2 | "injectionSelector": "L:source.java string", 3 | "scopeName": "inline.mexp", 4 | "patterns": [ 5 | { 6 | "begin": "#{", 7 | "beginCaptures": { 8 | "0": { 9 | "name": "punctuation.definition.mexp.begin" 10 | } 11 | }, 12 | "contentName": "meta.embedded.mexp", 13 | "end": "}", 14 | "endCaptures": { 15 | "0": { 16 | "name": "punctuation.definition.mexp.end" 17 | } 18 | }, 19 | "patterns": [ 20 | { 21 | "include": "source.mexp" 22 | } 23 | ] 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /micronaut-tools/templates/deploy.yaml.handlebars: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | # Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | ##################################################################### 7 | 8 | apiVersion: apps/v1 9 | kind: Deployment 10 | metadata: 11 | name: "{{name}}" 12 | namespace: "{{namespace}}" 13 | spec: 14 | selector: 15 | matchLabels: 16 | app: "{{name}}" 17 | template: 18 | metadata: 19 | labels: 20 | app: "{{name}}" 21 | spec: 22 | {{#dockerSecret}} 23 | imagePullSecrets: 24 | - name: {{dockerSecret}} 25 | {{/dockerSecret}} 26 | containers: 27 | - name: "{{name}}" 28 | image: "{{{image}}}" 29 | env: 30 | - name: MICRONAUT_SERVER_PORT 31 | value: "8080" 32 | resources: 33 | limits: 34 | cpu: "1" 35 | memory: "2048Mi" 36 | ports: 37 | - name: http 38 | containerPort: 8080 39 | # readinessProbe: 40 | # httpGet: 41 | # path: /health/readiness 42 | # port: 8080 43 | # initialDelaySeconds: 5 44 | # timeoutSeconds: 3 45 | # livenessProbe: 46 | # httpGet: 47 | # path: /health/liveness 48 | # port: 8080 49 | # initialDelaySeconds: 5 50 | # timeoutSeconds: 3 51 | # failureThreshold: 10 52 | 53 | 54 | -------------------------------------------------------------------------------- /micronaut-tools/templates/service.yaml.handlebars: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | # Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | ##################################################################### 7 | 8 | apiVersion: v1 9 | kind: Service 10 | metadata: 11 | name: "{{name}}" 12 | labels: 13 | app: "{{name}}" 14 | spec: 15 | ports: 16 | - port: 8080 17 | name: service 18 | targetPort: 8080 19 | protocol: TCP 20 | selector: 21 | app: "{{name}}" 22 | type: NodePort 23 | -------------------------------------------------------------------------------- /micronaut-tools/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "extends": "./tsconfig.json", 10 | "include": [ 11 | ".eslintrc.js", 12 | "**/*.ts", 13 | "webpack.config.js", 14 | "buildScript.js" 15 | ] 16 | } -------------------------------------------------------------------------------- /micronaut-tools/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "compilerOptions": { 10 | "module": "commonjs", 11 | "target": "es6", 12 | "outDir": "dist", 13 | "lib": [ 14 | "es6" 15 | ], 16 | "sourceMap": true, 17 | "rootDir": "src", 18 | "strict": true, /* enable all strict type-checking options */ 19 | /* Additional Checks */ 20 | "noUnusedLocals": true, /* Report errors on unused locals. */ 21 | "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 22 | "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 23 | "noUnusedParameters": true, /* Report errors on unused parameters. */ 24 | "baseUrl": ".", 25 | "paths": { 26 | "vscode": [ 27 | "node_modules/@types/vscode" 28 | ] 29 | } 30 | }, 31 | "exclude": [ 32 | "out", 33 | "node_modules", 34 | ".vscode-test" 35 | ] 36 | } -------------------------------------------------------------------------------- /micronaut-tools/webviews/icons/micronaut_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/webviews/icons/micronaut_dark.png -------------------------------------------------------------------------------- /micronaut-tools/webviews/icons/micronaut_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut-tools/webviews/icons/micronaut_light.png -------------------------------------------------------------------------------- /micronaut-tools/webviews/scripts/testMatrix.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. 2 | // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 | 4 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 5 | 6 | 7 | (function () { 8 | const vscode = acquireVsCodeApi(); 9 | 10 | document.querySelectorAll('.clickable-td').forEach(td => { 11 | td.addEventListener('click', function () { 12 | const state = this.getAttribute('data-state'); 13 | vscode.postMessage({ type: 'testCaseClick', state }); 14 | }); 15 | }); 16 | 17 | window.addEventListener('message', event => { 18 | const message = event.data; 19 | switch (message.type) { 20 | case 'updateTests': 21 | { 22 | updateTests(message); 23 | break; 24 | } 25 | } 26 | }); 27 | 28 | function updateTests(message) { 29 | vscode.setState({ storedTests: message.tests }); 30 | } 31 | }()); 32 | -------------------------------------------------------------------------------- /micronaut-tools/webviews/scripts/welcome.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | const vscode = acquireVsCodeApi(); 9 | document.addEventListener("DOMContentLoaded", function(event) { 10 | const checkbox = document.getElementById('showWelcomePage'); 11 | checkbox.addEventListener('click', () => { 12 | vscode.postMessage({ command: 'showWelcomePage', value: checkbox.checked }); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /micronaut/.nvmrc: -------------------------------------------------------------------------------- 1 | v14.16.0 -------------------------------------------------------------------------------- /micronaut/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dbaeumer.vscode-eslint" 6 | ] 7 | } -------------------------------------------------------------------------------- /micronaut/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ], 16 | "outFiles": [ 17 | "${workspaceFolder}/out/**/*.js", 18 | "${workspaceFolder}/dist/**/*.js" 19 | ], 20 | "preLaunchTask": "npm: compile" 21 | }, 22 | { 23 | "name": "Extension Tests", 24 | "type": "extensionHost", 25 | "request": "launch", 26 | "runtimeExecutable": "${execPath}", 27 | "args": [ 28 | "--extensionDevelopmentPath=${workspaceFolder}", 29 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" 30 | ], 31 | "outFiles": [ 32 | "${workspaceFolder}/out/test/**/*.js" 33 | ], 34 | "preLaunchTask": "npm: watch" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /micronaut/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | }, 9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 10 | "typescript.tsc.autoDetect": "off" 11 | } -------------------------------------------------------------------------------- /micronaut/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /micronaut/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/test/** 4 | src/** 5 | .gitignore 6 | vsc-extension-quickstart.md 7 | **/tsconfig*.json 8 | **/tslint.json 9 | **/*.map 10 | **/*.ts 11 | node_modules/** 12 | fixtures/** 13 | mochawesome-report/** 14 | test-resources/** 15 | -------------------------------------------------------------------------------- /micronaut/images/install-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut/images/install-tools.png -------------------------------------------------------------------------------- /micronaut/images/micronaut-cli-setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut/images/micronaut-cli-setting.png -------------------------------------------------------------------------------- /micronaut/images/micronaut-project-features_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut/images/micronaut-project-features_view.png -------------------------------------------------------------------------------- /micronaut/images/micronaut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/micronaut/images/micronaut.png -------------------------------------------------------------------------------- /micronaut/src/extension.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | import { micronautProjectExists } from "../../common/lib/utils"; 10 | import { checkGCNExtensions } from "../../common/lib/dialogs"; 11 | import { creatorInit, createProject } from './projectCreate'; 12 | 13 | export function activate(context: vscode.ExtensionContext) { 14 | context.subscriptions.push(vscode.commands.registerCommand('extension.micronaut.createProject', () => { 15 | createProject(context); 16 | })); 17 | creatorInit(); 18 | micronautProjectExists().then(exists => { 19 | if (exists) { 20 | checkGCNExtensions(context); 21 | } 22 | }); 23 | } 24 | 25 | export function deactivate() {} 26 | -------------------------------------------------------------------------------- /micronaut/src/utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | 10 | export function getMicronautHome(): string { 11 | let micronautHome: string = vscode.workspace.getConfiguration('micronaut').get('home') as string; 12 | if (micronautHome) { 13 | return micronautHome; 14 | } 15 | micronautHome = process.env['MICRONAUT_HOME'] as string; 16 | return micronautHome; 17 | } 18 | 19 | export function getMicronautLaunchURL(): string { 20 | let micronautLaunchURL: string = vscode.workspace.getConfiguration('micronaut').get('launchUrl') as string; 21 | if (!micronautLaunchURL) { 22 | micronautLaunchURL = process.env['MICRONAUT_LAUNCH_URL'] as string; 23 | } 24 | if (micronautLaunchURL) { 25 | if (!micronautLaunchURL.startsWith('https://') && !micronautLaunchURL.startsWith('http://')) { 26 | micronautLaunchURL = 'https://' + micronautLaunchURL; 27 | } 28 | if (micronautLaunchURL.endsWith('/')) { 29 | return micronautLaunchURL.slice(0, micronautLaunchURL.length - 1); 30 | } 31 | } 32 | return micronautLaunchURL; 33 | } -------------------------------------------------------------------------------- /micronaut/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "extends": "./tsconfig.json", 10 | "include": [ 11 | ".eslintrc.js", 12 | "**/*.ts", 13 | "webpack.config.js", 14 | "buildScript.js" 15 | ] 16 | } -------------------------------------------------------------------------------- /micronaut/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "compilerOptions": { 10 | "module": "commonjs", 11 | "target": "es6", 12 | "outDir": "dist", 13 | "lib": [ 14 | "es6" 15 | ], 16 | "sourceMap": true, 17 | "rootDir": "src", 18 | "strict": true, /* enable all strict type-checking options */ 19 | /* Additional Checks */ 20 | "noUnusedLocals": true, /* Report errors on unused locals. */ 21 | "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 22 | "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 23 | "noUnusedParameters": true, /* Report errors on unused parameters. */ 24 | "baseUrl": ".", 25 | "paths": { 26 | "vscode": [ 27 | "node_modules/@types/vscode" 28 | ] 29 | } 30 | }, 31 | "exclude": [ 32 | "out", 33 | "node_modules", 34 | ".vscode-test" 35 | ] 36 | } -------------------------------------------------------------------------------- /nbcode-gcn-database/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/nbcode-gcn-database/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /nbcode-gcn-database/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip -------------------------------------------------------------------------------- /nbcode-gcn-database/nbcode-gcn-database-drivers/src/main/nbm/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/gcn/database/drivers/Bundle.properties 3 | OpenIDE-Module-Layer: org/netbeans/modules/gcn/database/drivers/layer.xml 4 | Covered-Packages: org.netbeans.modules.gcn.database.drivers 5 | 6 | -------------------------------------------------------------------------------- /nbcode-gcn-database/nbcode-gcn-database-drivers/src/main/resources/org/netbeans/modules/gcn/database/drivers/Bundle.properties: -------------------------------------------------------------------------------- 1 | #Localized module labels. Defaults taken from POM (, , ) if unset. 2 | #OpenIDE-Module-Name= 3 | #OpenIDE-Module-Short-Description= 4 | #OpenIDE-Module-Long-Description= 5 | #OpenIDE-Module-Display-Category= 6 | #Wed Jan 11 12:32:30 CET 2023 7 | -------------------------------------------------------------------------------- /nbcode-gcn-database/nbcode-gcn-database-drivers/src/main/resources/org/netbeans/modules/gcn/database/drivers/layer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /nbcode-gcn-database/nbcode-gcn-database-drivers/src/main/resources/org/netbeans/modules/gcn/database/drivers/mysql2.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /nbcode-gcn-database/nbcode-gcn-database-drivers/src/main/resources/org/netbeans/modules/gcn/database/drivers/ojdbc.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /oci-devops/.gitignore: -------------------------------------------------------------------------------- 1 | **/.gradle 2 | **/build 3 | test-resources 4 | 5 | fixtures/**/.project 6 | fixtures/**/.settings 7 | fixtures/**/.classpath 8 | fixtures/**/.factorypath 9 | fixtures/**/.devops 10 | 11 | -------------------------------------------------------------------------------- /oci-devops/.nvmrc: -------------------------------------------------------------------------------- 1 | v14.16.0 -------------------------------------------------------------------------------- /oci-devops/.test-extension-list: -------------------------------------------------------------------------------- 1 | asf.apache-netbeans-java 2 | redhat.java 3 | vscjava.vscode-java-pack 4 | vscjava.vscode-java-debug 5 | ms-kubernetes-tools.vscode-kubernetes-tools 6 | 7 | -------------------------------------------------------------------------------- /oci-devops/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dbaeumer.vscode-eslint" 6 | ] 7 | } -------------------------------------------------------------------------------- /oci-devops/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | }, 9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 10 | "typescript.tsc.autoDetect": "off", 11 | "typescript.tsdk": "node_modules\\typescript\\lib", 12 | "java.configuration.updateBuildConfiguration": "interactive" 13 | } -------------------------------------------------------------------------------- /oci-devops/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | }, 19 | { 20 | "type": "npm", 21 | "script": "watch-tests", 22 | "problemMatcher": "$tsc-watch", 23 | "isBackground": true, 24 | "presentation": { 25 | "reveal": "never", 26 | "group": "watchers" 27 | }, 28 | "group": "build" 29 | }, 30 | { 31 | "label": "tasks: watch-tests", 32 | "dependsOn": [ 33 | "npm: watch-tests" 34 | ], 35 | "problemMatcher": [] 36 | }, 37 | { 38 | "label": "tasks: tests-ui-prerequisites", 39 | "type": "shell", 40 | "command": "node node_modules/vscode-extension-tester/out/cli.js get-vscode; node node_modules/vscode-extension-tester/out/cli.js get-chromedriver; npm run test-compile" 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /oci-devops/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | node_modules/** 3 | out/** 4 | src/** 5 | .gitignore 6 | vsc-extension-quickstart.md 7 | webpack.config.js 8 | **/tsconfig*.json 9 | **/tslint.json 10 | **/*.map 11 | **/*.ts 12 | testresources/** 13 | fixtures/** 14 | mochawesome-report/** 15 | test-resources/** 16 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/README.md: -------------------------------------------------------------------------------- 1 | ## Micronaut 3.7.4 Documentation 2 | 3 | - [User Guide](https://docs.micronaut.io/3.7.4/guide/) 4 | - [API Reference](https://docs.micronaut.io/3.7.4/api/) 5 | - [Configuration Reference](https://docs.micronaut.io/3.7.4/guide/configurationreference.html) 6 | - [Micronaut Guides](https://guides.micronaut.io/) 7 | --- 8 | - [Shadow Gradle Plugin](https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow) 9 | ## Feature http-client documentation 10 | 11 | - [Micronaut HTTP Client documentation](https://docs.micronaut.io/latest/guide/index.html#httpClient) 12 | 13 | 14 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/gradle.properties: -------------------------------------------------------------------------------- 1 | micronautVersion=3.7.4 2 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/fixtures/base-oci-template/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Jul 23 02:41:16 WEST 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/lib/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("io.micronaut.library") version "3.6.3" 3 | } 4 | 5 | version = "1.0-SNAPSHOT" 6 | group = "com.example" 7 | 8 | repositories { 9 | mavenCentral() 10 | } 11 | 12 | dependencies { 13 | annotationProcessor("io.micronaut:micronaut-http-validation") 14 | implementation("io.micronaut:micronaut-http-client") 15 | implementation("io.micronaut:micronaut-jackson-databind") 16 | implementation("jakarta.annotation:jakarta.annotation-api") 17 | runtimeOnly("ch.qos.logback:logback-classic") 18 | implementation("io.micronaut:micronaut-validation") 19 | 20 | } 21 | 22 | java { 23 | sourceCompatibility = JavaVersion.toVersion("11") 24 | targetCompatibility = JavaVersion.toVersion("11") 25 | } 26 | 27 | micronaut { 28 | processing { 29 | incremental(true) 30 | annotations("com.example.*") 31 | } 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: default 2 | defaultPackage: com.example 3 | testFramework: junit 4 | sourceLanguage: java 5 | buildTool: gradle 6 | features: [annotation-api, app-name, gcn-oci-cloud-app, gradle, http-client, jackson-databind, java, java-application, junit, logback, micronaut-build, netty-server, readme, shade, yaml] 7 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/oci/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.github.johnrengelman.shadow") version "7.1.2" 3 | id("io.micronaut.application") version "3.6.3" 4 | } 5 | 6 | version = "1.0-SNAPSHOT" 7 | group = "com.example" 8 | 9 | repositories { 10 | mavenCentral() 11 | } 12 | 13 | dependencies { 14 | annotationProcessor("io.micronaut:micronaut-http-validation") 15 | implementation("io.micronaut:micronaut-http-client") 16 | implementation("io.micronaut:micronaut-jackson-databind") 17 | implementation("jakarta.annotation:jakarta.annotation-api") 18 | runtimeOnly("ch.qos.logback:logback-classic") 19 | implementation(project(":lib")) 20 | implementation("io.micronaut:micronaut-validation") 21 | 22 | } 23 | 24 | 25 | application { 26 | mainClass.set("com.example.Application") 27 | } 28 | java { 29 | sourceCompatibility = JavaVersion.toVersion("11") 30 | targetCompatibility = JavaVersion.toVersion("11") 31 | } 32 | 33 | graalvmNative.toolchainDetection = false 34 | micronaut { 35 | runtime("netty") 36 | testRuntime("junit5") 37 | processing { 38 | incremental(true) 39 | annotations("com.example.*") 40 | } 41 | } 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/oci/src/main/java/com/example/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | package com.example; 9 | 10 | import io.micronaut.core.annotation.NonNull; 11 | import io.micronaut.context.ApplicationContextBuilder; 12 | import io.micronaut.context.ApplicationContextConfigurer; 13 | import io.micronaut.context.annotation.ContextConfigurer; 14 | import io.micronaut.runtime.Micronaut; 15 | 16 | public class Application { 17 | @ContextConfigurer 18 | public static class DefaultEnvironmentConfigurer implements ApplicationContextConfigurer { 19 | @Override 20 | public void configure(@NonNull ApplicationContextBuilder builder) { 21 | builder.defaultEnvironments("oraclecloud"); 22 | } 23 | } 24 | public static void main(String[] args) { 25 | Micronaut.run(Application.class, args); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/oci/src/main/resources/application-oraclecloud.yml: -------------------------------------------------------------------------------- 1 | micronaut: 2 | application: 3 | name: oci 4 | netty: 5 | default: 6 | allocator: 7 | max-order: 3 8 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/oci/src/main/resources/bootstrap-oraclecloud.yml: -------------------------------------------------------------------------------- 1 | # Place application configuration here -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/oci/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 7 | 8 | %cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/oci/src/test/java/com/example/OciTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | package com.example; 9 | 10 | import io.micronaut.runtime.EmbeddedApplication; 11 | import io.micronaut.test.extensions.junit5.annotation.MicronautTest; 12 | import org.junit.jupiter.api.Test; 13 | import org.junit.jupiter.api.Assertions; 14 | 15 | import jakarta.inject.Inject; 16 | 17 | @MicronautTest 18 | class OciTest { 19 | 20 | @Inject 21 | EmbeddedApplication application; 22 | 23 | @Test 24 | void testItWorks() { 25 | Assertions.assertTrue(application.isRunning()); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /oci-devops/fixtures/base-oci-template/settings.gradle: -------------------------------------------------------------------------------- 1 | 2 | rootProject.name="demo-test4" 3 | 4 | include("lib") 5 | include("oci") 6 | -------------------------------------------------------------------------------- /oci-devops/images/add_to_oci_vault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/add_to_oci_vault.png -------------------------------------------------------------------------------- /oci-devops/images/create_devops_prj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/create_devops_prj.png -------------------------------------------------------------------------------- /oci-devops/images/more-ci-jobs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/more-ci-jobs.png -------------------------------------------------------------------------------- /oci-devops/images/oke_test_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/oke_test_app.png -------------------------------------------------------------------------------- /oci-devops/images/oracle-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/oracle-logo.png -------------------------------------------------------------------------------- /oci-devops/images/project_audit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/project_audit.png -------------------------------------------------------------------------------- /oci-devops/images/proxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/proxy.png -------------------------------------------------------------------------------- /oci-devops/images/set_oke_access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/images/set_oke_access.png -------------------------------------------------------------------------------- /oci-devops/resources/extension_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/resources/extension_icon.png -------------------------------------------------------------------------------- /oci-devops/resources/issue_template.handlebars: -------------------------------------------------------------------------------- 1 | ### Behaviour (Expected vs. Actual) 2 | 3 | 4 | ### Steps to reproduce: 5 | 1. 6 | 7 | 8 | 9 | ### Diagnostic data 10 | 11 |
12 | Extension Log 13 | 14 | ``` 15 | {{{logContent}}}``` 16 |
17 | -------------------------------------------------------------------------------- /oci-devops/resources/oci/Dockerfile.jvm.handlebars: -------------------------------------------------------------------------------- 1 | FROM container-registry.oracle.com/java/openjdk:21 2 | 3 | ARG JAR_FILE 4 | EXPOSE 8080 5 | 6 | COPY $JAR_FILE app.jar 7 | ENTRYPOINT ["java","-jar","/app.jar"] -------------------------------------------------------------------------------- /oci-devops/resources/oci/Dockerfile.native.handlebars: -------------------------------------------------------------------------------- 1 | FROM container-registry.oracle.com/os/oraclelinux:8-slim AS runtime 2 | 3 | ARG APP_FILE 4 | EXPOSE 8080 5 | 6 | COPY $APP_FILE app 7 | ENTRYPOINT ["/app"] -------------------------------------------------------------------------------- /oci-devops/resources/oci/create_secret_service_account.yaml.handlebars: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | # Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | ##################################################################### 7 | 8 | apiVersion: v1 9 | kind: ServiceAccount 10 | metadata: 11 | name: {{{service_account_name}}} 12 | namespace: default 13 | --- 14 | apiVersion: rbac.authorization.k8s.io/v1 15 | kind: ClusterRole 16 | metadata: 17 | name: secret-manager 18 | rules: 19 | - apiGroups: [""] 20 | resources: ["secrets"] 21 | verbs: ["create", "get", "patch", "delete"] 22 | --- 23 | apiVersion: rbac.authorization.k8s.io/v1 24 | kind: ClusterRoleBinding 25 | metadata: 26 | name: secret-manager-binding 27 | subjects: 28 | - kind: ServiceAccount 29 | name: {{{service_account_name}}} 30 | namespace: default 31 | roleRef: 32 | kind: ClusterRole 33 | name: secret-manager 34 | apiGroup: rbac.authorization.k8s.io 35 | -------------------------------------------------------------------------------- /oci-devops/resources/oci/docker_build_spec.yaml.handlebars: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | # Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | ##################################################################### 7 | 8 | ##################################################################### 9 | # 10 | # OCI DevOps Tools Build Pipeline Spec for Maven & Gradle 11 | # Builds application Docker image and deploys it to Container Registry 12 | # 13 | ##################################################################### 14 | version: 0.1 15 | component: build 16 | timeoutInSeconds: 15000 17 | runAs: root 18 | shell: bash 19 | env: 20 | exportedVariables: 21 | steps: 22 | - type: Command 23 | name: "Define docker image tag" 24 | timeoutInSeconds: 40 25 | command: | 26 | echo "OCI_BUILD_RUN_ID: ${OCI_BUILD_RUN_ID}" 27 | if [ ! -n "${DOCKER_TAG}" ]; then export DOCKER_TAG={{{docker_tag_value}}}; fi 28 | echo "DOCKER_TAG: ${DOCKER_TAG}" 29 | - type: Command 30 | name: "Docker build" 31 | command: | 32 | echo "Running docker image build." 33 | echo "Docker Image Tag: ${DOCKER_TAG}" 34 | docker build -f {{{docker_file}}} \ 35 | -t {{{image_name}}}:${DOCKER_TAG} . 36 | echo "Done" 37 | printf "List of docker images:\n $(docker images)" 38 | outputArtifacts: 39 | - name: {{{deploy_artifact_name}}} 40 | type: DOCKER_IMAGE 41 | location: {{{image_name}}}:${DOCKER_TAG} -------------------------------------------------------------------------------- /oci-devops/resources/oci/oke_configmap.yaml.handlebars: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | # Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | ##################################################################### 7 | 8 | apiVersion: v1 9 | kind: ConfigMap 10 | metadata: 11 | name: {{{app_name}}} 12 | data: 13 | bootstrap-oraclecloud.properties: | 14 | oci.config.instance-principal.enabled=true 15 | application-oraclecloud.properties: | 16 | # placeholder 17 | -------------------------------------------------------------------------------- /oci-devops/resources/oci/oke_deploy_config.yaml.handlebars: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | # Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | ##################################################################### 7 | 8 | apiVersion: apps/v1 9 | kind: Deployment 10 | metadata: 11 | name: {{{app_name}}} 12 | labels: 13 | app: {{{app_name}}} 14 | spec: 15 | replicas: 1 16 | selector: 17 | matchLabels: 18 | app: {{{app_name}}} 19 | template: 20 | metadata: 21 | labels: 22 | app: {{{app_name}}} 23 | spec: 24 | containers: 25 | - name: {{{app_name}}} 26 | imagePullPolicy: Always 27 | image: {{{image_name}}} 28 | ports: 29 | - containerPort: 8080 30 | volumeMounts: 31 | - name: configuration 32 | mountPath: /etc/conf 33 | readOnly: true 34 | env: 35 | - name: MICRONAUT_ENVIRONMENTS 36 | value: "oraclecloud" 37 | - name: MICRONAUT_CONFIG_FILES 38 | value: "/etc/conf/application-oraclecloud.properties,/etc/conf/bootstrap-oraclecloud.properties" 39 | volumes: 40 | - name: configuration 41 | configMap: 42 | name: {{{app_name}}} 43 | items: 44 | - key: "bootstrap-oraclecloud.properties" 45 | path: "bootstrap-oraclecloud.properties" 46 | - key: "application-oraclecloud.properties" 47 | path: "application-oraclecloud.properties" 48 | imagePullSecrets: 49 | - name: {{{secret_name}}} 50 | -------------------------------------------------------------------------------- /oci-devops/resources/oci/oke_pod_deletion.yaml.handlebars: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | # Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | # 5 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | ##################################################################### 7 | 8 | version: 0.1 9 | component: command 10 | timeoutInSeconds: 6000 11 | runAs: root 12 | shell: bash 13 | steps: 14 | - type: Command 15 | timeoutInSeconds: 600 16 | name: "Delete pod" 17 | command: | 18 | oci ce cluster create-kubeconfig --cluster-id {{{cluster_id}}} --file $HOME/.kube/config --region {{{region}}} --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT 19 | kubectl delete pod -l app={{{app_name}}} --ignore-not-found=true 20 | onFailure: 21 | - type: Command 22 | command: | 23 | echo "Failed to set up kube config and create secret" 24 | timeoutInSeconds: 60 25 | -------------------------------------------------------------------------------- /oci-devops/src/dockerUtils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as cp from 'child_process'; 9 | 10 | export function pullImage(imageId: string): cp.ChildProcess { 11 | return cp.spawn('docker', ['pull', imageId], { detached: true }); 12 | } 13 | 14 | export function login(registryName: string, userName: string, password: string) { 15 | cp.execSync(`docker login --username ${userName} --password "${password}" ${registryName}`); 16 | } 17 | 18 | export function logout(registryName: string) { 19 | cp.execSync(`docker logout ${registryName}`); 20 | } 21 | -------------------------------------------------------------------------------- /oci-devops/src/oci/dataSupport.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | 9 | export interface DataProducer { 10 | 11 | getDataName(): string; 12 | 13 | getData(): any | undefined; 14 | 15 | } 16 | 17 | export type DataChanged = (dataProducer?: DataProducer) => void; 18 | 19 | export function isDataProducer(object: any) { 20 | return typeof object.getDataName === 'function' && typeof object.getData === 'function'; 21 | } 22 | 23 | export function getDataProducer(object: any): DataProducer | undefined { 24 | if (isDataProducer(object)) { 25 | return object as any as DataProducer; 26 | } 27 | return undefined; 28 | } 29 | -------------------------------------------------------------------------------- /oci-devops/src/oci/ociResources.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | export const RESOURCES = { 9 | 'devbuild_spec_no_output_artifacts.yaml': require('../../resources/oci/devbuild_spec_no_output_artifacts.yaml.handlebars'), 10 | 'devbuild_spec.yaml': require('../../resources/oci/devbuild_spec.yaml.handlebars'), 11 | 'docker_build_spec.yaml': require('../../resources/oci/docker_build_spec.yaml.handlebars'), 12 | 'docker_jvmbuild_spec.yaml': require('../../resources/oci/docker_jvmbuild_spec.yaml.handlebars'), 13 | 'docker_nibuild_spec.yaml': require('../../resources/oci/docker_nibuild_spec.yaml.handlebars'), 14 | 'Dockerfile.jvm': require('../../resources/oci/Dockerfile.jvm.handlebars'), 15 | 'Dockerfile.native': require('../../resources/oci/Dockerfile.native.handlebars'), 16 | 'nibuild_spec_no_output_artifacts.yaml': require('../../resources/oci/nibuild_spec_no_output_artifacts.yaml.handlebars'), 17 | 'nibuild_spec.yaml': require('../../resources/oci/nibuild_spec.yaml.handlebars'), 18 | 'oke_configmap.yaml': require('../../resources/oci/oke_configmap.yaml.handlebars'), 19 | 'oke_deploy_config.yaml': require('../../resources/oci/oke_deploy_config.yaml.handlebars'), 20 | 'oke_pod_deletion.yaml': require('../../resources/oci/oke_pod_deletion.yaml.handlebars'), 21 | 'oke_secret_rotation_cronjob.yaml': require('../../resources/oci/oke_secret_rotation_cronjob.yaml.handlebars'), 22 | 'create_secret_service_account.yaml': require('../../resources/oci/create_secret_service_account.yaml.handlebars'), 23 | }; -------------------------------------------------------------------------------- /oci-devops/src/persistenceUtils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | 10 | 11 | let workspaceState: vscode.Memento | undefined; 12 | 13 | export function initialize(context: vscode.ExtensionContext) { 14 | workspaceState = context.workspaceState; 15 | } 16 | 17 | export function getWorkspaceObject(key: string): T | undefined { 18 | return workspaceState?.get(key); 19 | } 20 | 21 | export async function setWorkspaceObject(key: string, value: any): Promise { 22 | return workspaceState?.update(key, value); 23 | } 24 | 25 | export function getWorkspaceConfiguration(): vscode.WorkspaceConfiguration { 26 | return vscode.workspace.getConfiguration('oci.devops'); 27 | } 28 | -------------------------------------------------------------------------------- /oci-devops/src/test/suite/common.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from 'vscode'; 2 | 3 | export async function waitForStartup(wf? : vscode.WorkspaceFolder) : Promise { 4 | if (!wf) { 5 | return; 6 | } 7 | let wf2 = wf; 8 | let counter = 0; 9 | let p : Promise = new Promise(async (resolve, reject) => { 10 | 11 | async function dowait() { 12 | try { 13 | await vscode.commands.executeCommand('nbls.project.info', wf2.uri.toString(), { projectStructure: true }); 14 | resolve(); 15 | } catch (e) { 16 | if (counter < 60) { 17 | counter++; 18 | console.log(`Still waiting for NBLS start, ${counter} seconds elapsed.`); 19 | setTimeout(dowait, 1000); 20 | return; 21 | } else { 22 | reject(e); 23 | } 24 | } 25 | } 26 | setTimeout(dowait, 1000); 27 | }); 28 | return p; 29 | } 30 | 31 | export function getProfile(profiles : string[]) : string { 32 | if (profiles.length === 1) 33 | return profiles[0]; 34 | else if (profiles.indexOf("TESTS") !== -1) 35 | return "TESTS"; 36 | else if (profiles.indexOf("DEFAULT") !== -1) 37 | return "DEFAULT"; 38 | else { 39 | return ""; 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /oci-devops/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "extends": "./tsconfig.json", 10 | "include": [ 11 | ".eslintrc.js", 12 | "**/*.ts", 13 | "webpack.config.js" 14 | ] 15 | } -------------------------------------------------------------------------------- /oci-devops/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | "compilerOptions": { 10 | "allowJs": true, 11 | "module": "commonjs", 12 | "target": "es6", 13 | "outDir": "dist", 14 | "lib": [ 15 | "es6", "DOM" 16 | ], 17 | "sourceMap": true, 18 | "rootDir": "src", 19 | "allowSyntheticDefaultImports": true, 20 | /* Strict Type-Checking Option */ 21 | "strict": true, /* enable all strict type-checking options */ 22 | /* Additional Checks */ 23 | "noUnusedLocals": true, /* Report errors on unused locals. */ 24 | "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 25 | "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 26 | "noUnusedParameters": true, /* Report errors on unused parameters. */ 27 | "baseUrl": ".", 28 | "paths": { 29 | "vscode": [ 30 | "node_modules/@types/vscode" 31 | ] 32 | } 33 | }, 34 | "include": [ 35 | "src/**/*" 36 | ], 37 | "exclude": [ 38 | "out", 39 | "node_modules", 40 | ".vscode-test" 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /oci-devops/webviews/imgs/gcnBanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/oci-devops/webviews/imgs/gcnBanner.png -------------------------------------------------------------------------------- /oci-devops/webviews/scripts/welcome.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | const vscode = acquireVsCodeApi(); 9 | document.addEventListener("DOMContentLoaded", function(event) { 10 | const checkbox = document.getElementById('showToolsPage'); 11 | checkbox.addEventListener('click', () => { 12 | vscode.postMessage({ command: 'showToolsPage', value: checkbox.checked }); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /tests/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "trailingComma": "all", 4 | "singleQuote": true 5 | } -------------------------------------------------------------------------------- /tests/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | { 9 | // See http://go.microsoft.com/fwlink/?LinkId=827846 10 | // for the documentation about the extensions.json format 11 | "recommendations": [ 12 | "dbaeumer.vscode-eslint" 13 | ] 14 | } -------------------------------------------------------------------------------- /tests/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | }, 9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 10 | "typescript.tsc.autoDetect": "off" 11 | } -------------------------------------------------------------------------------- /tests/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | }, 18 | "label": "npm: watch" 19 | }, 20 | { 21 | "type": "npm", 22 | "script": "watch-tests", 23 | "problemMatcher": "$tsc-watch", 24 | "isBackground": true, 25 | "presentation": { 26 | "reveal": "never", 27 | "group": "watchers" 28 | }, 29 | "group": "build", 30 | }, 31 | { 32 | "label": "tasks: watch-tests", 33 | "dependsOn": [ 34 | "npm: watch-tests" 35 | ], 36 | "problemMatcher": [] 37 | }, 38 | { 39 | "label": "tasks: tests-ui-prerequisites", 40 | "type": "shell", 41 | "command": "npm run pre-test-ui" 42 | }, 43 | { 44 | "label": "tasks: tests-prerequisites", 45 | "type": "shell", 46 | "command": "npm run pre-test" 47 | } 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /tests/src/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | node_modules/ 3 | tsconfig.json -------------------------------------------------------------------------------- /tests/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | declare namespace NodeJS { 9 | /**Env variables */ 10 | interface ProcessEnv { 11 | GRAALVM_HOME: string; 12 | MICRONAUT_SERVER_PORT: string; 13 | DEBUG: string; 14 | TIMEOUT_MULTIPLICATOR: string; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/src/generate.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as path from 'path'; 9 | import { runTests, downloadAndUnzipVSCode } from '@vscode/test-electron'; 10 | import { AbortController } from 'node-abort-controller'; 11 | 12 | export async function generate(args: string[]) { 13 | // BuildBot Abort controller fix 14 | // @ts-ignore 15 | global.AbortController = AbortController; 16 | 17 | const suitePath = path.join(__dirname, 'test', 'suite'); 18 | process.env['generator'] = (args.length > 0 ? args : ['testDescriptor.js']).join(';'); 19 | 20 | // The folder containing the Extension Manifest package.json 21 | // Passed to `--extensionDevelopmentPath` 22 | const extensionDevelopmentPath = path.resolve(__dirname, '..', '..', 'graal-cloud-native-pack'); 23 | 24 | // The path to test runner 25 | // Passed to --extensionTestsPath 26 | const extensionTestsPath = path.join(suitePath, 'genindex'); 27 | 28 | const vscodeExecutablePath = await downloadAndUnzipVSCode('1.84.0'); 29 | await runTests({ 30 | vscodeExecutablePath, 31 | extensionDevelopmentPath, 32 | extensionTestsPath, 33 | }); 34 | } 35 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/API/NITests/ACTIVATE_ME_testDescriptor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { ProjectDescription, BuildTool, Feature } from '../../../../../Common/types'; 9 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 10 | import { genProj } from '../../../../../Common/testHelper'; 11 | export class TestDescriptor extends AbstractTestDescriptor { 12 | constructor() { 13 | super(__dirname); 14 | } 15 | descriptions: ProjectDescription[] = [genProj(BuildTool.Maven, [Feature.OBJECTSTORE])]; 16 | } 17 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/API/OCITests/testDescriptor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { ProjectDescription, BuildTool, Feature, Type, Service } from '../../../../../Common/types'; 9 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 10 | import * as help from '../../../../../Common/testHelper'; 11 | export class TestDescriptor extends AbstractTestDescriptor { 12 | constructor() { 13 | super(__dirname); 14 | } 15 | descriptions: ProjectDescription[] = [ 16 | help.genProj(BuildTool.Maven, [Feature.OBJECTSTORE, Feature.DATABASE], Type.GDK, [Service.ATP]), 17 | // help.genProj(BuildTool.Gradle, [Feature.OBJECTSTORE, Feature.DATABASE]), 18 | 19 | help.genProj(BuildTool.Maven, [], Type.MICRONAUT), 20 | // help.genProj(BuildTool.Gradle, [], Type.MICRONAUT) 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/API/TestsWithSimpleWorkspace/testDescriptor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { ProjectDescription, BuildTool, Feature } from '../../../../../Common/types'; 9 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 10 | import * as help from '../../../../../Common/testHelper'; 11 | export class TestDescriptor extends AbstractTestDescriptor { 12 | constructor() { 13 | super(__dirname); 14 | } 15 | descriptions: ProjectDescription[] = [help.genProj(BuildTool.Maven, [Feature.OBJECTSTORE])]; 16 | } 17 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/API/adm/testDescriptor.ts: -------------------------------------------------------------------------------- 1 | import { ProjectDescription } from '../../../../../Common/types'; 2 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 3 | import * as help from '../../../../../Common/testHelper'; 4 | import path from 'path'; 5 | export class TestDescriptor extends AbstractTestDescriptor { 6 | constructor() { 7 | super(__dirname); 8 | } 9 | descriptions: ProjectDescription[] = [ 10 | help.copProj(path.join('test-projects', 'adm', 'oci-adm-g')), 11 | help.copProj(path.join('test-projects', 'adm', 'oci-adm-g-simple')), 12 | help.copProj(path.join('test-projects', 'adm', 'oci-adm-m')), 13 | ]; 14 | environment: Record = { 15 | ADM_SUPPRESS_AUTO_DISPLAY: 'true', 16 | }; 17 | protected destructive: boolean = false; 18 | } 19 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/API/helpers.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as vscode from 'vscode'; 9 | 10 | export async function waitForStatup(wf?: vscode.WorkspaceFolder): Promise { 11 | if (!wf) { 12 | return; 13 | } 14 | let wf2 = wf; 15 | let counter = 0; 16 | let p: Promise = new Promise(async (resolve, reject) => { 17 | async function dowait() { 18 | try { 19 | await vscode.commands.executeCommand('nbls.project.info', wf2.uri.toString(), { projectStructure: true }); 20 | resolve(); 21 | } catch (e) { 22 | if (counter < 120) { 23 | counter++; 24 | console.log(`Still waiting for NBLS start, ${counter} seconds elapsed.`); 25 | setTimeout(dowait, 1000); 26 | return; 27 | } else { 28 | reject(e); 29 | } 30 | } 31 | } 32 | setTimeout(dowait, 1000); 33 | }); 34 | return p; 35 | } 36 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/API/index.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import Mocha from 'mocha'; 3 | import glob from 'glob'; 4 | 5 | export function run(): Promise { 6 | // Create the mocha test 7 | const mocha = new Mocha({ 8 | ui: 'tdd', 9 | color: true, 10 | reporter: 'mochawesome', 11 | reporterOptions: { 12 | // disable overwrite to generate many JSON reports 13 | overwrite: false, 14 | // do not generate intermediate HTML reports 15 | html: false, 16 | // generate intermediate JSON reports 17 | json: true, 18 | }, 19 | }); 20 | 21 | const testsRoot = path.resolve(__dirname, '..'); 22 | 23 | return new Promise((c, e) => { 24 | glob.globSync('**/**extension.test.js', { cwd: testsRoot }).forEach(f => mocha.addFile(path.resolve(testsRoot, f))); 25 | try { 26 | // Run the mocha test 27 | mocha.run(failures => { 28 | if (failures > 0) { 29 | e(new Error(`${failures} tests failed.`)); 30 | } else { 31 | c(); 32 | } 33 | }); 34 | } catch (err) { 35 | console.error(err); 36 | e(err); 37 | } 38 | }); 39 | } -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/UI/CodelenseAndAutocomplete/testDescriptor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { ProjectDescription, BuildTool, Feature } from '../../../../../Common/types'; 9 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 10 | import * as help from '../../../../../Common/testHelper'; 11 | export class TestDescriptor extends AbstractTestDescriptor { 12 | constructor() { 13 | super(__dirname); 14 | } 15 | descriptions: ProjectDescription[] = [ 16 | help.genProj(BuildTool.Maven, [Feature.OBJECTSTORE]), 17 | help.genProj(BuildTool.Gradle, [Feature.OBJECTSTORE]), 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/UI/MicronautRESTUI/testDescriptor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { ProjectDescription, BuildTool, Feature } from '../../../../../Common/types'; 9 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 10 | import * as help from '../../../../../Common/testHelper'; 11 | export class TestDescriptor extends AbstractTestDescriptor { 12 | constructor() { 13 | super(__dirname); 14 | } 15 | descriptions: ProjectDescription[] = [ 16 | help.genProj(BuildTool.Maven, [Feature.OBJECTSTORE]), 17 | help.genProj(BuildTool.Gradle, [Feature.OBJECTSTORE]), 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/UI/MicronautSymbols/testDescriptor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { ProjectDescription, BuildTool, Feature } from '../../../../../Common/types'; 9 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 10 | import * as help from '../../../../../Common/testHelper'; 11 | export class TestDescriptor extends AbstractTestDescriptor { 12 | constructor() { 13 | super(__dirname); 14 | } 15 | descriptions: ProjectDescription[] = [ 16 | help.genProj(BuildTool.Maven, [Feature.OBJECTSTORE]), 17 | help.genProj(BuildTool.Gradle, [Feature.OBJECTSTORE]), 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/UI/TestsThatDoesNotNeedWorkspace/helper.ts: -------------------------------------------------------------------------------- 1 | // import the webdriver and the high level browser wrapper 2 | import { InputBox } from 'vscode-extension-tester'; 3 | // import * as vscode from 'vscode'; 4 | 5 | /** 6 | * Waits for quickpics to show and returns result 7 | * 8 | * @param input 9 | * @param timeout 10 | */ 11 | export async function waitForQuickPick(input: InputBox, timeout: number): Promise { 12 | let picks = await input.getQuickPicks(); 13 | const items: string[] = []; 14 | while (timeout > 0) { 15 | if (picks.length) { 16 | for (const pick of picks) { 17 | items.push(await pick.getLabel()); 18 | } 19 | break; 20 | } else { 21 | await new Promise((f) => setTimeout(f, 1000)); 22 | picks = await input.getQuickPicks(); 23 | } 24 | 25 | timeout -= 1; 26 | if (timeout <= 0) { 27 | return undefined; 28 | } 29 | } 30 | return items; 31 | } 32 | 33 | /** 34 | * Returns text inside input box when it becomes not empty 35 | * @param input 36 | * @param timeout 37 | * @returns 38 | */ 39 | export async function getInputText(input: InputBox, timeout: number): Promise { 40 | while (timeout > 0) { 41 | const inp = input.getText(); 42 | if (!inp) { 43 | await new Promise((f) => setTimeout(f, 1000)); 44 | timeout -= 1; 45 | continue; 46 | } else { 47 | return inp; 48 | } 49 | } 50 | return undefined; 51 | } 52 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/UI/TestsThatDoesNotNeedWorkspace/testDescriptor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import { AbstractTestDescriptor } from '../../../../../Common/abstractTestDescriptor'; 9 | export class TestDescriptor extends AbstractTestDescriptor { 10 | constructor() { 11 | super(__dirname); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/src/test/suite/Gates/UI/testRunner-ui.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | describe(process.env['testName'] ?? 'UI Tests:', function () { 9 | const tests = process.env['tests']?.split(';'); 10 | if (tests && tests.length !== 0) { 11 | tests.forEach((t) => require(t)); 12 | } else { 13 | console.log('No tests found.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/src/test/suite/generate.test.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import * as path from 'path'; 9 | import { findDescriptors } from '../../Common/testHelper'; 10 | import { gatherProjectsToGenerate, generateMicronautProjects, generateProjects } from '../../Common/projectHelper'; 11 | import { GeneratedProject, Type } from '../../Common/types'; 12 | 13 | suite('Creating projects', function () { 14 | this.timeout(0); 15 | const args = process.env['generator']?.split(';'); 16 | if (!args) return; 17 | const gatesPath = path.join(__dirname, 'Gates'); 18 | const descriptors = findDescriptors(gatesPath, ...args); 19 | const projects = gatherProjectsToGenerate(descriptors); 20 | const gcnProjects: GeneratedProject[] = []; 21 | const micronautProjects: GeneratedProject[] = []; 22 | 23 | const comparator = (project: GeneratedProject) => project.type == Type.MICRONAUT; 24 | projects.forEach((x) => (comparator(x) ? micronautProjects.push(x) : gcnProjects.push(x))); 25 | 26 | test(`Generating ${gcnProjects.length} GDK Projects...`, async () => { 27 | await generateProjects(gcnProjects); 28 | }); 29 | 30 | test(`Generating ${micronautProjects.length} Micronaut Projects...`, async () => { 31 | await generateMicronautProjects(micronautProjects); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /tests/src/test/suite/genindex.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | import path from 'path'; 9 | import Mocha from 'mocha'; 10 | import * as vscode from 'vscode'; 11 | 12 | 13 | export async function run(): Promise { 14 | console.log('Pre-Activating K8s extension...'); 15 | const ext = vscode.extensions.getExtension("ms-kubernetes-tools.vscode-kubernetes-tools"); 16 | if (ext) { 17 | await ext.activate(); 18 | await new Promise((resolve) => setTimeout(resolve, 1000)); 19 | } 20 | 21 | // Create the mocha test 22 | const mocha = new Mocha({ 23 | ui: 'tdd', 24 | color: true, 25 | reporter: 'mochawesome', 26 | reporterOptions: { 27 | reportDir: path.join(process.cwd(), 'mochawesome-report-generator'), 28 | // disable overwrite to generate many JSON reports 29 | overwrite: true, 30 | // do not generate intermediate HTML reports 31 | html: true, 32 | // generate intermediate JSON reports 33 | json: true, 34 | } 35 | }); 36 | 37 | return new Promise((c, e) => { 38 | mocha.addFile(path.join(__dirname, 'generate.test.js')); 39 | 40 | try { 41 | // Run the mocha test 42 | mocha.run((failures) => { 43 | if (failures > 0) { 44 | e(new Error(`${failures} tests failed.`)); 45 | } else { 46 | c(); 47 | } 48 | }); 49 | } catch (err) { 50 | console.error(err); 51 | e(err); 52 | } 53 | }); 54 | } 55 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/buildSrc/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | plugins { 18 | id 'groovy-gradle-plugin' 19 | } 20 | 21 | repositories { 22 | mavenCentral() 23 | gradlePluginPortal() 24 | } 25 | 26 | dependencies { 27 | implementation("com.github.johnrengelman:shadow:8.1.1") 28 | implementation("io.micronaut.gradle:micronaut-test-resources-plugin:4.0.3") 29 | implementation("io.micronaut.gradle:micronaut-gradle-plugin:4.0.3") 30 | } 31 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/buildSrc/src/main/groovy/cloud.graal.gcn.gcn-bom.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | components { 19 | withModule "cloud.graal.gcn:gcn-bom", EnforceBomDependencies 20 | } 21 | } 22 | 23 | abstract class EnforceBomDependencies implements ComponentMetadataRule { 24 | void execute(ComponentMetadataContext ctx) { 25 | if (ctx.details.id.group == "cloud.graal.gcn" && ctx.details.id.name == "gcn-bom") { 26 | ctx.details.allVariants { 27 | withDependencyConstraints { 28 | it.each { md -> 29 | md.version { 30 | strictly(md.versionConstraint.requiredVersion) 31 | } 32 | } 33 | } 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/gradle.properties: -------------------------------------------------------------------------------- 1 | micronautVersion=4.6.0-oracle-00001 2 | 3 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-g-simple/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: default 2 | defaultPackage: com.example 3 | testFramework: junit 4 | sourceLanguage: java 5 | buildTool: gradle 6 | features: [app-name, data, data-jdbc, flyway, gcn-bom, gcn-license, gcn-oci-cloud-app, gcn-oci-database, gcn-oci-logging, gcn-oci-metrics, gcn-oci-security, gcn-oci-tracing, graalvm, gradle, http-client, java, java-application, jdbc-hikari, junit, logback, management, micrometer, micrometer-oracle-cloud, micronaut-build, netty-server, oracle-cloud-atp, oracle-cloud-sdk, properties, readme, security-annotations, security-jwt, security-oauth2, serialization-jackson, shade, test-resources, validation, views-thymeleaf] 7 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | rootProject.name="oci-adm-g-simple" 19 | 20 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/java/com/example/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-g-simple/src/main/java/com/example/.gitkeep -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/java/com/example/WarehouseClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import io.micronaut.http.annotation.Get; 20 | import io.micronaut.http.annotation.Post; 21 | import io.micronaut.http.annotation.QueryValue; 22 | import io.micronaut.http.client.annotation.Client; 23 | import io.micronaut.tracing.annotation.ContinueSpan; 24 | import io.micronaut.tracing.annotation.NewSpan; 25 | import io.micronaut.tracing.annotation.SpanTag; 26 | 27 | import java.util.Map; 28 | 29 | @Client("/warehouse") // <1> 30 | public interface WarehouseClient { 31 | 32 | @Post("/order") 33 | @NewSpan 34 | void order(@SpanTag("warehouse.order") Map json); 35 | 36 | @Get("/count") 37 | @ContinueSpan 38 | int getItemCount(@QueryValue String store, 39 | @SpanTag @QueryValue int upc); 40 | } 41 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/java/com/example/WarehouseController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import io.micronaut.http.HttpResponse; 20 | import io.micronaut.http.annotation.Controller; 21 | import io.micronaut.http.annotation.Get; 22 | import io.micronaut.http.annotation.Post; 23 | import io.micronaut.scheduling.TaskExecutors; 24 | import io.micronaut.scheduling.annotation.ExecuteOn; 25 | 26 | import java.util.Random; 27 | 28 | @ExecuteOn(TaskExecutors.IO) //<1> 29 | @Controller("/warehouse") // <2> 30 | class WarehouseController { 31 | 32 | @Get("/count") // <3> 33 | HttpResponse getItemCount() { 34 | return HttpResponse.ok(new Random().nextInt(11)); 35 | } 36 | 37 | @Post("/order") // <4> 38 | HttpResponse order() { 39 | try { 40 | //To simulate an external process taking time 41 | Thread.sleep(500); 42 | } catch (InterruptedException ignored) { 43 | } 44 | 45 | return HttpResponse.accepted(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/java/com/example/domain/Genre.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.domain; 18 | 19 | import io.micronaut.data.annotation.GeneratedValue; 20 | import io.micronaut.data.annotation.Id; 21 | import io.micronaut.data.annotation.MappedEntity; 22 | import io.micronaut.serde.annotation.Serdeable; 23 | 24 | import jakarta.validation.constraints.NotNull; 25 | 26 | @Serdeable 27 | @MappedEntity 28 | public class Genre { 29 | 30 | @Id 31 | @GeneratedValue 32 | private Long id; 33 | 34 | @NotNull 35 | private String name; 36 | 37 | public Long getId() { 38 | return id; 39 | } 40 | 41 | public void setId(Long id) { 42 | this.id = id; 43 | } 44 | 45 | public String getName() { 46 | return name; 47 | } 48 | 49 | public void setName(String name) { 50 | this.name = name; 51 | } 52 | 53 | @Override 54 | public String toString() { 55 | return "Genre{" + "id=" + id + ", name='" + name + "'}"; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/java/com/example/repository/GenreRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.repository; 18 | 19 | import com.example.domain.Genre; 20 | import io.micronaut.core.annotation.NonNull; 21 | import io.micronaut.data.annotation.Id; 22 | import io.micronaut.data.jdbc.annotation.JdbcRepository; 23 | import io.micronaut.data.repository.PageableRepository; 24 | 25 | import jakarta.validation.constraints.NotBlank; 26 | 27 | import static io.micronaut.data.model.query.builder.sql.Dialect.ORACLE; 28 | 29 | @JdbcRepository(dialect = ORACLE) 30 | public interface GenreRepository extends PageableRepository { 31 | 32 | Genre save(@NonNull @NotBlank String name); 33 | 34 | long update(@Id long id, @NonNull @NotBlank String name); 35 | } 36 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-g-simple/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/resources/META-INF/native-image/resource-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": 3 | [ 4 | { "pattern": "db/migration/.*sql$" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g-simple/src/main/resources/db/migration/V1__schema.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "GENRE" ( 2 | "ID" NUMBER(19) PRIMARY KEY NOT NULL, 3 | "NAME" VARCHAR(255) NOT NULL 4 | ); 5 | CREATE SEQUENCE "GENRE_SEQ" MINVALUE 1 START WITH 1 NOCACHE NOCYCLE; 6 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 2 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/buildSrc/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | plugins { 18 | id 'groovy-gradle-plugin' 19 | } 20 | 21 | repositories { 22 | mavenCentral() 23 | gradlePluginPortal() 24 | } 25 | 26 | dependencies { 27 | implementation("com.github.johnrengelman:shadow:8.1.1") 28 | implementation("io.micronaut.gradle:micronaut-test-resources-plugin:4.0.3") 29 | implementation("io.micronaut.gradle:micronaut-gradle-plugin:4.0.3") 30 | } 31 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/buildSrc/src/main/groovy/cloud.graal.gcn.gcn-bom.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | components { 19 | withModule "cloud.graal.gcn:gcn-bom", EnforceBomDependencies 20 | } 21 | } 22 | 23 | abstract class EnforceBomDependencies implements ComponentMetadataRule { 24 | void execute(ComponentMetadataContext ctx) { 25 | if (ctx.details.id.group == "cloud.graal.gcn" && ctx.details.id.name == "gcn-bom") { 26 | ctx.details.allVariants { 27 | withDependencyConstraints { 28 | it.each { md -> 29 | md.version { 30 | strictly(md.versionConstraint.requiredVersion) 31 | } 32 | } 33 | } 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/gradle.properties: -------------------------------------------------------------------------------- 1 | micronautVersion=4.6.0-oracle-00001 2 | 3 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-g/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/lib/src/main/java/com/exampleg/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-g/lib/src/main/java/com/exampleg/.gitkeep -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/lib/src/main/java/com/exampleg/WarehouseClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.exampleg; 18 | 19 | import io.micronaut.http.annotation.Get; 20 | import io.micronaut.http.annotation.Post; 21 | import io.micronaut.http.annotation.QueryValue; 22 | import io.micronaut.http.client.annotation.Client; 23 | import io.micronaut.tracing.annotation.ContinueSpan; 24 | import io.micronaut.tracing.annotation.NewSpan; 25 | import io.micronaut.tracing.annotation.SpanTag; 26 | 27 | import java.util.Map; 28 | 29 | @Client("/warehouse") // <1> 30 | public interface WarehouseClient { 31 | 32 | @Post("/order") 33 | @NewSpan 34 | void order(@SpanTag("warehouse.order") Map json); 35 | 36 | @Get("/count") 37 | @ContinueSpan 38 | int getItemCount(@QueryValue String store, 39 | @SpanTag @QueryValue int upc); 40 | } 41 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/lib/src/main/java/com/exampleg/WarehouseController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.exampleg; 18 | 19 | import io.micronaut.http.HttpResponse; 20 | import io.micronaut.http.annotation.Controller; 21 | import io.micronaut.http.annotation.Get; 22 | import io.micronaut.http.annotation.Post; 23 | import io.micronaut.scheduling.TaskExecutors; 24 | import io.micronaut.scheduling.annotation.ExecuteOn; 25 | 26 | import java.util.Random; 27 | 28 | @ExecuteOn(TaskExecutors.IO) //<1> 29 | @Controller("/warehouse") // <2> 30 | class WarehouseController { 31 | 32 | @Get("/count") // <3> 33 | HttpResponse getItemCount() { 34 | return HttpResponse.ok(new Random().nextInt(11)); 35 | } 36 | 37 | @Post("/order") // <4> 38 | HttpResponse order() { 39 | try { 40 | //To simulate an external process taking time 41 | Thread.sleep(500); 42 | } catch (InterruptedException ignored) { 43 | } 44 | 45 | return HttpResponse.accepted(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/lib/src/main/java/com/exampleg/domain/Genre.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.exampleg.domain; 18 | 19 | import io.micronaut.data.annotation.GeneratedValue; 20 | import io.micronaut.data.annotation.Id; 21 | import io.micronaut.data.annotation.MappedEntity; 22 | import io.micronaut.serde.annotation.Serdeable; 23 | 24 | import jakarta.validation.constraints.NotNull; 25 | 26 | @Serdeable 27 | @MappedEntity 28 | public class Genre { 29 | 30 | @Id 31 | @GeneratedValue 32 | private Long id; 33 | 34 | @NotNull 35 | private String name; 36 | 37 | public Long getId() { 38 | return id; 39 | } 40 | 41 | public void setId(Long id) { 42 | this.id = id; 43 | } 44 | 45 | public String getName() { 46 | return name; 47 | } 48 | 49 | public void setName(String name) { 50 | this.name = name; 51 | } 52 | 53 | @Override 54 | public String toString() { 55 | return "Genre{" + "id=" + id + ", name='" + name + "'}"; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/lib/src/main/java/com/exampleg/repository/GenreRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.exampleg.repository; 18 | 19 | import com.exampleg.domain.Genre; 20 | import io.micronaut.core.annotation.NonNull; 21 | import io.micronaut.data.annotation.Id; 22 | import io.micronaut.data.jdbc.annotation.JdbcRepository; 23 | import io.micronaut.data.repository.PageableRepository; 24 | 25 | import jakarta.validation.constraints.NotBlank; 26 | 27 | import static io.micronaut.data.model.query.builder.sql.Dialect.ORACLE; 28 | 29 | @JdbcRepository(dialect = ORACLE) 30 | public interface GenreRepository extends PageableRepository { 31 | 32 | Genre save(@NonNull @NotBlank String name); 33 | 34 | long update(@Id long id, @NonNull @NotBlank String name); 35 | } 36 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/lib/src/main/resources/META-INF/native-image/resource-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": 3 | [ 4 | { "pattern": "db/migration/.*sql$" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/lib/src/main/resources/db/migration/V1__schema.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "GENRE" ( 2 | "ID" NUMBER(19) PRIMARY KEY NOT NULL, 3 | "NAME" VARCHAR(255) NOT NULL 4 | ); 5 | CREATE SEQUENCE "GENRE_SEQ" MINVALUE 1 START WITH 1 NOCACHE NOCYCLE; 6 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: default 2 | defaultPackage: com.exampleg 3 | testFramework: junit 4 | sourceLanguage: java 5 | buildTool: gradle 6 | features: [app-name, data, data-jdbc, flyway, gcn-bom, gcn-license, gcn-oci-cloud-app, gcn-oci-database, gcn-oci-logging, gcn-oci-metrics, gcn-oci-tracing, graalvm, gradle, http-client, java, java-application, jdbc-hikari, junit, logback, management, micrometer, micrometer-oracle-cloud, micronaut-build, netty-server, oracle-cloud-atp, oracle-cloud-sdk, properties, readme, serialization-jackson, shade, test-resources, validation] 7 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/oci/src/main/java/com/exampleg/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.exampleg; 18 | 19 | import io.micronaut.core.annotation.NonNull; 20 | import io.micronaut.context.ApplicationContextBuilder; 21 | import io.micronaut.context.ApplicationContextConfigurer; 22 | import io.micronaut.context.annotation.ContextConfigurer; 23 | import io.micronaut.runtime.Micronaut; 24 | 25 | public class Application { 26 | 27 | @ContextConfigurer 28 | public static class Configurer implements ApplicationContextConfigurer { 29 | @Override 30 | public void configure(@NonNull ApplicationContextBuilder builder) { 31 | builder.defaultEnvironments("oraclecloud"); 32 | } 33 | } 34 | public static void main(String[] args) { 35 | Micronaut.run(Application.class, args); 36 | } 37 | } -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/oci/src/main/java/com/exampleg/LogController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.exampleg; 18 | 19 | import io.micronaut.http.annotation.Body; 20 | import io.micronaut.http.annotation.Controller; 21 | import io.micronaut.http.annotation.Post; 22 | import org.slf4j.Logger; 23 | import org.slf4j.LoggerFactory; 24 | 25 | @Controller 26 | class LogController { 27 | 28 | private static final Logger LOG = LoggerFactory.getLogger(LogController.class); 29 | 30 | @Post("/log") 31 | void log(@Body String message) { 32 | LOG.info(message); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/oci/src/main/resources/application-oraclecloud.properties: -------------------------------------------------------------------------------- 1 | flyway.datasources.default.enabled=true 2 | otel.exporter.zipkin.url=https\:// 3 | datasources.default.dialect=ORACLE 4 | micronaut.application.name=oci 5 | datasources.default.ocid= 6 | micronaut.metrics.export.oraclecloud.enabled=true 7 | otel.exporter.zipkin.path=/20200101/observations/public-span?dataFormat\=zipkin&dataFormatVersion\=2&dataKey\=[public key] 8 | micronaut.metrics.export.oraclecloud.namespace=change-me 9 | micronaut.metrics.enabled=true 10 | datasources.default.walletPassword= 11 | oci.config.profile=DEFAULT 12 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/oci/src/main/resources/bootstrap-oraclecloud.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-g/oci/src/main/resources/bootstrap-oraclecloud.properties -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/oci/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/oci/src/test/java/com/exampleg/OciTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.exampleg; 18 | 19 | import io.micronaut.runtime.EmbeddedApplication; 20 | import io.micronaut.test.extensions.junit5.annotation.MicronautTest; 21 | import org.junit.jupiter.api.Test; 22 | import org.junit.jupiter.api.Assertions; 23 | 24 | import jakarta.inject.Inject; 25 | 26 | @MicronautTest 27 | class OciTest { 28 | 29 | @Inject 30 | EmbeddedApplication application; 31 | 32 | @Test 33 | void testItWorks() { 34 | Assertions.assertTrue(application.isRunning()); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/oci/src/test/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | flyway.datasources.default.enabled=true 2 | datasources.default.dialect=ORACLE 3 | datasources.default.ocid= 4 | micronaut.metrics.export.oraclecloud.enabled=false 5 | custom.thread.count.initialDelay=10h 6 | micronaut.metrics.enabled=true 7 | datasources.default.walletPassword= 8 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-g/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | rootProject.name="oci-adm-g" 19 | 20 | include("lib") 21 | include("oci") 22 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-m/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar 19 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 2 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/lib/src/main/java/com/example/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-m/lib/src/main/java/com/example/.gitkeep -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/lib/src/main/java/com/example/WarehouseClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import io.micronaut.http.annotation.Get; 20 | import io.micronaut.http.annotation.Post; 21 | import io.micronaut.http.annotation.QueryValue; 22 | import io.micronaut.http.client.annotation.Client; 23 | import io.micronaut.tracing.annotation.ContinueSpan; 24 | import io.micronaut.tracing.annotation.NewSpan; 25 | import io.micronaut.tracing.annotation.SpanTag; 26 | 27 | import java.util.Map; 28 | 29 | @Client("/warehouse") // <1> 30 | public interface WarehouseClient { 31 | 32 | @Post("/order") 33 | @NewSpan 34 | void order(@SpanTag("warehouse.order") Map json); 35 | 36 | @Get("/count") 37 | @ContinueSpan 38 | int getItemCount(@QueryValue String store, 39 | @SpanTag @QueryValue int upc); 40 | } 41 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/lib/src/main/java/com/example/WarehouseController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import io.micronaut.http.HttpResponse; 20 | import io.micronaut.http.annotation.Controller; 21 | import io.micronaut.http.annotation.Get; 22 | import io.micronaut.http.annotation.Post; 23 | import io.micronaut.scheduling.TaskExecutors; 24 | import io.micronaut.scheduling.annotation.ExecuteOn; 25 | 26 | import java.util.Random; 27 | 28 | @ExecuteOn(TaskExecutors.IO) //<1> 29 | @Controller("/warehouse") // <2> 30 | class WarehouseController { 31 | 32 | @Get("/count") // <3> 33 | HttpResponse getItemCount() { 34 | return HttpResponse.ok(new Random().nextInt(11)); 35 | } 36 | 37 | @Post("/order") // <4> 38 | HttpResponse order() { 39 | try { 40 | //To simulate an external process taking time 41 | Thread.sleep(500); 42 | } catch (InterruptedException ignored) { 43 | } 44 | 45 | return HttpResponse.accepted(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: default 2 | defaultPackage: com.example 3 | testFramework: junit 4 | sourceLanguage: java 5 | buildTool: maven 6 | features: [app-name, gcn-bom, gcn-license, gcn-oci-cloud-app, gcn-oci-logging, gcn-oci-metrics, gcn-oci-tracing, graalvm, http-client, java, java-application, jdbc-hikari, junit, logback, management, maven, maven-enforcer-plugin, micrometer, micrometer-oracle-cloud, netty-server, oracle-cloud-atp, oracle-cloud-sdk, properties, readme, serialization-jackson, shade, test-resources] 7 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/oci/src/main/java/com/example/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import io.micronaut.core.annotation.NonNull; 20 | import io.micronaut.context.ApplicationContextBuilder; 21 | import io.micronaut.context.ApplicationContextConfigurer; 22 | import io.micronaut.context.annotation.ContextConfigurer; 23 | import io.micronaut.runtime.Micronaut; 24 | 25 | public class Application { 26 | 27 | @ContextConfigurer 28 | public static class Configurer implements ApplicationContextConfigurer { 29 | @Override 30 | public void configure(@NonNull ApplicationContextBuilder builder) { 31 | builder.defaultEnvironments("oraclecloud"); 32 | } 33 | } 34 | public static void main(String[] args) { 35 | Micronaut.run(Application.class, args); 36 | } 37 | } -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/oci/src/main/java/com/example/LogController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import io.micronaut.http.annotation.Body; 20 | import io.micronaut.http.annotation.Controller; 21 | import io.micronaut.http.annotation.Post; 22 | import org.slf4j.Logger; 23 | import org.slf4j.LoggerFactory; 24 | 25 | @Controller 26 | class LogController { 27 | 28 | private static final Logger LOG = LoggerFactory.getLogger(LogController.class); 29 | 30 | @Post("/log") 31 | void log(@Body String message) { 32 | LOG.info(message); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/oci/src/main/resources/application-oraclecloud.properties: -------------------------------------------------------------------------------- 1 | otel.exporter.zipkin.url=https\:// 2 | micronaut.application.name=oci 3 | datasources.default.ocid= 4 | micronaut.metrics.export.oraclecloud.enabled=true 5 | otel.exporter.zipkin.path=/20200101/observations/public-span?dataFormat\=zipkin&dataFormatVersion\=2&dataKey\=[public key] 6 | micronaut.metrics.export.oraclecloud.namespace=change-me 7 | micronaut.metrics.enabled=true 8 | datasources.default.walletPassword= 9 | oci.config.profile=DEFAULT 10 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/oci/src/main/resources/bootstrap-oraclecloud.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/gdk-vscode-extensions/152ef930dd6eefd7336ab6130f5a646cb08a3e83/tests/test-projects/adm/oci-adm-m/oci/src/main/resources/bootstrap-oraclecloud.properties -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/oci/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/oci/src/test/java/com/example/OciTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import io.micronaut.runtime.EmbeddedApplication; 20 | import io.micronaut.test.extensions.junit5.annotation.MicronautTest; 21 | import org.junit.jupiter.api.Test; 22 | import org.junit.jupiter.api.Assertions; 23 | 24 | import jakarta.inject.Inject; 25 | 26 | @MicronautTest 27 | class OciTest { 28 | 29 | @Inject 30 | EmbeddedApplication application; 31 | 32 | @Test 33 | void testItWorks() { 34 | Assertions.assertTrue(application.isRunning()); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /tests/test-projects/adm/oci-adm-m/oci/src/test/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | micronaut.metrics.export.oraclecloud.enabled=false 2 | custom.thread.count.initialDelay=10h 3 | micronaut.metrics.enabled=true 4 | -------------------------------------------------------------------------------- /tests/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["tslint:recommended"], 3 | "rules": { 4 | "no-string-throw": true, 5 | "no-unused-expression": true, 6 | "no-duplicate-variable": true, 7 | "curly": true, 8 | "class-name": true, 9 | "semicolon": [true, "always"], 10 | "triple-equals": true, 11 | "no-console": false 12 | }, 13 | "defaultSeverity": "warning", 14 | "linterOptions": { 15 | "exclude": ["test-resources"] 16 | } 17 | } --------------------------------------------------------------------------------