Skip to content

Commit

Permalink
Merge pull request #17766 from bstansberry/WFLY-19062
Browse files Browse the repository at this point in the history
[WFLY-19062] Add preview stability support for Jakarta MVC to standard WildFly
  • Loading branch information
darranl authored Apr 3, 2024
2 parents 0a2e9d9 + a53eba0 commit 4b8b19f
Show file tree
Hide file tree
Showing 28 changed files with 900 additions and 85 deletions.
20 changes: 20 additions & 0 deletions boms/common-expansion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,26 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>mvc-krazo-galleon-shared</artifactId>
<version>${version.org.wildfly.mvc.krazo}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>mvc-krazo-galleon-shared</artifactId>
<version>${version.org.wildfly.mvc.krazo}</version>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.wildfly.security.mp</groupId>
<artifactId>wildfly-elytron-jwt</artifactId>
Expand Down
33 changes: 0 additions & 33 deletions boms/preview-ee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,39 +70,6 @@
</exclusions>
</dependency>

<!-- Import the MVC runtime deps -->
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>mvc-krazo-galleon-shared</artifactId>
<version>${preview.version.org.wildfly.mvc.krazo}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>mvc-krazo-galleon-shared</artifactId>
<version>${preview.version.org.wildfly.mvc.krazo}</version>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>mvc-krazo-subsystem</artifactId>
<version>${preview.version.org.wildfly.mvc.krazo}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.wildfly.deployment</groupId>
<artifactId>wildfly-ee-9-deployment-transformer</artifactId>
Expand Down
8 changes: 8 additions & 0 deletions boms/standard-test-expansion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@
<scope>test</scope>
</dependency>

<!-- Tests need to compile against MVC -->
<dependency>
<groupId>jakarta.mvc</groupId>
<artifactId>jakarta.mvc-api</artifactId>
<version>${version.jakarta.mvc.jakarta-mvc-api}</version>
<scope>test</scope>
</dependency>

<!--
Needed by io.smallrye.reactive:smallrye-reactive-messaging-kafka-test-companion which doesn't pull
this in automatically
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/Getting_Started_Guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Profile |WildFly {wildflyVersion} Full Configuration |WildFly {wildflyVersion} D
|Jakarta Messaging 3.1 |X |-- |X |--

| Jakarta MVC 2.1
(_WildFly Preview only_)|--|--|--|--
(xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability])|--|--|--|--

|Jakarta Persistence 3.1 |X |X |X |X

Expand Down
1 change: 0 additions & 1 deletion docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ configuration to act as a primary or backup. An embedded messaging broker also h
requirements than a server primarily dedicated to handling HTTP requests would have. Note however that running an
embedded broker is still supported. We've added to the $WILDFLY_HOME/docs/examples/configs folder an example
``standalone-activemq-embedded.xml`` configuration showing its use.
* WildFly Preview provides out of the box support for link:https://jakarta.ee/specifications/mvc[Jakarta MVC]. However, tech-preview support for Jakarta MVC can also be added to standard WildFly by including the link:https://github.com/wildfly-extras/mvc-krazo-feature-pack/blob/main/README.md[`wildfly-mvc-krazo-feature-pack`] Galleon feature pack in your server provisioning configuration.
* The Hibernate ORM integration used by the link:Developer_Guide{outfilesuffix}#JPA_Reference_Guide[JPA subsystem's] Hibernate Search feature supports using outbox polling as coordination strategy for automatic indexing.
* The extensions providing the legacy subsystems 'cmp', 'config-admin', 'jacorb', 'jaxr', 'jsr-77', 'messaging' (HornetQ based),
'security' (not 'elytron'), and 'web' (not 'undertow') are removed. These were only used for domain mode to allow a Domain Controller to control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ include::subsystem-configuration/Jakarta_Batch.adoc[]

include::subsystem-configuration/Jakarta_Faces.adoc[]

include::subsystem-configuration/Jakarta_MVC.adoc[]

include::subsystem-configuration/JMX.adoc[]

include::subsystem-configuration/Deployment_Scanner.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[[Jakarta_MVC]]
= Jakarta MVC Subsystem Configuration

ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]

[abstract]

The `mvc-krazo` subsystem provides support for the use of Jakarta MVC in deployments.

[WARNING]

The `mvc-krazo` subsystem is currently provided at xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability]. This means use of the subsystem requires running xref:WildFly_and_WildFly_Preview.adoc[WildFly Preview] or using the `--stability=preview` parameter when starting standard WildFly.

[[mvc-krazo-subsystem-provision]]
== Provisioning the subsystem

When provisioning a WildFly instance, you can include Jakarta MVC support in your server configuration by specifying the `mvc-krazo` Galleon layer.

////
TODO add discussion of the need to specify config-stability-level when provisioning. But this should point to general content available via WFLY-19021 and WFLY-19172
////

[[mvc-krazo-subsystem-enable]]
== Enabling the subsystem

If the WildFly configuration does not have the `mvc-krazo` subsystem enabled, it can be enabled using the CLI:

[source,options="nowrap"]
----
[standalone@localhost:9990 /] org.wildfly.extension.mvc-krazo:add
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=mvc-krazo:add
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
----

== Configuration

The `mvc-krazo` subsystem doesn't offer any configuration options beyond its presence in the overall configuration.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ and could be useful to anyone, it is primarily useful for JBoss EAP
subscribers who would provide the data to Red Hat when requesting
support.

|mvc-krazo| Provides support for use of Jakarta MVC in deployments. Currently only provided in WildFly Preview, although `preview` stability level support can be added to standard WildFly by including the link:https://github.com/wildfly-extras/mvc-krazo-feature-pack/blob/main/README.md[`wildfly-mvc-krazo-feature-pack`] Galleon feature pack in your server provisioning configuration.
|mvc-krazo| Provides support for use of Jakarta MVC in deployments. Currently provided at xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability].

|pojo |Enables the deployment of applications containing JBoss
Microcontainer services, as supported by previous versions of JBoss
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/_galleon/Galleon_layers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ link:#gal.opentelemetry[opentelemetry]
link:#gal.web-server[web-server] +

|[[gal.mvc-krazo]]mvc-krazo
|Support for Jakarta MVC (_WildFly Preview only unless the link:https://github.com/wildfly-extras/mvc-krazo-feature-pack/blob/main/README.md[`wildfly-mvc-krazo-feature-pack`] is used_)
|Support for Jakarta MVC (xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability])
|
link:#gal.bean-validation[bean-validation] +
link:#gal.cdi[cdi] +
Expand Down
53 changes: 53 additions & 0 deletions galleon-pack/galleon-feature-pack/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<properties>
<ee.galleon.shared.resources.directory>${basedir}/../../ee-feature-pack/galleon-shared/src/main/resources</ee.galleon.shared.resources.directory>
<license.directory>${project.build.directory}/resources/content/docs/licenses</license.directory>
<galleon.unpacked.resources.directory>${project.build.directory}/unpacked-dependency-galleon-resources</galleon.unpacked.resources.directory>
<galleon.shared.resources.directory>${basedir}/../galleon-shared/src/main/resources</galleon.shared.resources.directory>
<galleon.local.resources.directory>${basedir}/../galleon-local/src/main/resources</galleon.local.resources.directory>
</properties>
Expand All @@ -50,6 +51,32 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-galleon-resources</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>mvc-krazo-galleon-shared</artifactId>
<type>zip</type>
</artifactItem>
</artifactItems>
<!-- The feature pack build seems to ignore such things anyway, but to be
robust exclude artifact metadata content -->
<excludes>**/pom.xml,META-INF,META-INF/**</excludes>
<outputDirectory>${galleon.unpacked.resources.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -108,6 +135,23 @@
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>copy-unpacked-galleon-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/resources</outputDirectory>
<escapeString>\</escapeString>
<resources>
<resource>
<directory>${basedir}/target/unpacked-dependency-galleon-resources</directory>
</resource>
</resources>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand All @@ -125,6 +169,7 @@
<generateVersionProperty>true</generateVersionProperty>
<sortByGroupIdAndArtifactId>true</sortByGroupIdAndArtifactId>
<licensesConfigFiles>
<licensesConfigFile>${galleon.unpacked.resources.directory}/license/wildfly-mvc-krazo-licenses.xml</licensesConfigFile>
<licensesConfigFile>${galleon.shared.resources.directory}/license/licenses.xml</licensesConfigFile>
</licensesConfigFiles>
<licensesOutputFile>${license.directory}/wildfly-feature-pack-licenses.xml</licensesOutputFile>
Expand Down Expand Up @@ -197,6 +242,13 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>mvc-krazo-galleon-shared</artifactId>
<type>pom</type>
<scope>provided</scope>
</dependency>

</dependencies>

<profiles>
Expand Down Expand Up @@ -259,6 +311,7 @@
transitives. Those poms ban transitives at their level -->
<exclude>${full.maven.groupId}:wildfly-feature-pack-galleon-shared</exclude>
<exclude>${full.maven.groupId}:wildfly-feature-pack-galleon-local</exclude>
<exclude>org.wildfly:mvc-krazo-galleon-shared</exclude>
</excludes>
</banTransitiveDependencies>
</rules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<extension>org.wildfly.extension.microprofile.opentracing-smallrye</extension>
<extension>org.wildfly.extension.microprofile.reactive-messaging-smallrye</extension>
<extension>org.wildfly.extension.microprofile.reactive-streams-operators-smallrye</extension>
<extension>org.wildfly.extension.mvc-krazo</extension>
<extension>org.wildfly.extension.opentelemetry</extension>
</standalone>
<domain>
Expand All @@ -95,6 +96,7 @@
<extension>org.wildfly.extension.microprofile.opentracing-smallrye</extension>
<extension>org.wildfly.extension.microprofile.reactive-messaging-smallrye</extension>
<extension>org.wildfly.extension.microprofile.reactive-streams-operators-smallrye</extension>
<extension>org.wildfly.extension.mvc-krazo</extension>
<extension>org.wildfly.extension.opentelemetry</extension>
</domain>
</extensions>
Expand Down
Loading

0 comments on commit 4b8b19f

Please sign in to comment.