You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "dashorst (via GitHub)" <gi...@apache.org> on 2026/10/20 07:11:16 UTC
[PR] Let jetty:run in the quickstart see the test-scoped SLF4J back end [wicket]
dashorst opened a new pull request, #1691:
URL: https://github.com/apache/wicket/pull/1691
Fixes #1690, a follow-up to #1684 (GitHub issue #1678).
With `slf4j-simple` at test scope, `mvn jetty:run` on a generated quickstart had no SLF4J back end: the jetty-ee11-maven-plugin leaves test-scoped dependencies off the webapp classpath unless `useTestScope` is set. SLF4J fell back to the NOP logger and all of Wicket's logging was dropped.
- `<useTestScope>true</useTestScope>` on the Jetty plugin, so `jetty:run` logs through `slf4j-simple` like `Start` does.
- The comment on the dependency now says it only serves `Start`, `jetty:run` and the tests, and that a WAR deployed to a container without an SLF4J back end needs one added.
Verified:
- `mvn verify -pl archetypes/quickstart` passes, including the archetype integration test.
- `mvn jetty:run` on the generated project logs `Started Wicket version 11.0.0-SNAPSHOT in DEVELOPMENT mode`, and `/` returns 200. Before this change it printed `No SLF4J providers were found`.
- The WAR contains `slf4j-api` and no back end.
Migration-guide note: a quickstart generated from 11.x no longer packages `slf4j-simple` in its WAR. When deploying to a container that has no SLF4J back end of its own (Tomcat, a standalone Jetty), add one as a runtime dependency.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Leave slf4j-simple out of the quickstart WAR instead of giving it test scope [wicket]
Posted by "dashorst (via GitHub) via commits" <co...@wicket.apache.org>.
dashorst merged PR #1691:
URL: https://github.com/apache/wicket/pull/1691
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Let jetty:run in the quickstart see the test-scoped SLF4J back end [wicket]
Posted by "papegaaij (via GitHub) via commits" <co...@wicket.apache.org>.
papegaaij commented on code in PR #1691:
URL: https://github.com/apache/wicket/pull/1691#discussion_r4527086852
##########
archetypes/quickstart/src/main/resources/archetype-resources/pom.xml:
##########
@@ -183,6 +184,7 @@
<systemProperties>
<maven.project.build.directory.test-classes>${project.build.directory}/test-classes</maven.project.build.directory.test-classes>
</systemProperties>
+ <useTestScope>true</useTestScope>
Review Comment:
`useTestScope` brings the logging back, but it puts the whole test classpath into the webapp: Jetty itself, `jakarta.servlet-api`, JUnit, wicket-tester and `target/test-classes`. On a generated quickstart, every `mvn jetty:run` now prints 84 "scanned from multiple locations" warnings, one per servlet API class, because that API is now in both the container and the webapp. That's the first thing someone new to Wicket sees.
Keeping `slf4j-simple` at compile scope and leaving it out of the WAR avoids this:
```xml
<plugin>
<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>
```
I tried it on quickstarts generated from this branch, with Wicket 12.0.0-SNAPSHOT on ee11 and 10.12.0 on ee10. `jetty:run` logs, the home page renders, there are no warnings, and `WEB-INF/lib` contains `slf4j-api` but no `slf4j-simple`: the same WAR this PR produces. The comment above the dependency would then explain the exclusion rather than the scope.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Leave slf4j-simple out of the quickstart WAR instead of giving it test scope [wicket]
Posted by "dashorst (via GitHub) via commits" <co...@wicket.apache.org>.
dashorst commented on code in PR #1691:
URL: https://github.com/apache/wicket/pull/1691#discussion_r4564177273
##########
archetypes/quickstart/src/main/resources/archetype-resources/pom.xml:
##########
@@ -183,6 +184,7 @@
<systemProperties>
<maven.project.build.directory.test-classes>${project.build.directory}/test-classes</maven.project.build.directory.test-classes>
</systemProperties>
+ <useTestScope>true</useTestScope>
Review Comment:
Agreed, and done. I reproduced it on a quickstart generated from 11.0.0: `useTestScope` gave 84 "scanned from multiple locations" warnings, while compile scope with `packagingExcludes` logs without warnings and leaves `slf4j-simple` out of both the WAR and the exploded webapp.
Both PRs now take that approach. On 10.x the scope stays as it was and the cherry-pick of #1684 is gone, so that PR is a single commit with the exclusion. The backport to wicket-11.x is #1898.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Leave slf4j-simple out of the quickstart WAR instead of giving it test scope [wicket]
Posted by "codecov-commenter (via GitHub) via commits" <co...@wicket.apache.org>.
codecov-commenter commented on PR #1691:
URL: https://github.com/apache/wicket/pull/1691#issuecomment-6855227529
## [Codecov](https://app.codecov.io/gh/apache/wicket/pull/1691?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 62.81%. Comparing base ([`e5999f0`](https://app.codecov.io/gh/apache/wicket/commit/e5999f0896040793320c74971a7310036cb9899a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1b40a56`](https://app.codecov.io/gh/apache/wicket/commit/1b40a56dba548bc66c949ea7cf0401ce71f63197?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #1691 +/- ##
=========================================
Coverage 62.80% 62.81%
- Complexity 11548 11550 +2
=========================================
Files 1254 1254
Lines 48726 48726
Branches 6867 6867
=========================================
+ Hits 30602 30605 +3
+ Misses 15432 15431 -1
+ Partials 2692 2690 -2
```
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org