forked from emmartins/wildfly-server-migration
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CMTOOL-363] WildFly 32 server migration modules
- Loading branch information
Showing
35 changed files
with
1,590 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2021 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. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.jboss.migration</groupId> | ||
<artifactId>jboss-server-migration-parent</artifactId> | ||
<version>32.0.0.Final-SNAPSHOT</version> | ||
<relativePath>../../../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>jboss-server-migration-wildfly22.0-to-wildfly32.0</artifactId> | ||
|
||
<name>JBoss Server Migration: WildFly 22.0 to WildFly 32.0</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jboss-server-migration-wildfly22.0-server</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jboss-server-migration-wildfly32.0-server</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
95 changes: 95 additions & 0 deletions
95
...c/main/java/org/jboss/migration/wfly/WildFly22_0ToWildFly32_0ServerMigrationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
* Copyright 2021 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.wfly; | ||
|
||
import org.jboss.migration.wfly.task.hostexclude.WildFly32_0AddHostExcludes; | ||
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; | ||
import org.jboss.migration.wfly.task.subsystem.picketlink.MigratePicketLinkSubsystem; | ||
import org.jboss.migration.wfly.task.update.WildFly22_0UpdateInfinispanSubsystem; | ||
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 to WFLY 32.0, from WFLY 22.0. | ||
* @author emmartins | ||
*/ | ||
public class WildFly22_0ToWildFly32_0ServerMigrationProvider implements WildFly32_0ServerMigrationProvider { | ||
|
||
@Override | ||
public WildFlyServerMigration10 getServerMigration() { | ||
final LegacySecurityConfigurationMigration<WildFlyServer10> legacySecurityConfigurationMigration = new LegacySecurityConfigurationMigration<>(); | ||
final ServerUpdate.Builders<WildFlyServer10> 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 WildFly22_0UpdateInfinispanSubsystem<>()) | ||
.subtask(new WildFly26_0MigrateVault<>()) | ||
.subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms()) | ||
.subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem()) | ||
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron()) | ||
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron()) | ||
.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 WildFly22_0UpdateInfinispanSubsystem<>()) | ||
.subtask(new WildFly32_0AddHostExcludes<>()) | ||
.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<WildFly22_0Server> getSourceType() { | ||
return WildFly22_0Server.class; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...n/resources/META-INF/services/org.jboss.migration.wfly.WildFly32_0ServerMigrationProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Copyright 2021 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.wfly.WildFly22_0ToWildFly32_0ServerMigrationProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2021 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. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.jboss.migration</groupId> | ||
<artifactId>jboss-server-migration-parent</artifactId> | ||
<version>32.0.0.Final-SNAPSHOT</version> | ||
<relativePath>../../../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>jboss-server-migration-wildfly23.0-to-wildfly32.0</artifactId> | ||
|
||
<name>JBoss Server Migration: WildFly 23.0 to WildFly 32.0</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jboss-server-migration-wildfly23.0-server</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jboss-server-migration-wildfly32.0-server</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
94 changes: 94 additions & 0 deletions
94
...c/main/java/org/jboss/migration/wfly/WildFly23_0ToWildFly32_0ServerMigrationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* Copyright 2021 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.wfly; | ||
|
||
import org.jboss.migration.wfly.task.hostexclude.WildFly32_0AddHostExcludes; | ||
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; | ||
import org.jboss.migration.wfly.task.subsystem.picketlink.MigratePicketLinkSubsystem; | ||
import org.jboss.migration.wfly.task.update.WildFly22_0UpdateInfinispanSubsystem; | ||
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 to WFLY 32.0, from WFLY 23.0. | ||
* @author emmartins | ||
*/ | ||
public class WildFly23_0ToWildFly32_0ServerMigrationProvider implements WildFly32_0ServerMigrationProvider { | ||
|
||
@Override | ||
public WildFlyServerMigration10 getServerMigration() { | ||
final LegacySecurityConfigurationMigration<WildFlyServer10> legacySecurityConfigurationMigration = new LegacySecurityConfigurationMigration<>(); | ||
final ServerUpdate.Builders<WildFlyServer10> 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 WildFly22_0UpdateInfinispanSubsystem<>()) | ||
.subtask(new WildFly26_0MigrateVault<>()) | ||
.subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms()) | ||
.subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem()) | ||
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron()) | ||
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron()) | ||
.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 WildFly32_0AddHostExcludes<>()) | ||
.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<WildFly23_0Server> getSourceType() { | ||
return WildFly23_0Server.class; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...n/resources/META-INF/services/org.jboss.migration.wfly.WildFly32_0ServerMigrationProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Copyright 2021 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.wfly.WildFly23_0ToWildFly32_0ServerMigrationProvider |
Oops, something went wrong.