You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by da...@apache.org on 2011/01/17 12:25:02 UTC
svn commit: r1059880 - in
/wicket/trunk/archetypes/quickstart/src/main/resources: META-INF/maven/
archetype-resources/ archetype-resources/src/main/java/
archetype-resources/src/main/webapp/ archetype-resources/src/test/java/
Author: dashorst
Date: Mon Jan 17 11:25:02 2011
New Revision: 1059880
URL: http://svn.apache.org/viewvc?rev=1059880&view=rev
Log:
WICKET-3332: new design for quickstart home page
Added:
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/logo.png (with props)
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/style.css
Modified:
wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java
Modified: wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1059880&r1=1059879&r2=1059880&view=diff
==============================================================================
--- wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml (original)
+++ wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml Mon Jan 17 11:25:02 2011
@@ -26,5 +26,12 @@
<include>**/*.xml</include>
</includes>
</fileSet>
+ <fileSet filtered="false" packaged="false" encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.css</include>
+ <include>**/*.png</include>
+ </includes>
+ </fileSet>
</fileSets>
</archetype-descriptor>
\ No newline at end of file
Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml?rev=1059880&r1=1059879&r2=1059880&view=diff
==============================================================================
--- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml (original)
+++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml Mon Jan 17 11:25:02 2011
@@ -19,6 +19,10 @@
<distribution>repo</distribution>
</license>
</licenses>
+ <properties>
+ <wicket.version>1.5-SNAPSHOT</wicket.version>
+ <jetty.version>7.2.2.v20101205</jetty.version>
+ </properties>
<dependencies>
<!-- WICKET DEPENDENCIES -->
<dependency>
@@ -26,10 +30,12 @@
<artifactId>wicket-core</artifactId>
<version>${wicket.version}</version>
</dependency>
- <!--
- OPTIONAL <dependency> <groupId>org.apache.wicket</groupId>
+ <!-- OPTIONAL DEPENDENCY
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
- <version>${wicket.version}</version> </dependency>
+ <version>${wicket.version}</version>
+ </dependency>
-->
<!-- LOGGING DEPENDENCIES - LOG4J -->
@@ -54,20 +60,8 @@
<!-- JETTY DEPENDENCIES FOR TESTING -->
<dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <version>${jetty.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <version>${jetty.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-management</artifactId>
+ <groupId>org.eclipse.jetty.aggregate</groupId>
+ <artifactId>jetty-all-server</artifactId>
<version>${jetty.version}</version>
<scope>provided</scope>
</dependency>
@@ -115,7 +109,8 @@
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>${jetty.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -126,9 +121,5 @@
</plugin>
</plugins>
</build>
- <properties>
- <wicket.version>1.5-SNAPSHOT</wicket.version>
- <jetty.version>6.1.25</jetty.version>
- </properties>
#end
</project>
Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html?rev=1059880&r1=1059879&r2=1059880&view=diff
==============================================================================
--- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html (original)
+++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html Mon Jan 17 11:25:02 2011
@@ -1,10 +1,60 @@
-<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.5-strict.dtd" >
- <head>
- <title>Wicket Quickstart Archetype Homepage</title>
- </head>
- <body>
- <strong>Wicket Quickstart Archetype Homepage</strong>
- <br/><br/>
- <span wicket:id="message">message will be here</span>
- </body>
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>Apache Wicket Quickstart</title>
+ <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:regular,bold' rel='stylesheet' type='text/css' />
+ <link rel="stylesheet" href="style.css" type="text/css" media="screen" title="Stylesheet" charset="utf-8" />
+ </head>
+ <body>
+ <div id="hd">
+ <div id="logo">
+ <img src="logo.png" width="50px" height="50px" alt="Wicket Logo" />
+ <h1>Apache Wicket</h1>
+ </div>
+ </div>
+ <div id="bd">
+ <h2>Congratulations!</h2>
+ <p>
+ Your quickstart works! This project is especially useful to
+ start developing your Wicket application or to create a test
+ case for a bug report.
+ </p>
+ <h3>Get started</h3>
+ <p>
+ From here you can start hacking away at your application and
+ wow your clients:
+ </p>
+ <ul>
+ <li>work through <a href="http://wicket.apache.org/learn/examples.html" target="_blank" title="Hello world and friends">some examples</a></li>
+ <li>read <a href="http://wicket.apache.org/learn/books.html" target="_blank" title="Books about Wicket in English, German and Japanese">some books</a></li>
+ <li>find <a href="http://wicket.apache.org/learn/projects" target="_blank" title="Additional projects, components and libraries">additional components, projects and libraries</a></li>
+ </ul>
+ <h3>Get help</h3>
+ <p>
+ We are here to help!
+ </p>
+ <ul>
+ <li>join us on IRC on <a href="irc:%23%23wicket@irc.freenode.net">##wicket@irc.freenode.net</a></li>
+ <li><a href="http://wicket-users.markmail.org/" target="_blank" title="Search the mailing list archives">search</a> our mailing list archives</li>
+ <li>ask a question on the <a href="http://wicket.apache.org/help/email.html">users list</a></li>
+ </ul>
+ <h3>Reporting a bug</h3>
+ <p>
+ Help us help you:
+ </p>
+ <ol>
+ <li>reproduce the bug with the <strong>least</strong> amount of code</li>
+ <li>create a unit test that shows the bug</li>
+ <li>fix the bug and create a patch</li>
+ <li>attach the result of step 1, 2 or 3 to a <a href="https://issues.apache.org/jira/browse/WICKET" target="_blank">JIRA issue</a></li>
+ <li>profit!</li>
+ </ol>
+ <p>
+ Please mention the correct Wicket version: <wicket:container wicket:id="version">1.5-SNAPSHOT</wicket:container>.
+ </p>
+ </div>
+ <div id="ft">
+ </div>
+ </body>
</html>
Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java?rev=1059880&r1=1059879&r2=1059880&view=diff
==============================================================================
--- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java (original)
+++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java Mon Jan 17 11:25:02 2011
@@ -4,26 +4,11 @@ import org.apache.wicket.request.mapper.
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.WebPage;
-/**
- * Homepage
- */
public class HomePage extends WebPage {
-
private static final long serialVersionUID = 1L;
- // TODO Add any page properties or variables here
-
- /**
- * Constructor that is invoked when page is invoked without a session.
- *
- * @param parameters
- * Page parameters
- */
public HomePage(final PageParameters parameters) {
-
- // Add the simplest type of label
- add(new Label("message", "If you see this message wicket is properly configured and running"));
-
+ add(new Label("version", getApplication().getFrameworkSettings().getVersion()));
// TODO Add your page's components here
}
}
Added: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/logo.png
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/logo.png?rev=1059880&view=auto
==============================================================================
Binary file - no diff available.
Propchange: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/logo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/style.css
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/style.css?rev=1059880&view=auto
==============================================================================
--- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/style.css (added)
+++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/style.css Mon Jan 17 11:25:02 2011
@@ -0,0 +1,68 @@
+body, p, li, a { font-family: georgia, times, serif;font-size:13pt;}
+h1, h2, h3 { font-family: 'Yanone Kaffeesatz', arial, serif; }
+body { margin:0;padding:0;}
+#hd {
+ width : 100%;
+ height : 87px;
+ background-color : #092E67;
+ margin-top : 0;
+ padding-top : 10px;
+ border-bottom : 1px solid #888;
+ z-index : 0;
+}
+#ft {
+ position : absolute;
+ bottom : 0;
+ width : 100%;
+ height : 99px;
+ background-color : #6493D2;
+ border-top : 1px solid #888;
+ z-index : 0;
+}
+#logo,#bd {
+ width : 650px;
+ margin: 0 auto;
+ padding: 25px 50px 0 50px;
+}
+#logo h1 {
+ color : white;
+ font-size:36pt;
+ display: inline;
+}
+#logo img {
+ display:inline;
+ vertical-align: bottom;
+ margin-left : 50px;
+ margin-right : 5px;
+}
+body { margin-top : 0; padding-top : 0;}
+#logo, #logo h1 { margin-top : 0; padding-top : 0;}
+#bd {
+ position : absolute;
+ top : 75px;
+ bottom : 75px;
+ left : 50%;
+ margin-left : -325px;
+ z-index : 1;
+ overflow: auto;
+ background-color : #fff;
+ -webkit-border-radius: 10px;
+ -moz-border-radius: 10px;
+ border-radius: 10px;
+ -moz-box-shadow: 0px 0px 10px #888;
+ -webkit-box-shadow: 0px 0px 10px #888;
+ box-shadow: 0px 0px 10px #888;
+}
+a, a:visited, a:hover, a:active {
+ color : #6493D2;
+}
+h2 {
+ padding : 0; margin:0;
+ font-size:36pt;
+ color:#FF5500;
+}
+h3 {
+ padding : 0; margin:0;
+ font-size:24pt;
+ color:#092E67;
+}
\ No newline at end of file
Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java?rev=1059880&r1=1059879&r2=1059880&view=diff
==============================================================================
--- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java (original)
+++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java Mon Jan 17 11:25:02 2011
@@ -1,48 +1,48 @@
package ${package};
-import org.mortbay.jetty.Connector;
-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.bio.SocketConnector;
-import org.mortbay.jetty.webapp.WebAppContext;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.bio.SocketConnector;
+import org.eclipse.jetty.webapp.WebAppContext;
public class Start {
public static void main(String[] args) throws Exception {
- Server server = new Server();
- SocketConnector connector = new SocketConnector();
-
- // Set some timeout options to make debugging easier.
- connector.setMaxIdleTime(1000 * 60 * 60);
- connector.setSoLingerTime(-1);
- connector.setPort(8080);
- server.setConnectors(new Connector[] { connector });
-
- WebAppContext bb = new WebAppContext();
- bb.setServer(server);
- bb.setContextPath("/");
- bb.setWar("src/main/webapp");
-
- // START JMX SERVER
- // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
- // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
- // server.getContainer().addEventListener(mBeanContainer);
- // mBeanContainer.start();
-
- server.addHandler(bb);
-
- try {
- System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
- server.start();
- System.in.read();
- System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
+ Server server = new Server();
+ SocketConnector connector = new SocketConnector();
+
+ // Set some timeout options to make debugging easier.
+ connector.setMaxIdleTime(1000 * 60 * 60);
+ connector.setSoLingerTime(-1);
+ connector.setPort(8080);
+ server.setConnectors(new Connector[] { connector });
+
+ WebAppContext bb = new WebAppContext();
+ bb.setServer(server);
+ bb.setContextPath("/");
+ bb.setWar("src/main/webapp");
+
+ // START JMX SERVER
+ // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
+ // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
+ // server.getContainer().addEventListener(mBeanContainer);
+ // mBeanContainer.start();
+
+ server.setHandler(bb);
+
+ try {
+ System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
+ server.start();
+ System.in.read();
+ System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
// while (System.in.available() == 0) {
- // Thread.sleep(5000);
- // }
- server.stop();
- server.join();
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(100);
- }
+ // Thread.sleep(5000);
+ // }
+ server.stop();
+ server.join();
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.exit(100);
+ }
}
}
Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java?rev=1059880&r1=1059879&r2=1059880&view=diff
==============================================================================
--- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java (original)
+++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java Mon Jan 17 11:25:02 2011
@@ -1,30 +1,29 @@
package ${package};
-import junit.framework.TestCase;
import org.apache.wicket.util.tester.WicketTester;
+import org.junit.Before;
+import org.junit.Test;
/**
* Simple test using the WicketTester
*/
-public class TestHomePage extends TestCase
+public class TestHomePage
{
private WicketTester tester;
- @Override
+ @Before
public void setUp()
{
tester = new WicketTester(new WicketApplication());
}
- public void testRenderMyPage()
+ @Test
+ public void homepageRendersSuccessfully()
{
//start and render the test page
tester.startPage(HomePage.class);
//assert rendered page class
tester.assertRenderedPage(HomePage.class);
-
- //assert rendered label component
- tester.assertLabel("message", "If you see this message wicket is properly configured and running");
}
}