This is an automated email from the ASF dual-hosted git repository.

dashorst pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f6503e311 Leave slf4j-simple out of the quickstart WAR instead of 
giving it test scope (#1691)
1f6503e311 is described below

commit 1f6503e31192165e05a986fab199a83cf1056964
Author: Martijn Dashorst <[email protected]>
AuthorDate: Fri Nov 13 16:34:32 2026 +0100

    Leave slf4j-simple out of the quickstart WAR instead of giving it test 
scope (#1691)
    
    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)
---
 .../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>

Reply via email to