Skip to content

Commit

Permalink
Default to using the latest version of WildFly for Java 17+. For earl…
Browse files Browse the repository at this point in the history
…ier versions of Java, use WildFly 34.0.1.Final.

Signed-off-by: James R. Perkins <[email protected]>
  • Loading branch information
jamezp committed Jan 10, 2025
1 parent 5e02800 commit 707a389
Show file tree
Hide file tree
Showing 33 changed files with 204 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wildfly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
distribution: 'temurin'
cache: 'maven'
- name: Build with Maven Java ${{ matrix.java }}
run: mvn clean install '-Dorg.jboss.logmanager.nocolor=true' '-Dserver.version=${{steps.wildfly-nightly.outputs.wildfly-version}}'
run: mvn clean install '-Dorg.jboss.logmanager.nocolor=true' '-Dversion.org.wildfly=${{steps.wildfly-nightly.outputs.wildfly-version}}'
- name: Upload surefire reports
uses: actions/upload-artifact@v4
if: failure()
Expand Down
18 changes: 14 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<!-- This version property is also retrieved by plugin at runtime to resolve CLI artifact -->
<version.org.wildfly.core>25.0.2.Final</version.org.wildfly.core>
<version.org.wildfly.launcher>1.0.0.Final</version.org.wildfly.launcher>
<version.org.wildfly>32.0.1.Final</version.org.wildfly>
<version.org.wildfly/>
<version.org.wildfly.channel>1.2.1.Final</version.org.wildfly.channel>
<version.org.wildfly.prospero>1.3.0.Final</version.org.wildfly.prospero>
<!-- maven dependencies -->
Expand Down Expand Up @@ -99,8 +99,9 @@

<!-- Require at least Java 11 to compile -->
<jdk.min.version>11</jdk.min.version>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>

<!-- galleon properties -->
<version.org.jboss.galleon>6.0.4.Final</version.org.jboss.galleon>
Expand All @@ -116,7 +117,7 @@
<appServerName>WildFly</appServerName>
<pluginPrefix>wildfly</pluginPrefix>
<resteasyChannelStream>6.2</resteasyChannelStream>
<wildflyVersion>${version.org.wildfly}</wildflyVersion>
<wildflyVersion>35.0.0.Final</wildflyVersion>

<wildfly.scm.connection>scm:git://github.com/wildfly/wildfly-maven-plugin.git</wildfly.scm.connection>
<wildfly.scm.developer.connection>scm:git:[email protected]:wildfly/wildfly-maven-plugin.git
Expand Down Expand Up @@ -519,6 +520,15 @@
</dependencyManagement>

<profiles>
<profile>
<id>wildfly-34</id>
<activation>
<jdk>(,17)</jdk>
</activation>
<properties>
<version.org.wildfly>34.0.1.Final</version.org.wildfly>
</properties>
</profile>
<profile>
<id>release</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
import org.apache.maven.plugin.Mojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.tests.AbstractProvisionConfiguredMojoTestCase;
import org.wildfly.plugin.tests.AbstractWildFlyMojoTest;

@Category(ChannelsRequired.class)
public class PackageBootableTest extends AbstractProvisionConfiguredMojoTestCase {

private static final String BOOTABLE_JAR_NAME = "server-bootable.jar";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<bootable-jar-name>server-bootable.jar</bootable-jar-name>
<discover-provisioning-info>
<context>cloud</context>
<version>WF_VERSION</version>
</discover-provisioning-info>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<addOns>
<addOn>openapi</addOn>
</addOns>
<version>WF_VERSION</version>
</discover-provisioning-info>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
<provisioning-dir>packaged-bootable-server</provisioning-dir>
<bootable-jar>true</bootable-jar>
<overwrite-provisioned-server>true</overwrite-provisioned-server>
<galleon-options>
<!-- Fork the process to avoid a two controller-client's from being on the class path -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<provisioning-dir>packaged-root-bootable-server</provisioning-dir>
<bootable-jar>true</bootable-jar>
<bootable-jar-name>jar-root.jar</bootable-jar-name>
<galleon-options>
<!-- Fork the process to avoid a two controller-client's from being on the class path -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@

import org.apache.maven.plugin.Mojo;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.tests.AbstractProvisionConfiguredMojoTestCase;
import org.wildfly.plugin.tests.AbstractWildFlyMojoTest;

@Category(ChannelsRequired.class)
public class ProvisionTest extends AbstractProvisionConfiguredMojoTestCase {

public ProvisionTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
</feature-pack>
</feature-packs>
<record-provisioning-state>false</record-provisioning-state>
<galleon-options>
<!-- Fork the process to avoid a two controller-client's from being on the class path -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
</plugin>
</plugins>
Expand Down
91 changes: 80 additions & 11 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<jboss.home>${project.build.directory}${file.separator}wildfly</jboss.home>

<wildfly.test.config.dir>${project.build.testOutputDirectory}</wildfly.test.config.dir>

<wildfly.feature.pack.groupId>org.wildfly</wildfly.feature.pack.groupId>
<wildfly.feature.pack.artifactId>wildfly-ee-galleon-pack</wildfly.feature.pack.artifactId>

<wildfly.channel.manifest.groupId>org.wildfly.channels</wildfly.channel.manifest.groupId>
<wildfly.channel.manifest.artifactId>wildfly-ee</wildfly.channel.manifest.artifactId>
</properties>

<build>
Expand All @@ -36,24 +42,26 @@
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
<feature-packs>
<feature-pack>
<groupId>${wildfly.feature.pack.groupId}</groupId>
<artifactId>${wildfly.feature.pack.artifactId}</artifactId>
<version>${version.org.wildfly}</version>
</feature-pack>
</feature-packs>
<provisioning-dir>${project.build.directory}/wildfly</provisioning-dir>
<galleon-options>
<jboss-fork-embedded>${plugin.fork.embedded}</jboss-fork-embedded>
</galleon-options>
</configuration>
<executions>
<execution>
<id>provision-wildfly</id>
<phase>generate-test-resources</phase>
<goals>
<goal>provision</goal>
</goals>
<configuration>
<feature-packs>
<feature-pack>
<location>wildfly@maven(org.jboss.universe:community-universe)#${version.org.wildfly}</location>
</feature-pack>
</feature-packs>
<provisioning-dir>${project.build.directory}/wildfly</provisioning-dir>
<galleon-options>
<jboss-fork-embedded>${plugin.fork.embedded}</jboss-fork-embedded>
</galleon-options>
</configuration>
</execution>
</executions>
</plugin>
Expand All @@ -73,5 +81,66 @@
</plugins>
</build>

<profiles>
<profile>
<id>skip-channel-tests</id>
<activation>
<property>
<name>skip.channel.tests</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>org.wildfly.plugin.categories.ChannelsRequired</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>wildfly-channels</id>
<activation>
<property>
<name>!version.org.wildfly</name>
</property>
</activation>

<build>
<plugins>
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>provision-wildfly</id>
<phase>generate-test-resources</phase>
<goals>
<goal>provision</goal>
</goals>
<configuration>
<channels>
<!-- If the version.org.wildfly is blank the newest version of WildFly will be used. Otherwise, be
explicit.
-->
<channel>
<manifest>
<groupId>${wildfly.channel.manifest.groupId}</groupId>
<artifactId>${wildfly.channel.manifest.artifactId}</artifactId>
<version>${version.org.wildfly}</version>
</manifest>
</channel>
</channels>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
@RunWith(JUnit4.class)
public abstract class AbstractProvisionConfiguredMojoTestCase extends AbstractMojoTestCase {
private static final String TEST_REPLACE_WF_VERSION = "WF_VERSION";
private static final String TEST_REPLACE_LOC_WF_VERSION = "#WF_VERSION";
private static final String TEST_REPLACE_BASE_DIR_ABSOLUTE_URL = "WF_BASE_DIR_ABSOLUTE_URL";
static final String WILDFLY_VERSION = "wildfly.test.version";
private final String artifactId;
Expand Down Expand Up @@ -151,6 +152,15 @@ protected Mojo lookupConfiguredMojo(final Path pom, final String goal) throws Ex
private void patchPomFile(final Path pom) throws IOException {
StringBuilder content = new StringBuilder();
for (String s : Files.readAllLines(pom)) {
if (s.contains(TEST_REPLACE_LOC_WF_VERSION)) {
String version = System.getProperty(WILDFLY_VERSION);
if (version == null || version.isBlank()) {
version = "";
} else {
version = "#" + version;
}
s = s.replace(TEST_REPLACE_LOC_WF_VERSION, version);
}
if (s.contains(TEST_REPLACE_WF_VERSION)) {
s = s.replace(TEST_REPLACE_WF_VERSION, System.getProperty(WILDFLY_VERSION));
}
Expand Down
21 changes: 0 additions & 21 deletions tests/standalone-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>skip-channel-tests</id>
<activation>
<property>
<name>skip.channel.tests</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>org.wildfly.plugin.categories.ChannelsRequired</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.junit.Assume;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.tests.AbstractWildFlyMojoTest;
import org.wildfly.plugin.tests.TestEnvironment;

@Category(ChannelsRequired.class)
public class ImageTest extends AbstractImageTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

import org.junit.Assume;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.tests.TestEnvironment;

@Category(ChannelsRequired.class)
public class LayersServerConfigImageTest extends AbstractImageTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.wildfly.plugin.tests.AbstractProvisionConfiguredMojoTestCase;
import org.wildfly.plugin.tests.AbstractWildFlyMojoTest;

@Category(ChannelsRequired.class)
public class PackageTest extends AbstractProvisionConfiguredMojoTestCase {

public PackageTest() {
Expand All @@ -38,7 +39,6 @@ public void testPackage() throws Exception {
}

@Test
@Category(ChannelsRequired.class)
public void testPackageWithChannel() throws Exception {

final Mojo packageMojo = lookupConfiguredMojo(AbstractWildFlyMojoTest.getPomFile("package-channel-pom.xml").toFile(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@

import org.apache.maven.plugin.Mojo;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.tests.AbstractProvisionConfiguredMojoTestCase;
import org.wildfly.plugin.tests.AbstractWildFlyMojoTest;

@Category(ChannelsRequired.class)
public class ProvisionTest extends AbstractProvisionConfiguredMojoTestCase {

public ProvisionTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

import org.junit.Assume;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.tests.TestEnvironment;

@Category(ChannelsRequired.class)
public class ServerConfigImageTest extends AbstractImageTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
<filename>test.war</filename>
<group>wildfly-image-layers-server-config-maven-plugin</group>
<layers-configuration-file-name>standalone-core.xml</layers-configuration-file-name>
<galleon-options>
<!-- Fork the process to avoid a two controller-client's from being on the class path -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
that label-values can span multiple lines.</description>
<quoted.line>I have &quot;quoted myself&quot; here.</quoted.line>
</labels>
<galleon-options>
<!-- Fork the process to avoid a two controller-client's from being on the class path -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<filename>test.war</filename>
<group>wildfly-image-server-config-maven-plugin</group>
<server-config>standalone-microprofile.xml</server-config>
<galleon-options>
<!-- Fork the process to avoid a two controller-client's from being on the class path -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
</plugin>
</plugins>
Expand Down
Loading

0 comments on commit 707a389

Please sign in to comment.