Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFLY-19267] Support running the standard WildFly testsuite against installations provisioned with the 'latest standard channels' #17838

Merged
merged 2 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 22 additions & 22 deletions build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,27 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${channels.maven.groupId}</groupId>
<artifactId>wildfly</artifactId>
<type>yaml</type>
<classifier>manifest</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<finalName>${server.output.dir.prefix}-${server.output.dir.version}</finalName>
<plugins>
<plugin>
<!-- Installation provisioning is vulnerable to leftover files in the target
folder from previous builds, so always clean even if the clean lifecycle is not invoked -->
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jboss.galleon</groupId>
<artifactId>galleon-maven-plugin</artifactId>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.org.wildfly.plugin}</version>
<executions>
<execution>
<id>server-provisioning</id>
Expand All @@ -73,10 +72,11 @@
</goals>
<phase>prepare-package</phase>
<configuration>
<install-dir>${project.build.directory}/${project.build.finalName}</install-dir>
<record-state>true</record-state>
<log-time>${galleon.log.time}</log-time>
<offline>${galleon.offline}</offline>
<provisioning-dir>${project.build.directory}/${project.build.finalName}</provisioning-dir>
<record-provisioning-state>true</record-provisioning-state>
<log-provisioning-time>${galleon.log.time}</log-provisioning-time>
<offline-provisioning>${galleon.offline}</offline-provisioning>
<overwrite-provisioned-server>true</overwrite-provisioned-server>
<feature-packs>
<feature-pack>
<transitive>true</transitive>
Expand All @@ -93,10 +93,10 @@
<version>${full.maven.version}</version>
</feature-pack>
</feature-packs>
<plugin-options>
<galleon-options>
<jboss-maven-dist/>
<jboss-fork-embedded>${galleon.fork.embedded}</jboss-fork-embedded>
</plugin-options>
</galleon-options>
</configuration>
</execution>
</executions>
Expand Down
44 changes: 22 additions & 22 deletions ee-build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,27 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${channels.maven.groupId}</groupId>
<artifactId>wildfly-ee</artifactId>
<type>yaml</type>
<classifier>manifest</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<finalName>${server.output.dir.prefix}-${server.output.dir.version}</finalName>
<plugins>
<plugin>
<!-- Installation provisioning is vulnerable to leftover files in the target
folder from previous builds, so always clean even if the clean lifecycle is not invoked -->
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jboss.galleon</groupId>
<artifactId>galleon-maven-plugin</artifactId>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.org.wildfly.plugin}</version>
<executions>
<execution>
<id>server-provisioning</id>
Expand All @@ -73,10 +72,11 @@
</goals>
<phase>prepare-package</phase>
<configuration>
<install-dir>${project.build.directory}/${project.build.finalName}</install-dir>
<record-state>true</record-state>
<log-time>${galleon.log.time}</log-time>
<offline>${galleon.offline}</offline>
<provisioning-dir>${project.build.directory}/${project.build.finalName}</provisioning-dir>
<record-provisioning-state>true</record-provisioning-state>
<log-provisioning-time>${galleon.log.time}</log-provisioning-time>
<offline-provisioning>${galleon.offline}</offline-provisioning>
<overwrite-provisioned-server>true</overwrite-provisioned-server>
<feature-packs>
<feature-pack>
<groupId>${project.groupId}</groupId>
Expand All @@ -87,10 +87,10 @@
</included-packages>
</feature-pack>
</feature-packs>
<plugin-options>
<galleon-options>
<jboss-maven-dist/>
<jboss-fork-embedded>${galleon.fork.embedded}</jboss-fork-embedded>
</plugin-options>
</galleon-options>
</configuration>
</execution>
</executions>
Expand Down
64 changes: 64 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,70 @@
</properties>
</profile>

<profile>
<!-- Use the latest version of the standard channels when provisioning. -->
<id>latest.standard.channels.profile</id>
<activation><property><name>latest.standard.channels</name></property></activation>
<properties>
<!-- Allow online provisioning so wildfly-maven-plugin can resolve the latest manifests -->
<galleon.offline>false</galleon.offline>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.org.wildfly.plugin}</version>
<configuration>
<channels>
<channel>
<manifest>
<groupId>${channels.maven.groupId}</groupId>
<artifactId>wildfly-ee</artifactId>
</manifest>
</channel>
<channel>
<manifest>
<groupId>${channels.maven.groupId}</groupId>
<artifactId>wildfly</artifactId>
</manifest>
</channel>
</channels>
</configuration>
Comment on lines +1519 to +1534
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no wildfly-preview channel attached here, so I'm not sure how the expected channels would be injected when this plugin configuration is merged with the one on preview/build.

Would it become an issue?

I guess the same is applied to the ee-build. The plugin configuration merged will attach wildfly-ee and wildfly channels. Is that expected for an ee-build?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In both cases, yes the limitations you point out are expected. This profile as is will not work for testing WFP or for testing wildfly-ee by itself.

https://issues.redhat.com/browse/WFLY-19268 will replace this, but it is out of scope for this task, which is really just about having an upstream variant of an urgent downstream change that tests a combination of these two FPs. Neither wildfly-ee-only testing nor wildfly-preview are relevant to the downstream change.

https://issues.redhat.com/browse/WFLY-19268 will take advantage of the greater flexibility we have in wildfly-maven-plugin 5, which is not used downstream.

</plugin>
</plugins>
</build>
</profile>

<profile>
<!-- Use the channels specified by the user-provided external.wildfly.channels property
when provisioning. -->
<id>external.channel.profile</id>
<activation><property><name>external.wildfly.channels</name></property></activation>
<properties>
<!-- The wildfly-maven-plugin 'provision' mojo will provision using a channel
if a wildfly.channels pom property is set.

Note the user could just directly do -Dwildfly-channels=xxx and get
the same effect, but we use this indirection to leave open the possibility
to have other ways of setting the property, without having to deal with
users having learned to directly use -Dwildfly.channels.
-->
<wildfly.channels>${external.wildfly.channels}</wildfly.channels>
</properties>
</profile>

<profile>
<!-- Use the internally-created channel when provisioning -->
<id>internal.channel.profile</id>
<activation><property><name>internal.wildfly.channels</name></property></activation>
<properties>
<!-- The wildfly-maven-plugin 'provision' mojo will provision using a channel
if a wildfly.channels pom property is set. -->
<wildfly.channels>${channels.maven.groupId}:wildfly:${full.maven.version}</wildfly.channels>
</properties>
</profile>

<profile>
<id>preview.test.profile</id>
<activation>
Expand Down
44 changes: 22 additions & 22 deletions preview/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,27 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${channels.maven.groupId}</groupId>
<artifactId>wildfly-preview</artifactId>
<type>yaml</type>
<classifier>manifest</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<finalName>${server.output.dir.prefix}-preview-${server.output.dir.version}</finalName>
<plugins>
<plugin>
<!-- Installation provisioning is vulnerable to leftover files in the target
folder from previous builds, so always clean even if the clean lifecycle is not invoked -->
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jboss.galleon</groupId>
<artifactId>galleon-maven-plugin</artifactId>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.org.wildfly.plugin}</version>
<executions>
<execution>
<id>server-provisioning</id>
Expand All @@ -72,10 +71,11 @@
</goals>
<phase>prepare-package</phase>
<configuration>
<install-dir>${project.build.directory}/${project.build.finalName}</install-dir>
<record-state>true</record-state>
<log-time>${galleon.log.time}</log-time>
<offline>true</offline>
<provisioning-dir>${project.build.directory}/${project.build.finalName}</provisioning-dir>
<record-provisioning-state>true</record-provisioning-state>
<log-provisioning-time>${galleon.log.time}</log-provisioning-time>
<offline-provisioning>true</offline-provisioning>
<overwrite-provisioned-server>true</overwrite-provisioned-server>
<feature-packs>
<feature-pack>
<groupId>${project.groupId}</groupId>
Expand All @@ -86,10 +86,10 @@
</included-packages>
</feature-pack>
</feature-packs>
<plugin-options>
<galleon-options>
<jboss-maven-dist/>
<jboss-fork-embedded>${galleon.fork.embedded}</jboss-fork-embedded>
</plugin-options>
</galleon-options>
</configuration>
</execution>
</executions>
Expand Down
29 changes: 0 additions & 29 deletions testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1218,34 +1218,5 @@
</build>
</profile>

<profile>
<!-- Use the channels specified by the user-provided external.wildfly.channels property
when provisioning. -->
<id>external.channel.profile</id>
<activation><property><name>external.wildfly.channels</name></property></activation>
<properties>
<!-- The wildfly-maven-plugin 'provision' mojo will provision using a channel
if a wildfly.channels pom property is set.

Note the user could just directly do -Dwildfly-channels=xxx and get
the same effect, but we use this indirection to leave open the possibility
to have other ways of setting the property, without having to deal with
users having learned to directly use -Dwildfly.channels.
-->
<wildfly.channels>${external.wildfly.channels}</wildfly.channels>
</properties>
</profile>

<profile>
<!-- Use the internally-created channel when provisioning -->
<id>internal.channel.profile</id>
<activation><property><name>internal.wildfly.channels</name></property></activation>
<properties>
<!-- The wildfly-maven-plugin 'provision' mojo will provision using a channel
if a wildfly.channels pom property is set. -->
<wildfly.channels>org.wildfly.channels:wildfly:${full.maven.version}</wildfly.channels>
</properties>
</profile>

</profiles>
</project>