From 482b43b92d70bee542fbed0332cc5c341d525d9d Mon Sep 17 00:00:00 2001 From: Eduardo Martins Date: Tue, 19 Dec 2023 12:45:18 +0000 Subject: [PATCH] [CMTOOL-336] JBoss EAP XP5 Server Migration Support --- .../core/jboss/JBossExtensionNames.java | 4 + .../migration/core/jboss/JBossExtensions.java | 20 ++++ .../core/jboss/JBossSubsystemNames.java | 5 + ...P7_3ToEAPXP8_0ServerMigrationProvider.java | 105 ------------------ ...ration.eap.EAPXPServerMigrationProvider8_0 | 16 --- ...P7_4ToEAPXP8_0ServerMigrationProvider.java | 16 ++- .../migration/eap/EAPServerProvider8_0.java | 2 +- .../jboss/migration/eap/EAPXPServer8_0.java | 6 + .../hostexclude/EAPXP8_0AddHostExcludes.java | 45 ++++++++ ...eMicroprofileMetricsSmallryeSubsystem.java | 30 +++++ ...roprofileOpentracingSmallryeSubsystem.java | 30 +++++ 11 files changed, 154 insertions(+), 125 deletions(-) delete mode 100644 migrations/eap8.0/eap7.3/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_3ToEAPXP8_0ServerMigrationProvider.java delete mode 100644 migrations/eap8.0/eap7.3/src/main/resources/META-INF/services/org.jboss.migration.eap.EAPXPServerMigrationProvider8_0 create mode 100644 servers/eap8.0/src/main/java/org/jboss/migration/eap/task/hostexclude/EAPXP8_0AddHostExcludes.java create mode 100644 servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/metrics/MigrateMicroprofileMetricsSmallryeSubsystem.java create mode 100644 servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/opentracing/MigrateMicroprofileOpentracingSmallryeSubsystem.java diff --git a/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensionNames.java b/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensionNames.java index 9846dcdc1..cbe9e89df 100644 --- a/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensionNames.java +++ b/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensionNames.java @@ -57,15 +57,19 @@ public interface JBossExtensionNames { String METRICS = "org.wildfly.extension.metrics"; String MESSAGING = "org.jboss.as.messaging"; String MESSAGING_ACTIVEMQ = "org.wildfly.extension.messaging-activemq"; + String MICROMETER = "org.wildfly.extension.micrometer"; String MICROPROFILE_CONFIG_SMALLRYE = "org.wildfly.extension.microprofile.config-smallrye"; String MICROPROFILE_FAULT_TOLERANCE_SMALLRYE = "org.wildfly.extension.microprofile.fault-tolerance-smallrye"; String MICROPROFILE_HEALTH_SMALLRYE = "org.wildfly.extension.microprofile.health-smallrye"; String MICROPROFILE_JWT_SMALLRYE = "org.wildfly.extension.microprofile.jwt-smallrye"; + String MICROPROFILE_LRA_COORDINATOR = "org.wildfly.extension.microprofile.lra-coordinator"; + String MICROPROFILE_LRA_PARTICIPANT = "org.wildfly.extension.microprofile.lra-participant"; String MICROPROFILE_METRICS_SMALLRYE = "org.wildfly.extension.microprofile.metrics-smallrye"; String MICROPROFILE_OPENAPI_SMALLRYE = "org.wildfly.extension.microprofile.openapi-smallrye"; String MICROPROFILE_OPENTRACING_SMALLRYE = "org.wildfly.extension.microprofile.opentracing-smallrye"; String MICROPROFILE_REACTIVE_MESSAGING_SMALLRYE = "org.wildfly.extension.microprofile.reactive-messaging-smallrye"; String MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE = "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye"; + String MICROPROFILE_TELEMETRY = "org.wildfly.extension.microprofile.telemetry"; String MODCLUSTER = "org.jboss.as.modcluster"; String NAMING = "org.jboss.as.naming"; String OPENTELEMETRY = "org.wildfly.extension.opentelemetry"; diff --git a/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensions.java b/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensions.java index 5e9a83a27..4700b8cec 100644 --- a/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensions.java +++ b/core/src/main/java/org/jboss/migration/core/jboss/JBossExtensions.java @@ -203,6 +203,11 @@ public interface JBossExtensions { .subsystem(JBossSubsystemNames.MESSAGING_ACTIVEMQ) .build(); + Extension MICROMETER = Extension.builder() + .module(JBossExtensionNames.MICROMETER) + .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROMETER).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROMETER)) + .build(); + Extension MICROPROFILE_CONFIG_SMALLRYE = Extension.builder() .module(JBossExtensionNames.MICROPROFILE_CONFIG_SMALLRYE) .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_CONFIG_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_CONFIG_SMALLRYE)) @@ -223,6 +228,16 @@ public interface JBossExtensions { .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_JWT_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_JWT_SMALLRYE)) .build(); + Extension MICROPROFILE_LRA_COORDINATOR = Extension.builder() + .module(JBossExtensionNames.MICROPROFILE_LRA_COORDINATOR) + .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_LRA_COORDINATOR).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_LRA_COORDINATOR)) + .build(); + + Extension MICROPROFILE_LRA_PARTICIPANT = Extension.builder() + .module(JBossExtensionNames.MICROPROFILE_LRA_PARTICIPANT) + .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_LRA_PARTICIPANT).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_LRA_PARTICIPANT)) + .build(); + Extension MICROPROFILE_METRICS_SMALLRYE = Extension.builder() .module(JBossExtensionNames.MICROPROFILE_METRICS_SMALLRYE) .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_METRICS_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_METRICS_SMALLRYE)) @@ -248,6 +263,11 @@ public interface JBossExtensions { .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE)) .build(); + Extension MICROPROFILE_TELEMETRY = Extension.builder() + .module(JBossExtensionNames.MICROPROFILE_TELEMETRY) + .subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_TELEMETRY).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_TELEMETRY)) + .build(); + Extension MODCLUSTER = Extension.builder() .module(JBossExtensionNames.MODCLUSTER) .subsystem(JBossSubsystemNames.MODCLUSTER) diff --git a/core/src/main/java/org/jboss/migration/core/jboss/JBossSubsystemNames.java b/core/src/main/java/org/jboss/migration/core/jboss/JBossSubsystemNames.java index 208d0d81e..d45f7a285 100644 --- a/core/src/main/java/org/jboss/migration/core/jboss/JBossSubsystemNames.java +++ b/core/src/main/java/org/jboss/migration/core/jboss/JBossSubsystemNames.java @@ -58,15 +58,20 @@ public interface JBossSubsystemNames { String METRICS = "metrics"; String MESSAGING = "messaging"; String MESSAGING_ACTIVEMQ = "messaging-activemq"; + String MICROMETER = "micrometer"; String MICROPROFILE_CONFIG_SMALLRYE = "microprofile-config-smallrye"; String MICROPROFILE_FAULT_TOLERANCE_SMALLRYE = "microprofile-fault-tolerance-smallrye"; String MICROPROFILE_HEALTH_SMALLRYE = "microprofile-health-smallrye"; String MICROPROFILE_JWT_SMALLRYE = "microprofile-jwt-smallrye"; + String MICROPROFILE_LRA_COORDINATOR = "microprofile-lra-coordinator"; + String MICROPROFILE_LRA_PARTICIPANT = "microprofile-lra-participant"; String MICROPROFILE_METRICS_SMALLRYE = "microprofile-metrics-smallrye"; String MICROPROFILE_OPENAPI_SMALLRYE = "microprofile-openapi-smallrye"; String MICROPROFILE_OPENTRACING_SMALLRYE = "microprofile-opentracing-smallrye"; String MICROPROFILE_REACTIVE_MESSAGING_SMALLRYE = "microprofile-reactive-messaging-smallrye"; String MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE = "microprofile-reactive-streams-operators-smallrye"; + String MICROPROFILE_TELEMETRY = "microprofile-telemetry"; + String MODCLUSTER = "modcluster"; String NAMING = "naming"; String OPENTELEMETRY = "opentelemetry"; diff --git a/migrations/eap8.0/eap7.3/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_3ToEAPXP8_0ServerMigrationProvider.java b/migrations/eap8.0/eap7.3/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_3ToEAPXP8_0ServerMigrationProvider.java deleted file mode 100644 index 4b9e82a68..000000000 --- a/migrations/eap8.0/eap7.3/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_3ToEAPXP8_0ServerMigrationProvider.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.migration.eap7.to.eap7; - -import org.jboss.migration.eap.EAPXPServer7_3; -import org.jboss.migration.eap.EAPXPServerMigrationProvider8_0; -import org.jboss.migration.eap.task.hostexclude.EAP8_0AddHostExcludes; -import org.jboss.migration.eap.task.subsystem.jgroups.EAP7_2ToEAP8_0UpdateJGroupsSubsystem; -import org.jboss.migration.eap.task.subsystem.metrics.EAP8_0AddMetricsSubsystem; -import org.jboss.migration.wfly.task.paths.WildFly26_0MigrateReferencedPaths; -import org.jboss.migration.wfly.task.security.LegacySecurityConfigurationMigration; -import org.jboss.migration.wfly.task.subsystem.health.WildFly26_0AddHealthSubsystem; -import org.jboss.migration.wfly.task.subsystem.keycloak.MigrateKeycloakSubsystem; -import org.jboss.migration.wfly.task.subsystem.microprofile.WildFly26_0AddMicroprofileJwtSmallryeSubsystem; -import org.jboss.migration.wfly.task.subsystem.picketlink.MigratePicketLinkSubsystem; -import org.jboss.migration.wfly.task.xml.WildFly26_0MigrateVault; -import org.jboss.migration.wfly.task.xml.WildFly27_0MigrateJBossDomainProperties; -import org.jboss.migration.wfly10.WildFlyServer10; -import org.jboss.migration.wfly10.WildFlyServerMigration10; -import org.jboss.migration.wfly10.config.task.module.MigrateReferencedModules; -import org.jboss.migration.wfly10.config.task.update.RemoveUnsupportedExtensions; -import org.jboss.migration.wfly10.config.task.update.RemoveUnsupportedSubsystems; -import org.jboss.migration.wfly10.config.task.update.ServerUpdate; - -/** - * Server migration, from EAP XP 7.3 to EAP XP 8.0. - * @author emmartins - */ -public class EAPXP7_3ToEAPXP8_0ServerMigrationProvider implements EAPXPServerMigrationProvider8_0 { - - @Override - public WildFlyServerMigration10 getServerMigration() { - final LegacySecurityConfigurationMigration legacySecurityConfigurationMigration = new LegacySecurityConfigurationMigration<>(); - final ServerUpdate.Builders serverUpdateBuilders = new ServerUpdate.Builders<>(); - return serverUpdateBuilders.serverUpdateBuilder() - .standaloneServer(serverUpdateBuilders.standaloneConfigurationBuilder() - .subtask(new WildFly27_0MigrateJBossDomainProperties<>()) - .subtask(legacySecurityConfigurationMigration.getReadLegacySecurityConfiguration()) - .subtask(new RemoveUnsupportedExtensions<>()) - .subtask(new RemoveUnsupportedSubsystems<>()) - .subtask(new MigrateReferencedModules<>()) - .subtask(new WildFly26_0MigrateReferencedPaths<>()) - .subtask(new WildFly26_0MigrateVault<>()) - .subtask(new EAP7_2ToEAP8_0UpdateJGroupsSubsystem<>()) - .subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms()) - .subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem()) - .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron()) - .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron()) - .subtask(new WildFly26_0AddHealthSubsystem<>()) - .subtask(new EAP8_0AddMetricsSubsystem<>()) - .subtask(new WildFly26_0AddMicroprofileJwtSmallryeSubsystem<>()) - .subtask(new MigratePicketLinkSubsystem<>()) - .subtask(new MigrateKeycloakSubsystem<>()) - ) - .domain(serverUpdateBuilders.domainBuilder() - .domainConfigurations(serverUpdateBuilders.domainConfigurationBuilder() - .subtask(new WildFly27_0MigrateJBossDomainProperties<>()) - .subtask(legacySecurityConfigurationMigration.getReadLegacySecurityConfiguration()) - .subtask(new RemoveUnsupportedExtensions<>()) - .subtask(new RemoveUnsupportedSubsystems<>()) - .subtask(new MigrateReferencedModules<>()) - .subtask(new WildFly26_0MigrateReferencedPaths<>()) - .subtask(new WildFly26_0AddMicroprofileJwtSmallryeSubsystem<>()) - .subtask(new EAP8_0AddHostExcludes<>()) - .subtask(new EAP7_2ToEAP8_0UpdateJGroupsSubsystem<>()) - .subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem()) - .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron()) - .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron()) - .subtask(new MigratePicketLinkSubsystem<>()) - .subtask(new MigrateKeycloakSubsystem<>()) - ) - .hostConfigurations(serverUpdateBuilders.hostConfigurationBuilder() - .subtask(new WildFly27_0MigrateJBossDomainProperties<>()) - .subtask(legacySecurityConfigurationMigration.getReadLegacySecurityConfiguration()) - .subtask(new MigrateReferencedModules<>()) - .subtask(new WildFly26_0MigrateReferencedPaths<>()) - .subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms()) - .subtask(serverUpdateBuilders.hostBuilder() - .subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem()) - .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron()) - .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron()) - ) - ) - ).build(); - } - - @Override - public Class getSourceType() { - return EAPXPServer7_3.class; - } -} diff --git a/migrations/eap8.0/eap7.3/src/main/resources/META-INF/services/org.jboss.migration.eap.EAPXPServerMigrationProvider8_0 b/migrations/eap8.0/eap7.3/src/main/resources/META-INF/services/org.jboss.migration.eap.EAPXPServerMigrationProvider8_0 deleted file mode 100644 index ccb2f12c7..000000000 --- a/migrations/eap8.0/eap7.3/src/main/resources/META-INF/services/org.jboss.migration.eap.EAPXPServerMigrationProvider8_0 +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright 2022 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -org.jboss.migration.eap7.to.eap7.EAPXP7_3ToEAPXP8_0ServerMigrationProvider \ No newline at end of file diff --git a/migrations/eap8.0/eap7.4/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_4ToEAPXP8_0ServerMigrationProvider.java b/migrations/eap8.0/eap7.4/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_4ToEAPXP8_0ServerMigrationProvider.java index d22b41b33..0c528feb7 100644 --- a/migrations/eap8.0/eap7.4/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_4ToEAPXP8_0ServerMigrationProvider.java +++ b/migrations/eap8.0/eap7.4/src/main/java/org/jboss/migration/eap7/to/eap7/EAPXP7_4ToEAPXP8_0ServerMigrationProvider.java @@ -18,8 +18,10 @@ import org.jboss.migration.eap.EAPXPServer7_4; import org.jboss.migration.eap.EAPXPServerMigrationProvider8_0; -import org.jboss.migration.eap.task.hostexclude.EAP8_0AddHostExcludes; +import org.jboss.migration.eap.task.hostexclude.EAPXP8_0AddHostExcludes; import org.jboss.migration.eap.task.subsystem.jgroups.EAP7_2ToEAP8_0UpdateJGroupsSubsystem; +import org.jboss.migration.eap.task.subsystem.metrics.MigrateMicroprofileMetricsSmallryeSubsystem; +import org.jboss.migration.eap.task.subsystem.opentracing.MigrateMicroprofileOpentracingSmallryeSubsystem; import org.jboss.migration.wfly.task.paths.WildFly26_0MigrateReferencedPaths; import org.jboss.migration.wfly.task.security.LegacySecurityConfigurationMigration; import org.jboss.migration.wfly.task.subsystem.keycloak.MigrateKeycloakSubsystem; @@ -29,6 +31,7 @@ import org.jboss.migration.wfly10.WildFlyServer10; import org.jboss.migration.wfly10.WildFlyServerMigration10; import org.jboss.migration.wfly10.config.task.module.MigrateReferencedModules; +import org.jboss.migration.wfly10.config.task.update.MigrateDeployments; import org.jboss.migration.wfly10.config.task.update.RemoveUnsupportedExtensions; import org.jboss.migration.wfly10.config.task.update.RemoveUnsupportedSubsystems; import org.jboss.migration.wfly10.config.task.update.ServerUpdate; @@ -51,14 +54,17 @@ public WildFlyServerMigration10 getServerMigration() { .subtask(new RemoveUnsupportedSubsystems<>()) .subtask(new MigrateReferencedModules<>()) .subtask(new WildFly26_0MigrateReferencedPaths<>()) + .subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms()) .subtask(new WildFly26_0MigrateVault<>()) .subtask(new EAP7_2ToEAP8_0UpdateJGroupsSubsystem<>()) - .subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms()) .subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem()) .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron()) .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron()) .subtask(new MigratePicketLinkSubsystem<>()) .subtask(new MigrateKeycloakSubsystem<>()) + .subtask(new MigrateMicroprofileMetricsSmallryeSubsystem<>()) + .subtask(new MigrateMicroprofileOpentracingSmallryeSubsystem<>()) + .subtask(new MigrateDeployments<>()) ) .domain(serverUpdateBuilders.domainBuilder() .domainConfigurations(serverUpdateBuilders.domainConfigurationBuilder() @@ -68,13 +74,17 @@ public WildFlyServerMigration10 getServerMigration() { .subtask(new RemoveUnsupportedSubsystems<>()) .subtask(new MigrateReferencedModules<>()) .subtask(new WildFly26_0MigrateReferencedPaths<>()) - .subtask(new EAP8_0AddHostExcludes<>()) + .subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms()) + .subtask(new EAPXP8_0AddHostExcludes<>()) .subtask(new EAP7_2ToEAP8_0UpdateJGroupsSubsystem<>()) .subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem()) .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron()) .subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron()) .subtask(new MigratePicketLinkSubsystem<>()) .subtask(new MigrateKeycloakSubsystem<>()) + .subtask(new MigrateMicroprofileMetricsSmallryeSubsystem<>()) + .subtask(new MigrateMicroprofileOpentracingSmallryeSubsystem<>()) + .subtask(new MigrateDeployments<>()) ) .hostConfigurations(serverUpdateBuilders.hostConfigurationBuilder() .subtask(new WildFly27_0MigrateJBossDomainProperties<>()) diff --git a/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPServerProvider8_0.java b/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPServerProvider8_0.java index 0f59e6bda..5d999d520 100644 --- a/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPServerProvider8_0.java +++ b/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPServerProvider8_0.java @@ -64,7 +64,7 @@ protected Server constructServer(String migrationName, ProductInfo productInfo, } protected boolean isXp(Path baseDir) { - if (Files.exists(baseDir.resolve(".installation").resolve("jboss-eap-xp-4.0.conf"))) { + if (Files.exists(baseDir.resolve(".installation").resolve("jboss-eap-xp-5.0.conf"))) { return true; } // fallback for internal XP builds diff --git a/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPXPServer8_0.java b/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPXPServer8_0.java index 684471f6d..590b1b84a 100644 --- a/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPXPServer8_0.java +++ b/servers/eap8.0/src/main/java/org/jboss/migration/eap/EAPXPServer8_0.java @@ -36,15 +36,21 @@ public class EAPXPServer8_0 extends WildFlyServer10 { public static final Extensions EXTENSIONS = Extensions.builder() .extensions(EAPServer8_0.EXTENSIONS) + .extension(JBossExtensions.MICROMETER) .extension(JBossExtensions.MICROPROFILE_CONFIG_SMALLRYE) .extension(JBossExtensions.MICROPROFILE_FAULT_TOLERANCE_SMALLRYE) .extension(JBossExtensions.MICROPROFILE_HEALTH_SMALLRYE) .extension(JBossExtensions.MICROPROFILE_JWT_SMALLRYE) + // workaround for issue with migrate ops .extension(JBossExtensions.MICROPROFILE_METRICS_SMALLRYE) + .extension(JBossExtensions.MICROPROFILE_LRA_COORDINATOR) + .extension(JBossExtensions.MICROPROFILE_LRA_PARTICIPANT) .extension(JBossExtensions.MICROPROFILE_OPENAPI_SMALLRYE) .extension(JBossExtensions.MICROPROFILE_OPENTRACING_SMALLRYE) .extension(JBossExtensions.MICROPROFILE_REACTIVE_MESSAGING_SMALLRYE) .extension(JBossExtensions.MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE) + .extension(JBossExtensions.MICROPROFILE_TELEMETRY) + .extension(JBossExtensions.OPENTELEMETRY) .build(); public EAPXPServer8_0(String migrationName, ProductInfo productInfo, Path baseDir, MigrationEnvironment migrationEnvironment) { diff --git a/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/hostexclude/EAPXP8_0AddHostExcludes.java b/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/hostexclude/EAPXP8_0AddHostExcludes.java new file mode 100644 index 000000000..fcf1228dc --- /dev/null +++ b/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/hostexclude/EAPXP8_0AddHostExcludes.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jboss.migration.eap.task.hostexclude; + +import org.jboss.migration.core.jboss.HostExclude; +import org.jboss.migration.core.jboss.HostExcludes; +import org.jboss.migration.core.jboss.JBossExtensionNames; +import org.jboss.migration.wfly10.config.task.hostexclude.AddHostExcludes; + +/** + * @author emmartins + */ +public class EAPXP8_0AddHostExcludes extends AddHostExcludes { + + private static final HostExcludes HOST_EXCLUDES = HostExcludes.builder() + .hostExclude(HostExclude.builder() + .name("EAP74") + .release("EAP7.4") + .excludedExtension(JBossExtensionNames.CLUSTERING_EJB) + .excludedExtension(JBossExtensionNames.ELYTRON_OIDC_CLIENT) + .excludedExtension(JBossExtensionNames.OPENTELEMETRY) + .excludedExtension(JBossExtensionNames.MICROMETER) + .excludedExtension(JBossExtensionNames.MICROPROFILE_LRA_COORDINATOR) + .excludedExtension(JBossExtensionNames.MICROPROFILE_LRA_PARTICIPANT) + .excludedExtension(JBossExtensionNames.MICROPROFILE_TELEMETRY) + ) + .build(); + + public EAPXP8_0AddHostExcludes() { + super(HOST_EXCLUDES); + } +} diff --git a/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/metrics/MigrateMicroprofileMetricsSmallryeSubsystem.java b/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/metrics/MigrateMicroprofileMetricsSmallryeSubsystem.java new file mode 100644 index 000000000..90f27c3ea --- /dev/null +++ b/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/metrics/MigrateMicroprofileMetricsSmallryeSubsystem.java @@ -0,0 +1,30 @@ +/* + * Copyright 2017 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jboss.migration.eap.task.subsystem.metrics; + +import org.jboss.migration.core.jboss.JBossExtensionNames; +import org.jboss.migration.core.jboss.JBossSubsystemNames; +import org.jboss.migration.wfly10.config.task.management.subsystem.MigrateSubsystemResources; + +/** + * @author emmartins + */ +public class MigrateMicroprofileMetricsSmallryeSubsystem extends MigrateSubsystemResources { + public MigrateMicroprofileMetricsSmallryeSubsystem() { + super(JBossExtensionNames.MICROPROFILE_METRICS_SMALLRYE, JBossSubsystemNames.MICROPROFILE_METRICS_SMALLRYE); + } +} diff --git a/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/opentracing/MigrateMicroprofileOpentracingSmallryeSubsystem.java b/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/opentracing/MigrateMicroprofileOpentracingSmallryeSubsystem.java new file mode 100644 index 000000000..02f4242b9 --- /dev/null +++ b/servers/eap8.0/src/main/java/org/jboss/migration/eap/task/subsystem/opentracing/MigrateMicroprofileOpentracingSmallryeSubsystem.java @@ -0,0 +1,30 @@ +/* + * Copyright 2017 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jboss.migration.eap.task.subsystem.opentracing; + +import org.jboss.migration.core.jboss.JBossExtensionNames; +import org.jboss.migration.core.jboss.JBossSubsystemNames; +import org.jboss.migration.wfly10.config.task.management.subsystem.MigrateSubsystemResources; + +/** + * @author emmartins + */ +public class MigrateMicroprofileOpentracingSmallryeSubsystem extends MigrateSubsystemResources { + public MigrateMicroprofileOpentracingSmallryeSubsystem() { + super(JBossExtensionNames.MICROPROFILE_OPENTRACING_SMALLRYE, JBossSubsystemNames.MICROPROFILE_OPENTRACING_SMALLRYE); + } +}