This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch feat/WW-5864-struts-maven-plugin-watch in repository https://gitbox.apache.org/repos/asf/struts.git
commit e5287727bb092ce2e5891810327a792d031cde12 Author: Lukasz Lenart <[email protected]> AuthorDate: Sat Nov 14 09:12:59 2026 +0100 WW-5864 build(showcase): reference struts:watch setup and Jetty scanner Add a background struts:watch execution (process-resources) to the showcase, inert unless -Dstruts.watch is given. Jetty scanner research: jetty-maven-plugin 11.0.26 exposes scanClassesPattern (includes/excludes), so scanning compiled classes is kept and only **/*.class is scanned; resource pushes into target/classes no longer restart the webapp. <scan>0</scan> was not needed. rest-showcase uses scanIntervalSeconds, which does not exist in the 11.0.26 plugin.xml (silently ignored), so scanning there was never configured via that name; the same scanClassesPattern is added so it holds if scanning is enabled. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --- apps/rest-showcase/pom.xml | 5 +++++ apps/showcase/pom.xml | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index a70a73401..4b12b5b61 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -135,6 +135,11 @@ <stopKey>CTRL+C</stopKey> <stopPort>8999</stopPort> <scanIntervalSeconds>10</scanIntervalSeconds> + <scanClassesPattern> + <includes> + <include>**/*.class</include> + </includes> + </scanClassesPattern> <webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory> <webAppConfig> <contextPath>/struts2-rest-showcase</contextPath> diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 37b0c8c85..96cbb20ac 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -189,6 +189,23 @@ <build> <plugins> + <plugin> + <groupId>org.apache.struts</groupId> + <artifactId>struts-maven-plugin</artifactId> + <version>${project.version}</version> + <executions> + <execution> + <id>watch</id> + <phase>process-resources</phase> + <goals> + <goal>watch</goal> + </goals> + <configuration> + <background>true</background> + </configuration> + </execution> + </executions> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> @@ -285,6 +302,11 @@ <port>8090</port> </httpConnector> <scan>10</scan> + <scanClassesPattern> + <includes> + <include>**/*.class</include> + </includes> + </scanClassesPattern> <webApp> <extraClasspath> ${project.build.directory}/extraclasspath/struts2-velocity-tools-view-jakarta.jar,
