You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by so...@apache.org on 2026/10/13 03:28:36 UTC

(wicket) branch quickstart-fix1 created (now ff34dc089b)

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

solomax pushed a change to branch quickstart-fix1
in repository https://gitbox.apache.org/repos/asf/wicket.git


      at ff34dc089b Fixes issue #1658: quickstart is tested during build

This branch includes the following new commits:

     new ff34dc089b Fixes issue #1658: quickstart is tested during build

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(wicket) 01/01: Fixes issue #1658: quickstart is tested during build

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch quickstart-fix1
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit ff34dc089b690492a7178b9c1c576cb49f1f3bc0
Author: Maxim Solodovnik <so...@apache.org>
AuthorDate: Tue Oct 13 10:28:20 2026 +0700

    Fixes issue #1658: quickstart is tested during build
---
 archetypes/quickstart/pom.xml                      |  5 +++++
 .../archetype-resources/src/test/java/Start.java   | 17 ++++++++++-------
 .../projects/sample-it-test/archetype.properties   | 22 ++++++++++++++++++++++
 .../resources/projects/sample-it-test/goal.txt     |  1 +
 4 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/archetypes/quickstart/pom.xml b/archetypes/quickstart/pom.xml
index 2de2937612..d8b12aa478 100644
--- a/archetypes/quickstart/pom.xml
+++ b/archetypes/quickstart/pom.xml
@@ -48,6 +48,11 @@
 				</includes>
 			</resource>
 		</resources>
+		<testResources>
+			<testResource>
+				<directory>${project.basedir}/src/test/resources</directory>
+			</testResource>
+		</testResources>
 		<extensions>
 			<extension>
 				<groupId>org.apache.maven.archetype</groupId>
diff --git a/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java b/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java
index f40a28a3bc..ed97885b00 100644
--- a/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java
+++ b/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java
@@ -17,6 +17,7 @@
 package ${package};
 
 import java.lang.management.ManagementFactory;
+import java.time.Duration;
 
 import javax.management.MBeanServer;
 
@@ -28,13 +29,14 @@ import org.eclipse.jetty.server.SecureRequestCustomizer;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.server.SslConnectionFactory;
-import org.eclipse.jetty.server.session.DefaultSessionCache;
-import org.eclipse.jetty.server.session.FileSessionDataStore;
-import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.session.DefaultSessionCache;
+import org.eclipse.jetty.session.FileSessionDataStore;
 import org.eclipse.jetty.util.resource.Resource;
+import org.eclipse.jetty.util.resource.ResourceFactory;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.eclipse.jetty.webapp.WebAppContext;
-import org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer;
+import org.eclipse.jetty.ee11.servlet.ServletContextHandler;
+import org.eclipse.jetty.ee11.webapp.WebAppContext;
+import org.eclipse.jetty.ee11.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer;
 
 /**
  * Separate startup class for people that want to run the examples directly. Use parameter
@@ -42,6 +44,7 @@ import org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketServlet
  */
 public class Start
 {
+	private static final int TIMEOUT = (int) Duration.ofHours(1).toMillis();
 	/**
 	 * Main function, starts the jetty server.
 	 *
@@ -60,11 +63,11 @@ public class Start
 
 		ServerConnector http = new ServerConnector(server, new HttpConnectionFactory(http_config));
 		http.setPort(8080);
-		http.setIdleTimeout(1000 * 60 * 60);
+		http.setIdleTimeout(TIMEOUT);
 
 		server.addConnector(http);
 
-		Resource keystore = Resource.newClassPathResource("/keystore");
+		Resource keystore = ResourceFactory.root().newClassLoaderResource("/keystore");
 		if (keystore != null && keystore.exists())
 		{
 			// if a keystore for a SSL certificate is available, start a SSL
diff --git a/archetypes/quickstart/src/test/resources/projects/sample-it-test/archetype.properties b/archetypes/quickstart/src/test/resources/projects/sample-it-test/archetype.properties
new file mode 100644
index 0000000000..f761540be4
--- /dev/null
+++ b/archetypes/quickstart/src/test/resources/projects/sample-it-test/archetype.properties
@@ -0,0 +1,22 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+groupId=org.apache.wicket.example
+artifactId=my-test-app
+version=1.0.0-SNAPSHOT
+package=org.apache.wicket.example
diff --git a/archetypes/quickstart/src/test/resources/projects/sample-it-test/goal.txt b/archetypes/quickstart/src/test/resources/projects/sample-it-test/goal.txt
new file mode 100644
index 0000000000..31ed2f87a2
--- /dev/null
+++ b/archetypes/quickstart/src/test/resources/projects/sample-it-test/goal.txt
@@ -0,0 +1 @@
+clean verify