From 71454e1deea381d013add96d7eb1a60026fc9b27 Mon Sep 17 00:00:00 2001 From: Jan Stourac Date: Tue, 12 Oct 2021 15:33:35 +0200 Subject: [PATCH 1/2] Remove support for AS7 We are keeping the `creaper.wildfly` property. We are also keeping the default use of `remote` protocol with `9999` port. --- CHANGELOG.md | 2 + CONTRIBUTING.md | 16 +--- README.md | 24 ------ .../wildfly/extras/creaper/test/AS7Tests.java | 5 -- testsuite/pom.xml | 63 +------------- .../messaging/RemoveTopicOnlineTest.java | 66 -------------- .../commands/web/AddConnectorOnlineTest.java | 86 ------------------- .../web/AddConnectorSslConfigOnlineTest.java | 76 ---------------- 8 files changed, 10 insertions(+), 328 deletions(-) delete mode 100644 testsuite/common/src/main/java/org/wildfly/extras/creaper/test/AS7Tests.java delete mode 100644 testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/messaging/RemoveTopicOnlineTest.java delete mode 100644 testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorOnlineTest.java delete mode 100644 testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorSslConfigOnlineTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e24ad3..8296e3ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## 2.0.0 (not yet released) - move to JDK 8 as a minimal required JDK version +- support for AS7 officially removed + - note: the property `creaper.wildfly` and protocol `remoting` with `9999` are still kept as default for now ## 1.6.2 [The Speedy Gonzales Edition](https://en.wikipedia.org/wiki/Speedy_Gonzales) (2020-11-05) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1169f188..c0c78b35 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,22 +37,14 @@ a running application server use Arquillian. This means that it's enough to run time to execute, so these are not executed by default. To execute them, activate the `slow-tests` profile by running `mvn test -Pslow-tests`. -By default, the tests run against WildFly 10. If you want to run the tests -against AS7 or previous WildFly, activate one of the test suite profiles: +By default, the tests run against WildFly 20. If you want to run the tests +against previous WildFly, activate one of the test suite profiles: `mvn clean test -Pwildfly8`. Available profiles are: -- `as7` (see below) - `wildfly8` - `wildfly9` -- `wildfly10` (active by default) - -Using the `as7` profile requires access to a Maven repository that, in addition -to all other dependencies, also contains the respective AS7 distribution under -these coordinates: `org.jboss.as:jboss-as-dist:${version.org.jboss.as.jboss-as-everything}` -(see `pom.xml` for version number). The URL of the repository must be specified -using a system property `maven.jboss.ga.repository.url` (again see `pom.xml`): - - mvn clean test -Pas7 -Dmaven.jboss.ga.repository.url=... +- ... +- `wildfly20` (active by default) To run a single test from the test suite, the following Maven invocation works: `mvn clean test -pl testsuite/standalone/ -Dtest=...` (possibly with a profile diff --git a/README.md b/README.md index 449fdca5..dc4d7023 100644 --- a/README.md +++ b/README.md @@ -74,30 +74,6 @@ in previous WildFly versions, but was moved to a separate module due to messaging changes). These dependencies are not listed here, because there are no commands in Creaper that use them. -#### JBoss AS 7 - -Dependencies for `creaper-core`: - - - - org.jboss.as - jboss-as-controller-client - 7.5.0.Final-redhat-21 - - - org.jboss.as - jboss-as-cli - 7.5.0.Final-redhat-21 - - -Dependencies for `creaper-commands`: - - - org.wildfly - wildfly-patching - 7.5.0.Final-redhat-21 - - #### WildFly 8 Dependencies for `creaper-core`: diff --git a/testsuite/common/src/main/java/org/wildfly/extras/creaper/test/AS7Tests.java b/testsuite/common/src/main/java/org/wildfly/extras/creaper/test/AS7Tests.java deleted file mode 100644 index 1c1bd830..00000000 --- a/testsuite/common/src/main/java/org/wildfly/extras/creaper/test/AS7Tests.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.wildfly.extras.creaper.test; - -/** Category marker for tests that require AS7 and can't run with WildFly. */ -public interface AS7Tests { -} diff --git a/testsuite/pom.xml b/testsuite/pom.xml index 06df971d..22a5f734 100644 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -20,7 +20,6 @@ - ${version.org.jboss.as.jboss-as-everything} 8.2.1.Final 9.0.2.Final 1.0.2.Final @@ -60,23 +59,13 @@ 2.2.0.Final - 9999 9990 - org.wildfly.extras.creaper.test.WildFlyTests - org.wildfly.extras.creaper.test.AS7Tests, org.wildfly.extras.creaper.test.WildFly11Tests - org.wildfly.extras.creaper.test.AS7Tests + org.wildfly.extras.creaper.test.WildFly11Tests + - -Dcreaper.wildfly - org.jboss.as - jboss-as-dist - ${version.as7} - org.jboss.as - jboss-as-arquillian-container-managed - ${version.as7} - org.wildfly wildfly-dist ${version.wildfly8} @@ -168,8 +157,8 @@ wildfly-arquillian-container-managed ${version.wildfly20.arquillian} - + MUST-BE-DEFINED MUST-BE-DEFINED MUST-BE-DEFINED @@ -364,50 +353,6 @@ - - as7 - - - ${as7.applicationServer.groupId} - ${as7.applicationServer.artifactId} - ${as7.applicationServer.version} - ${managementPort.as7} - - ${as7.arquillianContainer.groupId} - ${as7.arquillianContainer.artifactId} - ${as7.arquillianContainer.version} - - ${ignoredCategory.as7} - ${specialJvmArgs.as7} - - - - - org.wildfly.extras.creaper - creaper-core - - - org.wildfly.extras.creaper - creaper-commands - - - - org.jboss.as - jboss-as-controller-client - ${version.as7} - - - org.jboss.as - jboss-as-cli - ${version.as7} - - - org.wildfly - wildfly-patching - ${version.as7} - - - wildfly8 diff --git a/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/messaging/RemoveTopicOnlineTest.java b/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/messaging/RemoveTopicOnlineTest.java deleted file mode 100644 index 77cd019d..00000000 --- a/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/messaging/RemoveTopicOnlineTest.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.wildfly.extras.creaper.commands.messaging; - -import org.jboss.arquillian.junit.Arquillian; -import org.wildfly.extras.creaper.core.CommandFailedException; -import org.wildfly.extras.creaper.core.ManagementClient; -import org.wildfly.extras.creaper.core.online.OnlineManagementClient; -import org.wildfly.extras.creaper.core.online.OnlineOptions; -import org.wildfly.extras.creaper.core.online.operations.OperationException; -import org.wildfly.extras.creaper.core.online.operations.Operations; -import org.wildfly.extras.creaper.core.online.operations.admin.Administration; -import org.wildfly.extras.creaper.test.AS7Tests; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import java.io.IOException; -import java.util.Collections; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -@Category(AS7Tests.class) -@RunWith(Arquillian.class) -public class RemoveTopicOnlineTest { - private Operations ops; - private OnlineManagementClient client; - private Administration administration; - - private static final String TEST_TOPIC_NAME = "topicTest"; - private static final String TEST_TOPIC_NAME_JNDI = "java:/jms/topic/" + TEST_TOPIC_NAME; - - @Before - public void connect() throws IOException { - client = ManagementClient.online(OnlineOptions.standalone().localDefault().build()); - ops = new Operations(client); - administration = new Administration(client); - } - - @After - public void cleanup() throws Exception { - try { - ops.removeIfExists(MessagingUtils.address(client, MessagingUtils.DEFAULT_SERVER_NAME) - .and("jms-topic", TEST_TOPIC_NAME)); - administration.reloadIfRequired(); - } finally { - client.close(); - } - } - - @Test - public void removeTopic() throws CommandFailedException, IOException, OperationException { - client.apply(new AddTopic.Builder(TEST_TOPIC_NAME, "default") - .jndiEntries(Collections.singletonList(TEST_TOPIC_NAME_JNDI)) - .build()); - - assertTrue("The topic should be created", ops.exists( - MessagingUtils.address(client, MessagingUtils.DEFAULT_SERVER_NAME).and("jms-topic", TEST_TOPIC_NAME))); - - client.apply(new RemoveTopic(TEST_TOPIC_NAME, "default")); - - assertFalse("The topic should be removed", ops.exists( - MessagingUtils.address(client, MessagingUtils.DEFAULT_SERVER_NAME).and("jms-topic", TEST_TOPIC_NAME))); - } -} diff --git a/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorOnlineTest.java b/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorOnlineTest.java deleted file mode 100644 index 5df2ea9c..00000000 --- a/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorOnlineTest.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.wildfly.extras.creaper.commands.web; - -import org.jboss.arquillian.junit.Arquillian; -import org.wildfly.extras.creaper.core.CommandFailedException; -import org.wildfly.extras.creaper.core.ManagementClient; -import org.wildfly.extras.creaper.core.online.CliException; -import org.wildfly.extras.creaper.core.online.ModelNodeResult; -import org.wildfly.extras.creaper.core.online.OnlineManagementClient; -import org.wildfly.extras.creaper.core.online.OnlineOptions; -import org.wildfly.extras.creaper.core.online.operations.Address; -import org.wildfly.extras.creaper.core.online.operations.OperationException; -import org.wildfly.extras.creaper.core.online.operations.Operations; -import org.wildfly.extras.creaper.core.online.operations.admin.Administration; -import org.wildfly.extras.creaper.test.AS7Tests; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import java.io.IOException; -import java.util.concurrent.TimeoutException; - -@Category(AS7Tests.class) -@RunWith(Arquillian.class) -public class AddConnectorOnlineTest { - private static final String TEST_CONNECTOR_NAME = "test-http"; - - private OnlineManagementClient client; - private Operations ops; - private Administration admin; - - @Before - public void connect() throws IOException { - client = ManagementClient.online(OnlineOptions.standalone().localDefault().build()); - ops = new Operations(client); - admin = new Administration(client); - } - - @After - public void close() throws IOException, CliException, OperationException, TimeoutException, InterruptedException { - ops.removeIfExists(Address.subsystem("web").and("connector", TEST_CONNECTOR_NAME)); - admin.reloadIfRequired(); - client.close(); - } - - @Test - public void addSimpleConnector_commandSucceeds() throws CommandFailedException, IOException { - client.apply(new AddConnector.Builder(TEST_CONNECTOR_NAME) - .protocol("HTTP/1.1") - .scheme("http") - .socketBinding("http") - .enabled(false) - .build()); - - ModelNodeResult result = ops.readAttribute(Address.subsystem("web").and("connector", TEST_CONNECTOR_NAME), - "scheme"); - result.assertSuccess(); - } - - @Test - public void addConnectorWithAllAttributes_commandSucceeds() throws CommandFailedException, IOException { - client.apply(new AddConnector.Builder(TEST_CONNECTOR_NAME) - .protocol("HTTP/1.1") - .scheme("http") - .socketBinding("http") - .enabled(false) - .enableLookups(false) - .maxConnections(10) - .maxPostSize(20) - .maxSavePostSize(20) - .proxyBinding("test-binding") - .proxyName("test-proxy") - .proxyPort(7000) - .redirectBinding("https") - .redirectPort(8443) - .secure(false) - .virtualServer("default-host") - .executor("test-executor") - .build()); - - ModelNodeResult result = ops.readAttribute(Address.subsystem("web").and("connector", TEST_CONNECTOR_NAME), - "scheme"); - result.assertSuccess(); - } -} diff --git a/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorSslConfigOnlineTest.java b/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorSslConfigOnlineTest.java deleted file mode 100644 index ea014775..00000000 --- a/testsuite/standalone/src/test/java/org/wildfly/extras/creaper/commands/web/AddConnectorSslConfigOnlineTest.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.wildfly.extras.creaper.commands.web; - -import org.jboss.arquillian.junit.Arquillian; -import org.wildfly.extras.creaper.core.CommandFailedException; -import org.wildfly.extras.creaper.core.ManagementClient; -import org.wildfly.extras.creaper.core.online.CliException; -import org.wildfly.extras.creaper.core.online.ModelNodeResult; -import org.wildfly.extras.creaper.core.online.OnlineManagementClient; -import org.wildfly.extras.creaper.core.online.OnlineOptions; -import org.wildfly.extras.creaper.core.online.operations.Address; -import org.wildfly.extras.creaper.core.online.operations.OperationException; -import org.wildfly.extras.creaper.core.online.operations.Operations; -import org.wildfly.extras.creaper.test.AS7Tests; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import java.io.IOException; - -@Category(AS7Tests.class) -@RunWith(Arquillian.class) -public class AddConnectorSslConfigOnlineTest { - private static final String TEST_CONNECTOR_NAME = "test-http-ssl"; - - private OnlineManagementClient client; - private Operations ops; - - @Before - public void connect() throws IOException, CommandFailedException, OperationException { - client = ManagementClient.online(OnlineOptions.standalone().localDefault().build()); - ops = new Operations(client); - - ops.removeIfExists(Address.subsystem("web").and("connector", TEST_CONNECTOR_NAME)); - - client.apply(new AddConnector.Builder(TEST_CONNECTOR_NAME) - .protocol("HTTP/1.1") - .scheme("https") - .socketBinding("https") - .enabled(false) - .build()); - } - - @After - public void close() throws IOException, CliException, OperationException { - ops.removeIfExists(Address.subsystem("web").and("connector", TEST_CONNECTOR_NAME)); - client.close(); - } - - @Test - public void addConnectorWithSslConfig_commandSucceeds() throws CommandFailedException, IOException { - client.apply(new AddConnectorSslConfig.Builder(TEST_CONNECTOR_NAME) - .caCertificateFile("/path/to/ca-certificate-file") - .caCertificatePassword("password") - .caRevocationUrl("file:///revocationURL") - .certificateFile("/path/to/certificate-file") - .certificateKeyFile("/path/to/certificate-key-file") - .cipherSuite("cipherSuite") - .keyAlias("keyAlias") - .keystoreType("JKS") - .password("password") - .protocol("protocol") - .sessionCacheSize(100) - .sessionTimeout(30) - .sslProtocol("TLS") - .truststoreType("JKS") - .verifyClient("false") - .verifyDepth(1) - .build()); - - ModelNodeResult result = ops.readResource( - Address.subsystem("web").and("connector", TEST_CONNECTOR_NAME).and("configuration", "ssl")); - result.assertSuccess(); - } -} From cbb3b03a4e6dab2d037eaecb34e3892265ee8546 Mon Sep 17 00:00:00 2001 From: Jan Stourac Date: Tue, 12 Oct 2021 18:08:25 +0200 Subject: [PATCH 2/2] Remove support for WildFly 8 and WildFly 9 Both versions are quite old and their default profile requires JDK7 to use. Since we moved to JDK8 as a minimum, let's just discard these so we can move on a bit. --- CHANGELOG.md | 1 + CONTRIBUTING.md | 8 ++-- README.md | 46 ------------------- testsuite/pom.xml | 114 +--------------------------------------------- 4 files changed, 7 insertions(+), 162 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8296e3ff..bc099c3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - move to JDK 8 as a minimal required JDK version - support for AS7 officially removed - note: the property `creaper.wildfly` and protocol `remoting` with `9999` are still kept as default for now +- support for WildFly 8 and WildFly 9 officially removed ## 1.6.2 [The Speedy Gonzales Edition](https://en.wikipedia.org/wiki/Speedy_Gonzales) (2020-11-05) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0c78b35..2cc5493f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,16 +39,16 @@ activate the `slow-tests` profile by running `mvn test -Pslow-tests`. By default, the tests run against WildFly 20. If you want to run the tests against previous WildFly, activate one of the test suite profiles: -`mvn clean test -Pwildfly8`. Available profiles are: +`mvn clean test -Pwildfly10`. Available profiles are: -- `wildfly8` -- `wildfly9` +- `wildfly10` +- `wildfly11` - ... - `wildfly20` (active by default) To run a single test from the test suite, the following Maven invocation works: `mvn clean test -pl testsuite/standalone/ -Dtest=...` (possibly with a profile -activation `-Pwildfly8`). See +activation `-Pwildfly10`). See [Surefire documentation](http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html) for more details about `-Dtest`. diff --git a/README.md b/README.md index dc4d7023..c23acbef 100644 --- a/README.md +++ b/README.md @@ -74,52 +74,6 @@ in previous WildFly versions, but was moved to a separate module due to messaging changes). These dependencies are not listed here, because there are no commands in Creaper that use them. -#### WildFly 8 - -Dependencies for `creaper-core`: - - - org.wildfly - wildfly-controller-client - 8.2.1.Final - - - org.wildfly - wildfly-cli - 8.2.1.Final - - -Dependencies for `creaper-commands`: - - - org.wildfly - wildfly-patching - 8.2.1.Final - - -#### WildFly 9 (based on WildFly Core 1) - -Dependencies for `creaper-core`: - - - org.wildfly.core - wildfly-controller-client - 1.0.2.Final - - - org.wildfly.core - wildfly-cli - 1.0.2.Final - - -Dependencies for `creaper-commands`: - - - org.wildfly.core - wildfly-patching - 1.0.2.Final - - #### WildFly 10 (based on WildFly Core 2) Dependencies for `creaper-core`: diff --git a/testsuite/pom.xml b/testsuite/pom.xml index 22a5f734..c3549a85 100644 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -20,10 +20,6 @@ - 8.2.1.Final - 9.0.2.Final - 1.0.2.Final - 1.0.2.Final 10.1.0.Final 2.2.0.Final 1.1.0.Final @@ -66,20 +62,6 @@ -Dcreaper.wildfly - org.wildfly - wildfly-dist - ${version.wildfly8} - org.wildfly - wildfly-arquillian-container-managed - ${version.wildfly8} - - org.wildfly - wildfly-dist - ${version.wildfly9} - org.wildfly.arquillian - wildfly-arquillian-container-managed - ${version.wildfly9.arquillian} - org.wildfly wildfly-dist ${version.wildfly10} @@ -157,8 +139,8 @@ wildfly-arquillian-container-managed ${version.wildfly20.arquillian} - + MUST-BE-DEFINED MUST-BE-DEFINED MUST-BE-DEFINED @@ -353,98 +335,6 @@ - - wildfly8 - - - 1.7 - - ${wildfly8.applicationServer.groupId} - ${wildfly8.applicationServer.artifactId} - ${wildfly8.applicationServer.version} - ${managementPort.wildfly} - - ${wildfly8.arquillianContainer.groupId} - ${wildfly8.arquillianContainer.artifactId} - ${wildfly8.arquillianContainer.version} - - ${ignoredCategory.wildfly} - ${specialJvmArgs.wildfly} - - - - - org.wildfly.extras.creaper - creaper-core - - - org.wildfly.extras.creaper - creaper-commands - - - - org.wildfly - wildfly-controller-client - ${version.wildfly8} - - - org.wildfly - wildfly-cli - ${version.wildfly8} - - - org.wildfly - wildfly-patching - ${version.wildfly8} - - - - - wildfly9 - - - 1.7 - - ${wildfly9.applicationServer.groupId} - ${wildfly9.applicationServer.artifactId} - ${wildfly9.applicationServer.version} - ${managementPort.wildfly} - - ${wildfly9.arquillianContainer.groupId} - ${wildfly9.arquillianContainer.artifactId} - ${wildfly9.arquillianContainer.version} - - ${ignoredCategory.wildfly} - ${specialJvmArgs.wildfly} - - - - - org.wildfly.extras.creaper - creaper-core - - - org.wildfly.extras.creaper - creaper-commands - - - - org.wildfly.core - wildfly-controller-client - ${version.wildfly9.core} - - - org.wildfly.core - wildfly-cli - ${version.wildfly9.core} - - - org.wildfly.core - wildfly-patching - ${version.wildfly9.core} - - - wildfly10