This is an automated email from the ASF dual-hosted git repository.
dashorst pushed a commit to branch wicket-11.x
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/wicket-11.x by this push:
new b923ba9faf Leave slf4j-simple out of the quickstart WAR instead of
giving it test scope (#1898)
b923ba9faf is described below
commit b923ba9faf7aefa08231bcc66b979bcc18e77132
Author: Martijn Dashorst <[email protected]>
AuthorDate: Fri Nov 13 16:34:24 2026 +0100
Leave slf4j-simple out of the quickstart WAR instead of giving it test
scope (#1898)
GitHub issue #1690, a follow-up to GitHub issue #1678.
#1684 gave slf4j-simple test scope so that a generated WAR carries no
SLF4J back end, which clashes with containers that bring their own, such
as WildFly. That also took the only back end away from mvn jetty:run:
the Jetty Maven plugin leaves test-scoped dependencies off the webapp
classpath, so a generated quickstart printed "No SLF4J providers were
found" and dropped all of Wicket's logging, including the exceptions the
request cycle logs. Wicket 11.0.0 shipped with this.
Turning on the plugin's useTestScope would bring the logging back, but
it puts the whole test classpath into the webapp, the servlet API
included, and every jetty:run then prints 84 "scanned from multiple
locations" warnings.
slf4j-simple is back at compile scope, and the maven-war-plugin excludes
it from the WAR. Start, jetty:run and the tests log through it, the WAR
and the exploded webapp contain slf4j-api but no back end, and jetty:run
prints no warnings. A WAR deployed to a container without an SLF4J back
end of its own needs one added; the comment on the dependency says so.
Generated-by: Claude Code (Claude Opus 5.5)
(cherry picked from commit 1b40a56dba548bc66c949ea7cf0401ce71f63197)
---
.../quickstart/src/main/resources/archetype-resources/pom.xml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index eec1091b4d..77ca7e9083 100644
--- a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -70,12 +70,13 @@
</dependency>
-->
- <!-- LOGGING DEPENDENCIES - SLF4J-SIMPLE -->
+ <!-- LOGGING DEPENDENCIES - SLF4J-SIMPLE, for Start, jetty:run
and the tests.
+ The maven-war-plugin leaves it out of the WAR: a
container without an SLF4J
+ back end of its own needs one added. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
- <scope>test</scope>
</dependency>
<!-- JUNIT DEPENDENCY FOR TESTING -->
@@ -174,6 +175,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>@maven-war-plugin.version@</version>
+ <configuration>
+
<packagingExcludes>WEB-INF/lib/slf4j-simple-*.jar</packagingExcludes>
+ </configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty.ee11</groupId>