Skip to content

Fixes issue #1658: quickstart is tested during build - #1663

Open
solomax wants to merge 2 commits into
masterfrom
quickstart-fix1
Open

solomax wants to merge 2 commits into
masterfrom
quickstart-fix1

Conversation

@solomax

@solomax solomax commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@solomax
solomax requested a review from dashorst October 13, 2026 03:29
@solomax solomax self-assigned this Oct 13, 2026
@codecov-commenter

codecov-commenter commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.98%. Comparing base (40f37ca) to head (9a9f69f).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1663      +/-   ##
============================================
+ Coverage     61.96%   61.98%   +0.02%     
- Complexity    11287    11288       +1     
============================================
  Files          1250     1250              
  Lines         48437    48437              
  Branches       6796     6796              
============================================
+ Hits          30015    30025      +10     
+ Misses        15729    15717      -12     
- Partials       2693     2695       +2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@solomax

solomax commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author
[INFO] Processing Archetype IT project: sample-it-test
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: wicket-archetype-quickstart:11.0.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.apache.wicket.example
[INFO] Parameter: artifactId, Value: my-test-app
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: org.apache.wicket.example
[INFO] Parameter: packageInPathFormat, Value: org/apache/wicket/example
[INFO] Parameter: package, Value: org.apache.wicket.example
[INFO] Parameter: groupId, Value: org.apache.wicket.example
[INFO] Parameter: artifactId, Value: my-test-app
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Project created from Archetype in dir: /home/runner/work/wicket/wicket/archetypes/quickstart/target/test-classes/projects/sample-it-test/project/my-test-app
[INFO] Invoking post-archetype-generation goals: clean verify
[INFO] [INFO] Error stacktraces are turned on.
[INFO] [INFO] Scanning for projects...
[INFO] [WARNING] The requested profile "js-test" could not be activated because it does not exist.
[INFO] [WARNING] The requested profile "coverage" could not be activated because it does not exist.
[INFO] [INFO] 
[INFO] [INFO] ---------------< org.apache.wicket.example:my-test-app >----------------
[INFO] [INFO] Building quickstart 1.0.0-SNAPSHOT
[INFO] [INFO]   from pom.xml
[INFO] [INFO] --------------------------------[ war ]---------------------------------
[INFO] [INFO] 
[INFO] [INFO] --- clean:3.2.0:clean (default-clean) @ my-test-app ---
[INFO] [INFO] 
[INFO] [INFO] --- resources:3.4.0:resources (default-resources) @ my-test-app ---
[INFO] [INFO] Copying 0 resource from src/main/resources to target/classes
[INFO] [INFO] Copying 1 resource from src/main/java to target/classes
[INFO] [INFO] 
[INFO] [INFO] --- compiler:3.16.0:compile (default-compile) @ my-test-app ---
[INFO] [INFO] Recompiling the module because of changed source code.
[INFO] [INFO] Compiling 2 source files with javac [debug deprecation target 21] to target/classes
[INFO] [INFO] 
[INFO] [INFO] --- resources:3.4.0:testResources (default-testResources) @ my-test-app ---
[INFO] [INFO] Copying 1 resource from src/test/resources to target/test-classes
[INFO] [INFO] Copying 0 resource from src/test/java to target/test-classes
[INFO] [INFO] 
[INFO] [INFO] --- compiler:3.16.0:testCompile (default-testCompile) @ my-test-app ---
[INFO] [INFO] Recompiling the module because of changed dependency.
[INFO] [INFO] Compiling 2 source files with javac [debug deprecation target 21] to target/test-classes
[INFO] [INFO] 
[INFO] [INFO] --- surefire:3.5.4:test (default-test) @ my-test-app ---
[INFO] [INFO] Surefire report directory: /home/runner/work/wicket/wicket/archetypes/quickstart/target/test-classes/projects/sample-it-test/project/my-test-app/target/surefire-reports
[INFO] [INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO] [INFO] 
[INFO] [INFO] -------------------------------------------------------
[INFO] [INFO]  T E S T S
[INFO] [INFO] -------------------------------------------------------
[INFO] [INFO] Running org.apache.wicket.example.TestHomePage
[INFO] [main] INFO org.apache.wicket.Application - [WicketTesterApplication-a15ee879-a19c-41fc-a84d-c8d8bf1d090c] init: Wicket core library initializer
[INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.359 s -- in org.apache.wicket.example.TestHomePage
[INFO] [INFO] 
[INFO] [INFO] Results:
[INFO] [INFO] 
[INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] [INFO] 
[INFO] [INFO] 
[INFO] [INFO] --- war:3.5.1:war (default-war) @ my-test-app ---
[INFO] [INFO] Packaging webapp
[INFO] [INFO] Assembling webapp [my-test-app] in [/home/runner/work/wicket/wicket/archetypes/quickstart/target/test-classes/projects/sample-it-test/project/my-test-app/target/my-test-app-1.0.0-SNAPSHOT]
[INFO] [INFO] Processing war project
[INFO] [INFO] Copying webapp resources [/home/runner/work/wicket/wicket/archetypes/quickstart/target/test-classes/projects/sample-it-test/project/my-test-app/src/main/webapp]
[INFO] [INFO] Building war: /home/runner/work/wicket/wicket/archetypes/quickstart/target/test-classes/projects/sample-it-test/project/my-test-app/target/my-test-app-1.0.0-SNAPSHOT.war
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time:  11.519 s
[INFO] [INFO] Finished at: 2026-10-13T03:36:15Z
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [WARNING] The requested profile "js-test" could not be activated because it does not exist.
[INFO] [WARNING] The requested profile "coverage" could not be activated because it does not exist.
[INFO] Post-archetype-generation invoker exit code: 0

The archetype integration test ran clean verify on the generated project
with whatever Wicket artifacts the local repository or the Apache
snapshot repository held. CI runs verify without install, and the
archetype module did not depend on the modules the generated project
uses, so the reactor could even build it before them. A change to
wicket-core or wicket-native-websocket-javax was tested against the
previous nightly snapshot, and right after a version bump the generated
project could not resolve Wicket at all until a snapshot of the new
version was published.

The archetype module now declares the generated project's Wicket
modules as test dependencies, which orders it after them in the reactor,
and maven-invoker-plugin:install copies them, their reactor dependencies
and their parent poms into the local repository before the integration
test runs. A plain mvn verify therefore writes these snapshots to the
local repository, as mvn install would have. The installation and the
integration test both follow -DskipTests, so a build that skips tests no
longer generates and builds a project; -Darchetype.test.skip still skips
the integration test alone.

Start.java loses what was left over from Jetty 11: the unused session
store imports, the commented-out session cache line and the obsolete
JSR-356 instructions. The JSESSIONID hint uses the Jetty 12 session
handler API, and the HTTP idle timeout is the literal it was before.

GitHub issue #1658

Generated-by: Claude Code (Claude Opus 5.5)
*/
public class Start
{
private static final int TIMEOUT = (int) Duration.ofHours(1).toMillis();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this way it is more readable :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The quickstart archetype's Start.java does not compile against Jetty 12

3 participants