You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2015/06/25 10:06:51 UTC

[01/14] wicket git commit: Example to run Arquillian with Wicket. I'm using Wildfly example from https://github.com/wildfly/quickstart/tree/master/wicket-war Made some modifications and added an Arquillian Test configured and running, everything passing,

Repository: wicket
Updated Branches:
  refs/heads/master 3e63e97c5 -> ea1dc12e4


Example to run Arquillian with Wicket.
I'm using Wildfly example from
https://github.com/wildfly/quickstart/tree/master/wicket-war
Made some modifications and added an Arquillian Test configured and
running, everything passing, and has some LOG to help to understand.
To run for the first time just type: mvn install
Then mvn test.
Import to Eclipse (or any IDE), and run the example inside, to debug,
has to run the test normally and connect as remote.
Not necessary to download any Application Server, the maven plugin
already do this for you (It's managed).

Signed-off-by: Felipe C Almeida <fr...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/11b458bc
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/11b458bc
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/11b458bc

Branch: refs/heads/master
Commit: 11b458bc303a75b071acbdd1593dca657da1ee8e
Parents: 5b13f0a
Author: Felipe C <fr...@gmail.com>
Authored: Sun Jun 21 03:08:56 2015 -0300
Committer: Felipe C <fr...@gmail.com>
Committed: Sun Jun 21 03:08:56 2015 -0300

----------------------------------------------------------------------
 testing/wicket-arquillian/README.md             |  89 +++++
 testing/wicket-arquillian/pom.xml               | 345 +++++++++++++++++++
 .../wicketWar/WicketJavaEEApplication.java      |  70 ++++
 .../quickstarts/wicketWar/dao/ContactDao.java   |  61 ++++
 .../wicketWar/dao/ContactDaoBean.java           |  69 ++++
 .../as/quickstarts/wicketWar/model/Contact.java | 104 ++++++
 .../wicketWar/pages/InsertContact.java          |  82 +++++
 .../wicketWar/pages/ListContacts.java           |  70 ++++
 .../util/ResourceWebApplicationPath.java        |  98 ++++++
 .../src/main/resources/META-INF/MANIFEST.MF     |   1 +
 .../src/main/resources/META-INF/persistence.xml |  35 ++
 .../src/main/webapp/WEB-INF/beans.xml           |  25 ++
 .../src/main/webapp/WEB-INF/faces-config.xml    |   9 +
 .../src/main/webapp/WEB-INF/web.xml             |  49 +++
 .../webapp/WEB-INF/wicket-quickstart-ds.xml     |  37 ++
 .../src/main/webapp/pages/InsertContact.html    |  41 +++
 .../src/main/webapp/pages/ListContacts.html     |  43 +++
 .../wicketWar/TestWicketJavaEEApplication.java  |  36 ++
 .../wicketWar/pages/InsertContactTest.java      | 207 +++++++++++
 .../src/test/resources/arquillian.xml           |  22 ++
 .../src/test/webapp/WEB-INF/web.xml             |  42 +++
 21 files changed, 1535 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/README.md
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/README.md b/testing/wicket-arquillian/README.md
new file mode 100644
index 0000000..6e17c0b
--- /dev/null
+++ b/testing/wicket-arquillian/README.md
@@ -0,0 +1,89 @@
+wicket-war: Wicket Framework used in a WAR.
+===========================================
+Author: Ondrej Zizka <oz...@redhat.com>
+Level: Intermediate
+Technologies: Apache Wicket, JPA
+Summary: Demonstrates how to use the Wicket Framework 1.5 with the JBoss server using the Wicket-Stuff Java EE integration packaged as a WAR
+Target Project: WildFly
+Source: <https://github.com/wildfly/quickstart/>
+
+What is it?
+-----------
+
+This is an example of how to use Wicket Framework 1.5 with WildFly, leveraging features of Java EE 7, using the Wicket-Stuff Java EE integration.
+
+Features used:
+
+ * Injection of `@PersistenceContext`
+ * Injection of a value from `web.xml` using `@Resource`
+ * Injection of a stateless session bean using `@EJB`
+
+This is a WAR version.
+
+
+System requirements
+-------------------
+
+All you need to build this project is Java 7.0 (Java SDK 1.7) or better, Maven 3.1 or better.
+
+The application this project produces is designed to be run on JBoss WildFly.
+
+ 
+Configure Maven
+---------------
+
+If you have not yet done so, you must [Configure Maven](../README.md#mavenconfiguration) before testing the quickstarts.
+
+
+Start JBoss WildFly with the Web Profile
+-------------------------
+
+1. Open a command line and navigate to the root of the JBoss server directory.
+2. The following shows the command line to start the server with the web profile:
+
+        For Linux:   JBOSS_HOME/bin/standalone.sh
+        For Windows: JBOSS_HOME\bin\standalone.bat
+
+
+
+Build and Deploy the Quickstart
+-------------------------
+
+_NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line. See [Build and Deploy the Quickstarts](../README.md#buildanddeploy) for complete instructions and additional options._
+
+1. Make sure you have started the JBoss Server as described above.
+2. Open a command line and navigate to the root directory of this quickstart.
+3. Type this command to build and deploy the archive:
+
+        mvn clean package wildfly:deploy
+
+4. This will deploy `target/wildfly-wicket-war.war` to the running instance of the server.
+
+
+
+Access the application
+----------------------
+
+Access the running application in a browser at the following URL:  <http://localhost:8080/wildfly-wicket-war>
+
+You will see a page with a table listing user entities. Initially, this table is empty.  By clicking a link, you can add more users.
+
+
+Undeploy the Archive
+--------------------
+
+1. Make sure you have started the JBoss Server as described above.
+2. Open a command line and navigate to the root directory of this quickstart.
+3. When you are finished testing, type this command to undeploy the archive:
+
+        mvn wildfly:undeploy
+
+
+Debug the Application
+------------------------------------
+
+If you want to debug the source code or look at the Javadocs of any library in the project, 
+run either of the following commands to pull them into your local repository. The IDE should then detect them.
+
+        mvn dependency:sources
+        mvn dependency:resolve -Dclassifier=javadoc

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/pom.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml
new file mode 100644
index 0000000..0c8d4fc
--- /dev/null
+++ b/testing/wicket-arquillian/pom.xml
@@ -0,0 +1,345 @@
+<?xml version="1.0"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2013, Red Hat, Inc. 
+	and/or its affiliates, and individual contributors by the @authors tag. See 
+	the copyright.txt in the distribution for a full listing of individual contributors. 
+	Licensed 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. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.wildfly.quickstarts</groupId>
+	<artifactId>wildfly-arquillian-wicket-war</artifactId>
+	<version>8.0.0-SNAPSHOT</version>
+	<packaging>war</packaging>
+
+	<name>WildFly Quickstarts: Wicket: WAR</name>
+	<licenses>
+		<license>
+			<name>Apache License, Version 2.0</name>
+			<distribution>repo</distribution>
+			<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
+		</license>
+	</licenses>
+
+	<description>
+        A sample JAVA EE 6 project demonstrating how to use Wicket Framework with JBoss WildFly.
+        WAR version (everything in a single .war file).
+    </description>
+
+
+	<properties>
+		<!-- Explicitly declaring the source encoding eliminates the following 
+			message: -->
+		<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
+			resources, i.e. build is platform dependent! -->
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+		<!-- JBoss dependency versions -->
+
+		<version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin>
+
+		<version.jboss.spec.javaee.7.0>3.0.2.Final</version.jboss.spec.javaee.7.0>
+
+
+		<!-- Other dependency versions -->
+		<version.org.apache.wicket>1.5.5</version.org.apache.wicket>
+		<version.net.ftlines.wicket-cdi>1.2</version.net.ftlines.wicket-cdi>
+
+		<!-- other plugin versions -->
+		<version.compiler.plugin>3.1</version.compiler.plugin>
+		<version.war.plugin>2.1.1</version.war.plugin>
+
+		<!-- maven-compiler-plugin -->
+		<maven.compiler.target>1.7</maven.compiler.target>
+		<maven.compiler.source>1.7</maven.compiler.source>
+
+		<version.shrinkwrap.resolvers>2.1.1</version.shrinkwrap.resolvers>
+		<version.arquillian_core>1.0.3.Final</version.arquillian_core>
+		<version.jbossas_7>8.1.0.Final</version.jbossas_7>
+		<version.junit>4.8.1</version.junit>
+	</properties>
+
+	<dependencyManagement>
+		<dependencies>
+			<!-- JBoss distributes a complete set of Java EE 7 APIs including a Bill 
+				of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
+				of artifacts. We use this here so that we always get the correct versions 
+				of artifacts. Here we use the jboss-javaee-7.0-with-tools stack (you can 
+				read this as the JBoss stack of the Java EE 7 APIs, with some extras tools 
+				for your project, such as Arquillian for testing) and the jboss-javaee-7.0-with-hibernate 
+				stack you can read this as the JBoss stack of the Java EE 7 APIs, with extras 
+				from the Hibernate family of projects) -->
+			<dependency>
+				<groupId>org.jboss.spec</groupId>
+				<artifactId>jboss-javaee-6.0</artifactId>
+				<version>${version.jboss.spec.javaee.7.0}</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
+
+			<!-- Wicket -->
+			<dependency>
+				<groupId>org.apache.wicket</groupId>
+				<artifactId>wicket-core</artifactId>
+				<version>${version.org.apache.wicket}</version>
+			</dependency>
+
+			<!-- Wicket Java EE integration. -->
+			<dependency>
+				<groupId>net.ftlines.wicket-cdi</groupId>
+				<artifactId>wicket-cdi</artifactId>
+				<version>${version.net.ftlines.wicket-cdi}</version>
+			</dependency>
+
+			<!-- Arquillian -->
+			<!-- Override dependency resolver with latest version. This must go *BEFORE* 
+				the Arquillian BOM. -->
+			<dependency>
+				<groupId>org.jboss.shrinkwrap.resolver</groupId>
+				<artifactId>shrinkwrap-resolver-bom</artifactId>
+				<version>${version.shrinkwrap.resolvers}</version>
+				<scope>import</scope>
+				<type>pom</type>
+			</dependency>
+			<dependency>
+				<groupId>org.jboss.arquillian</groupId>
+				<artifactId>arquillian-bom</artifactId>
+				<version>${version.arquillian_core}</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
+			<dependency>
+				<groupId>org.jboss.arquillian.container</groupId>
+				<artifactId>arquillian-container-test-impl-base</artifactId>
+				<version>${version.arquillian_core}</version>
+				<classifier>tests</classifier>
+			</dependency>
+			<dependency>
+				<groupId>org.jboss.arquillian.core</groupId>
+				<artifactId>arquillian-core-impl-base</artifactId>
+				<version>${version.arquillian_core}</version>
+				<classifier>tests</classifier>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+
+	<!-- Dependencies. -->
+
+	<dependencies>
+		<!-- "provided" scope used for API's included in JBoss WildFly. -->
+
+		<!-- Import the CDI API. -->
+		<dependency>
+			<groupId>javax.enterprise</groupId>
+			<artifactId>cdi-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- Import the Common Annotations API (JSR-250). -->
+		<dependency>
+			<groupId>org.jboss.spec.javax.annotation</groupId>
+			<artifactId>jboss-annotations-api_1.1_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- Import the EJB API. -->
+		<dependency>
+			<groupId>org.jboss.spec.javax.ejb</groupId>
+			<artifactId>jboss-ejb-api_3.1_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- Import the JPA API. -->
+		<dependency>
+			<groupId>org.hibernate.javax.persistence</groupId>
+			<artifactId>hibernate-jpa-2.0-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- Servlet -->
+		<dependency>
+			<groupId>org.jboss.spec.javax.servlet</groupId>
+			<artifactId>jboss-servlet-api_3.0_spec</artifactId>
+		</dependency>
+
+		<!-- Wicket -->
+		<dependency>
+			<groupId>org.apache.wicket</groupId>
+			<artifactId>wicket-core</artifactId>
+		</dependency>
+
+		<!-- Wicket CDI integration. -->
+		<dependency>
+			<groupId>net.ftlines.wicket-cdi</groupId>
+			<artifactId>wicket-cdi</artifactId>
+		</dependency>
+
+		<!-- Shrinkwrap -->
+		<dependency>
+			<groupId>org.jboss.shrinkwrap.resolver</groupId>
+			<artifactId>shrinkwrap-resolver-depchain</artifactId>
+			<!-- <version>${version.shrinkwrap.resolvers}</version> -->
+			<scope>test</scope>
+			<type>pom</type>
+		</dependency>
+		<!-- <dependency> <groupId>org.jboss.shrinkwrap</groupId> <artifactId>shrinkwrap-api</artifactId> 
+			<scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap</groupId> 
+			<artifactId>shrinkwrap-spi</artifactId> <scope>test</scope> </dependency> 
+			<dependency> <groupId>org.jboss.shrinkwrap</groupId> <artifactId>shrinkwrap-impl-base</artifactId> 
+			<scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> 
+			<artifactId>shrinkwrap-resolver-api</artifactId> <scope>test</scope> </dependency> 
+			<dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-api-maven</artifactId> 
+			<scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> 
+			<artifactId>shrinkwrap-resolver-impl-maven</artifactId> <scope>test</scope> 
+			</dependency> -->
+
+		<!-- Arquillian Test Harness -->
+		<dependency>
+			<groupId>org.jboss.arquillian.core</groupId>
+			<artifactId>arquillian-core-api</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.core</groupId>
+			<artifactId>arquillian-core-spi</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.test</groupId>
+			<artifactId>arquillian-test-spi</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.container</groupId>
+			<artifactId>arquillian-container-spi</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.container</groupId>
+			<artifactId>arquillian-container-test-spi</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jboss.arquillian.junit</groupId>
+			<artifactId>arquillian-junit-container</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.container</groupId>
+			<artifactId>arquillian-container-test-impl-base</artifactId>
+			<classifier>tests</classifier>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.core</groupId>
+			<artifactId>arquillian-core-impl-base</artifactId>
+			<classifier>tests</classifier>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${version.junit}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.protocol</groupId>
+			<artifactId>arquillian-protocol-servlet</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.wildfly</groupId>
+			<artifactId>wildfly-arquillian-container-managed</artifactId>
+			<version>${version.jbossas_7}</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<!-- Set the name of the war, used as the context root when the app is 
+			deployed. -->
+		<finalName>${project.artifactId}</finalName>
+
+		<!-- Allow packaging the html files alongside the java sources -->
+		<!-- <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> 
+			</resource> <resource> <directory>src/main/java</directory> <filtering>true</filtering> 
+			<includes> <include>**</include> </includes> <excludes> <exclude>**/*.java</exclude> 
+			</excludes> </resource> </resources> -->
+		<!-- <testResources> <testResource> <directory>src/test/resources</directory> 
+			<filtering>true</filtering> </testResource> <testResource> <directory>src/test/java</directory> 
+			<filtering>true</filtering> <includes> <include>**</include> </includes> 
+			<excludes> <exclude>**/*.java</exclude> </excludes> </testResource> </testResources> -->
+
+		<plugins>
+			<!-- WildFly plugin to deploy the war -->
+			<plugin>
+				<groupId>org.wildfly.plugins</groupId>
+				<artifactId>wildfly-maven-plugin</artifactId>
+				<version>${version.wildfly.maven.plugin}</version>
+				<configuration>
+					<fileNames>
+						<fileName>target/${build.finalName}.war</fileName>
+					</fileNames>
+				</configuration>
+			</plugin>
+			<!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation 
+				processors -->
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>${version.compiler.plugin}</version>
+				<configuration>
+					<source>${maven.compiler.source}</source>
+					<target>${maven.compiler.target}</target>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<version>2.12.4</version>
+				<configuration>
+					<environmentVariables>
+						<JBOSS_HOME>${project.build.directory}/wildfly-${version.jbossas_7}</JBOSS_HOME>
+					</environmentVariables>
+					<systemProperties>
+						<jboss.version>${version.jbossas_7}</jboss.version>
+					</systemProperties>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>unpack</id>
+						<phase>process-test-classes</phase>
+						<goals>
+							<goal>unpack</goal>
+						</goals>
+						<configuration>
+							<artifactItems>
+								<artifactItem>
+									<groupId>org.wildfly</groupId>
+									<artifactId>wildfly-dist</artifactId>
+									<version>${version.jbossas_7}</version>
+									<type>zip</type>
+									<overWrite>true</overWrite>
+									<outputDirectory>${project.build.directory}</outputDirectory>
+								</artifactItem>
+							</artifactItems>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
+

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java
new file mode 100644
index 0000000..a91c104
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.jboss.as.quickstarts.wicketWar;
+
+import static net.ftlines.wicket.cdi.ConversationPropagation.NONE;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import net.ftlines.wicket.cdi.CdiConfiguration;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.util.file.IResourceFinder;
+import org.jboss.as.quickstarts.wicketWar.pages.InsertContact;
+import org.jboss.as.quickstarts.wicketWar.pages.ListContacts;
+import org.jboss.as.quickstarts.wicketWar.util.ResourceWebApplicationPath;
+
+
+/**
+ *
+ * @author Ondrej Zizka
+ */
+public class WicketJavaEEApplication extends WebApplication {
+
+    @Override
+    public Class<? extends Page> getHomePage() {
+        return ListContacts.class;
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        // Enable CDI
+        BeanManager bm;
+        try {
+            bm = (BeanManager) new InitialContext().lookup("java:comp/BeanManager");
+        } catch (NamingException e) {
+            throw new IllegalStateException("Unable to obtain CDI BeanManager", e);
+        }
+
+        // Configure CDI, disabling Conversations as we aren't using them
+        new CdiConfiguration(bm).setPropagation(NONE).configure(this);
+        
+        // Mount the InsertContact page at /insert
+        mountPage("/insert", InsertContact.class);
+    }
+    
+    @Override
+    protected IResourceFinder getResourceFinder() {
+    	return new ResourceWebApplicationPath(WicketJavaEEApplication.class.getPackage().getName(), getServletContext());
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java
new file mode 100644
index 0000000..78d7003
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.jboss.as.quickstarts.wicketWar.dao;
+
+import java.util.List;
+
+import javax.ejb.Local;
+
+import org.jboss.as.quickstarts.wicketWar.model.Contact;
+
+/**
+ *
+ * @author Filippo Diotalevi
+ */
+@Local
+public interface ContactDao {
+
+    /**
+     * Returns the currently available contacts.
+     *
+     * @return every contact in the database
+     */
+    public List<Contact> getContacts();
+
+    /**
+     * Returns a specific Contact from DB.
+     *
+     * @param id The Id for the Contact
+     * @return The specified Contact object
+     */
+    public Contact getContact(Long id);
+
+    /**
+     * Persist a new Contact in the DB.
+     *
+     * @param name The name of the new Contact
+     * @param email The e-mail address of the new Contact
+     */
+    public void addContact(String name, String email);
+
+    /**
+     * Removes a specific item from the DB.
+     *
+     * @param modelObject The specific Contact object, which we wants to remove
+     */
+    public void remove(Contact modelObject);
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java
new file mode 100644
index 0000000..25fb2d1
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.jboss.as.quickstarts.wicketWar.dao;
+
+import java.util.List;
+
+import javax.ejb.Stateless;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.jboss.as.quickstarts.wicketWar.model.Contact;
+
+/**
+ * A bean which manages Contact entities.
+ */
+@Stateless
+public class ContactDaoBean implements ContactDao {
+
+    @PersistenceContext
+    private EntityManager em;
+
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<Contact> getContacts() {
+        return em.createQuery("SELECT c FROM Contact c").getResultList();
+    }
+
+    /**
+     * Get Contact by ID.
+     */
+    @Override
+    public Contact getContact(Long id) {
+        return em.find(Contact.class, id);
+    }
+
+    /**
+     * Add a new Contact.
+     */
+    @Override
+    public void addContact(String name, String email) {
+        em.merge(new Contact(null, name, email));
+    }
+
+    /**
+     * Remove a Contact.
+     */
+    @Override
+    public void remove(Contact modelObject) {
+        Contact managed = em.merge(modelObject);
+        em.remove(managed);
+        em.flush();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java
new file mode 100644
index 0000000..152b777
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.jboss.as.quickstarts.wicketWar.model;
+
+import static javax.persistence.GenerationType.IDENTITY;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+
+/**
+ *
+ * @author Filippo Diotalevi
+ */
+@SuppressWarnings("serial")
+@Entity
+public class Contact implements Serializable {
+
+    @Id
+    @GeneratedValue(strategy = IDENTITY)
+    private Long id;
+    private String name;
+    
+    @Column(unique=true)
+    private String email;
+
+    public Contact() {
+    }
+
+    public Contact(Long id, String name, String email) {
+        this.id = id;
+        this.name = name;
+        this.email = email;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((email == null) ? 0 : email.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Contact other = (Contact) obj;
+        if (email == null) {
+            if (other.email != null)
+                return false;
+        } else if (!email.equals(other.email))
+            return false;
+        return true;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java
new file mode 100644
index 0000000..ce7c692
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.jboss.as.quickstarts.wicketWar.pages;
+
+import javax.inject.Inject;
+
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.model.PropertyModel;
+import org.jboss.as.quickstarts.wicketWar.dao.ContactDao;
+import org.jboss.as.quickstarts.wicketWar.model.Contact;
+
+/**
+ *
+ * @author Filippo Diotalevi
+ */
+@SuppressWarnings("serial")
+public class InsertContact extends WebPage {
+    
+    private Form<Contact> insertForm;
+    
+    private String name;
+    
+    private String email;
+    
+    @Inject
+    private ContactDao contactDao;
+
+    
+    public InsertContact() {
+        add(new FeedbackPanel("feedback"));
+
+        insertForm = new Form<Contact>("insertForm") {
+
+            @Override
+            protected void onSubmit() {
+                contactDao.addContact(name, email);
+                setResponsePage(ListContacts.class);
+            }
+        };
+
+        insertForm.add(new RequiredTextField<String>("name",
+                new PropertyModel<String>(this, "name")));
+        insertForm.add(new RequiredTextField<String>("email", new PropertyModel<String>(this,
+                "email")));
+        add(insertForm);
+    }
+
+    
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java
new file mode 100644
index 0000000..fe86ce1
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.jboss.as.quickstarts.wicketWar.pages;
+
+import javax.annotation.Resource;
+import javax.inject.Inject;
+
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.jboss.as.quickstarts.wicketWar.dao.ContactDao;
+import org.jboss.as.quickstarts.wicketWar.model.Contact;
+
+/**
+ * Dynamic behavior for the ListContact page
+ * 
+ * @author Filippo Diotalevi
+ */
+@SuppressWarnings("serial")
+public class ListContacts extends WebPage {
+
+    // Inject the ContactDao using @Inject
+    @Inject
+    private ContactDao contactDao;
+
+    @Resource(name = "welcomeMessage")
+    private String welcome;
+
+    // Set up the dynamic behavior for the page, widgets bound by id
+    public ListContacts() {
+
+        // Add the dynamic welcome message, specified in web.xml
+        add(new Label("welcomeMessage", welcome));
+        add(new ListView<Contact>("contacts", contactDao.getContacts()) {
+
+            // Populate the table of contacts
+            @Override
+            protected void populateItem(final ListItem<Contact> item) {
+                Contact contact = item.getModelObject();
+                item.add(new Label("name", contact.getName()));
+                item.add(new Label("email", contact.getEmail()));
+                item.add(new Link<Contact>("delete", item.getModel()) {
+
+                    @Override
+                    public void onClick() {
+                        contactDao.remove(item.getModelObject());
+                        setResponsePage(ListContacts.class);
+                    }
+                });
+            }
+        });
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java
new file mode 100644
index 0000000..6aea12e
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ */
+package org.jboss.as.quickstarts.wicketWar.util;
+
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+
+import org.apache.wicket.util.file.IResourcePath;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.util.resource.UrlResourceStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Maintain a list of paths which might either be ordinary folders of the filesystem or relative
+ * paths to the web application's servlet context.
+ * 
+ * @author Johan Compagner
+ */
+public final class ResourceWebApplicationPath implements IResourcePath
+{
+	private final static Logger log = LoggerFactory.getLogger(ResourceWebApplicationPath.class);
+
+	private static final String WEB_INF = "WEB-INF/";
+
+	/** The web apps servlet context */
+	private final ServletContext servletContext;
+
+	private String basePath;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param servletContext
+	 *            The webapplication context where the resources must be loaded from
+	 */
+	public ResourceWebApplicationPath(String basePath,final ServletContext servletContext)
+	{
+		this.basePath = basePath.replaceAll("\\.", "\\/");
+		this.servletContext = servletContext;
+	}
+
+	/**
+	 * 
+	 * @see org.apache.wicket.util.file.IResourceFinder#find(Class, String)
+	 */
+	public IResourceStream find(final Class<?> clazz, final String pathname)
+	{
+
+		if (pathname.startsWith(WEB_INF) == false)
+		{
+			try
+			{
+				final URL url = servletContext.getResource(pathname.replaceFirst(basePath, ""));
+				if (url != null)
+				{
+					return new UrlResourceStream(url);
+				}
+			}
+			catch (Exception ex)
+			{
+				// ignore, file couldn't be found
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString()
+	{
+		return "[webapppath: " + basePath + "]";
+	}
+
+	@Override
+	public void add(String folder) {
+		// DO NOTHING.
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/resources/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/resources/META-INF/MANIFEST.MF b/testing/wicket-arquillian/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..aff5ee3
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1 @@
+Dependencies: org.jboss.msc

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml b/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..0c3470d
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    JBoss, Home of Professional Open Source
+    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+    contributors by the @authors tag. See the copyright.txt in the
+    distribution for a full listing of individual contributors.
+
+    Licensed 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.
+-->
+<persistence version="2.0"
+    xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+        http://java.sun.com/xml/ns/persistence
+        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+    <persistence-unit name="primary">
+        <!-- If you are running in a production environment, add a managed 
+            data source, this example data source is just for development and testing! -->
+        <!-- The datasource is deployed as <EAR>/META-INF/wicket-quickstart-ds.xml, 
+            you can find it in the source at ear/src/main/application/META-INF/wicket-quickstart-ds.xml -->
+        <jta-data-source>java:jboss/datasources/WicketQuickstartDS</jta-data-source>
+        <properties>
+            <!-- Properties for Hibernate -->
+            <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+            <property name="hibernate.show_sql" value="false" />
+        </properties>
+    </persistence-unit>
+</persistence>

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml
new file mode 100644
index 0000000..e7488ad
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    JBoss, Home of Professional Open Source
+    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+    contributors by the @authors tag. See the copyright.txt in the
+    distribution for a full listing of individual contributors.
+
+    Licensed 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.
+-->
+<!-- This file can be an empty text file (0 bytes) -->
+<!-- We're declaring the schema to save you time if you do have to configure 
+   this in the future -->
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="
+        http://java.sun.com/xml/ns/javaee 
+        http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml
new file mode 100644
index 0000000..ddd61c7
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+    xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+    version="1.2">
+
+</faces-config>

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..040099d
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    JBoss, Home of Professional Open Source
+    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+    contributors by the @authors tag. See the copyright.txt in the
+    distribution for a full listing of individual contributors.
+
+    Licensed 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.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+    version="2.5">
+
+    <display-name>WildFly Quickstart: Wicket WAR</display-name>
+
+    <!-- Enable Wicket -->
+    <filter>
+        <filter-name>Wicket</filter-name>
+        <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+        <init-param>
+            <!-- Specify the "entry point" for Wicket to configure itself 
+                from -->
+            <param-name>applicationClassName</param-name>
+            <param-value>org.jboss.as.quickstarts.wicketWar.WicketJavaEEApplication</param-value>
+        </init-param>
+    </filter>
+
+    <!-- Have wicket manage the context root -->
+    <filter-mapping>
+        <filter-name>Wicket</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <!-- A message displayed on the page, externalized into web.xml -->
+    <env-entry>
+        <env-entry-name>welcomeMessage</env-entry-name>
+        <env-entry-type>java.lang.String</env-entry-type>
+        <env-entry-value>Welcome to the WildFly Quickstart showing the use of Wicket, packaged in an WAR</env-entry-value>
+    </env-entry>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml
new file mode 100644
index 0000000..92fa71a
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    JBoss, Home of Professional Open Source
+    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+    contributors by the @authors tag. See the copyright.txt in the
+    distribution for a full listing of individual contributors.
+
+    Licensed 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.
+-->
+<!-- This is an unmanaged datasource. It should be used for proofs of concept 
+    or testing only. It uses H2, an in memory database that ships with JBoss 
+    AS. -->
+<datasources xmlns="http://www.jboss.org/ironjacamar/schema"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
+    <!-- The datasource is bound into JNDI at this location. We reference 
+        this in META-INF/persistence.xml -->
+    <datasource jndi-name="java:jboss/datasources/WicketQuickstartDS"
+        pool-name="wicket-quickstart" enabled="true"
+        use-java-context="true">
+        <connection-url>jdbc:h2:mem:wicket-quickstart;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1</connection-url>
+        <driver>h2</driver>
+        <security>
+            <user-name>sa</user-name>
+            <password>sa</password>
+        </security>
+    </datasource>
+</datasources>
+ 

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html b/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html
new file mode 100644
index 0000000..309531e
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html
@@ -0,0 +1,41 @@
+<!--
+    JBoss, Home of Professional Open Source
+    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+    contributors by the @authors tag. See the copyright.txt in the
+    distribution for a full listing of individual contributors.
+
+    Licensed 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.
+-->
+<html xmlns:wicket="http://wicket.sourceforge.net/">
+    <head>
+        <title>wicket-war</title>
+    </head>
+
+    <body>
+        <span wicket:id="feedback"></span>
+        <form method="post" action="#" wicket:id="insertForm">
+            <table border="0" cellpadding="5">
+                <tr>
+                    <td width="200">Name</td>
+                    <td><input type="text" wicket:id="name" size="20"/></td>
+                </tr>
+                <tr>
+                    <td width="200">Email</td>
+                    <td><input type="text" wicket:id="email" size="20"/></td>
+                </tr>
+                <tr>
+                    <td width="200">&nbsp;</td>
+                    <td><input type="submit" value="Insert"/></td>
+                </tr>
+            </table>
+        </form>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html b/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html
new file mode 100644
index 0000000..d6613bd
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html
@@ -0,0 +1,43 @@
+<!--
+    JBoss, Home of Professional Open Source
+    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+    contributors by the @authors tag. See the copyright.txt in the
+    distribution for a full listing of individual contributors.
+
+    Licensed 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.
+-->
+<html xmlns:wicket="http://wicket.sourceforge.net/">
+    <head>
+        <title>wicket-war</title>
+    </head>
+
+    <body>
+
+        <h1>
+            <span wicket:id="welcomeMessage"></span>
+        </h1>
+
+        <table border="1" cellpadding="8">
+            <tr>
+                <td width="200">Name</td>
+                <td width="200">Email</td>
+                <td width="200">&nbsp;</td>
+            </tr>
+            <tr wicket:id="contacts">
+                <td><span wicket:id="name">[name]</span></td>
+                <td><span wicket:id="email">[email]</span></td>
+                <td><a href="#" wicket:id="delete">[delete]</a></td>
+            </tr>
+        </table>
+        
+        <wicket:link><a href="InsertContact.html">Insert a new Contact</a></wicket:link>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java b/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java
new file mode 100644
index 0000000..da90dcf
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.jboss.as.quickstarts.wicketWar;
+
+import org.apache.wicket.util.file.IResourceFinder;
+import org.jboss.as.quickstarts.wicketWar.util.ResourceWebApplicationPath;
+
+/**
+ * Just extends the Application to add some needs.
+ * 
+ * @author felipecalmeida
+ * @since 06/20/2015
+ */
+public class TestWicketJavaEEApplication extends WicketJavaEEApplication {
+  
+	// Has some security ignores during the test (example: accept all roles).
+	
+	@Override
+    protected IResourceFinder getResourceFinder() {
+    	return new ResourceWebApplicationPath(TestWicketJavaEEApplication.class.getPackage().getName(), getServletContext());
+    }
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java b/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java
new file mode 100644
index 0000000..c7a6631
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java
@@ -0,0 +1,207 @@
+/**
+ * 
+ */
+package org.jboss.as.quickstarts.wicketWar.pages;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.util.tester.WicketTester;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.as.quickstarts.wicketWar.TestWicketJavaEEApplication;
+import org.jboss.as.quickstarts.wicketWar.WicketJavaEEApplication;
+import org.jboss.shrinkwrap.api.Filters;
+import org.jboss.shrinkwrap.api.GenericArchive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
+import org.jboss.shrinkwrap.api.importer.ExplodedImporter;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.Maven;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <b>WARNING: IF THIS ERROR OCCURS - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
+ *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
+ *	
+ *	<b>SOLUTION: SEARCH AND KILL WILDFLY OR JBOSS PROCCESS INSTANCE THAT ARE USING PORT 8080.</b>
+ * 
+ * @author felipecalmeida
+ * @since 06/21/2015
+ *
+ */
+@RunWith(Arquillian.class)
+public class InsertContactTest {
+	
+	/** log. */
+	private static final Logger log = LoggerFactory.getLogger(InsertContactTest.class);
+	
+	private static final String WEBAPP_SRC = "src/main/webapp";
+	private static final String WEBAPP_TEST_SRC = "src/test/webapp";
+
+	@Deployment
+	public static WebArchive deployment() {
+		// Create webapp files from src/main/webapp. (WEB AS NORMAL)
+		GenericArchive webapp = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_SRC).as(GenericArchive.class);
+		
+		// Create webapptest files from src/test/webapp. (TEST)
+		GenericArchive webappTest = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_TEST_SRC).as(GenericArchive.class);
+		
+		// Some configurations to create a manifest.mf.
+		ByteArrayAsset resource = new ByteArrayAsset("Dependencies: org.jboss.msc".getBytes());
+		
+		// Create libs from POM.XML.
+		File[] asFile = Maven.configureResolver()
+				// I'm not using internet directly, I have a Nexus Repository that handles the libs for me.
+				.workOffline().withMavenCentralRepo(false)
+				// Load everything from pom, that is compile and runtime, as a file and transitivity to don't loose anything and cause exceptions.
+				.loadPomFromFile("./pom.xml").importCompileAndRuntimeDependencies()
+				.resolve().withTransitivity().asFile();
+		
+		// Create the WAR.
+		return ShrinkWrap.create(WebArchive.class, "wicket-servletContext.war")
+						 // Add packages and/or classes.
+						 .addPackages(true, TestWicketJavaEEApplication.class.getPackage())
+						 // Add the persistence.xml
+						 .addAsResource("META-INF/persistence.xml")
+						 // Add a manifest.
+						 .addAsManifestResource(resource, "MANIFEST.MF")
+						 // Add WEBAPP files.
+						 .merge(webapp,"/",Filters.exclude(".*\\web.xml"))
+						 // Add WEBAPP TEST files.
+						 .merge(webappTest,"/",Filters.includeAll())
+						 // Add LIBS from POM.XML.
+						 .addAsLibraries(asFile);
+	}
+	
+	private WicketTester wicketTester;
+
+	private ServletContext servletContext;
+	
+//	private String basePath = TestWicketJavaEEApplication.class.getPackage().getName().replaceAll("\\.", "\\/");
+	
+	@After
+	public void tearDown() throws Exception {
+		if(wicketTester != null && wicketTester.getApplication() != null) {
+			wicketTester.getApplication().internalDestroy();
+		}
+	}
+
+	@Test
+	public void testFindResources(){
+		WebApplication webApplication = useServletContextContainer();
+		
+		// USING CONTAINER'S SERVLET.
+		testFindResourcesServletContext(servletContext);
+		
+		reuseServletContextFromContainerOrCreateMock(webApplication);
+		
+		// USING MOCK.
+		testFindResourcesServletContextMock(wicketTester);
+		
+	}
+
+	/**
+	 * Loading the TestWicketJavaEEApplication from src/test/webapp/WEB-INF/web.xml.
+	 * 
+	 * @return
+	 */
+	private WebApplication useServletContextContainer() {
+		WebApplication webApplication = null;
+		try {
+			webApplication = TestWicketJavaEEApplication.get();
+		} catch (Exception e) {
+			log.error("IF NOT USING ARQUILLIAN, org.apache.wicket.Application has a message for you " + e.getMessage());
+			// DIDN'T TEST THIS, JUST SUPPOSING THAT I'M NOT USING ARQUILLIAN, SO SHOULD SHOW THIS MESSAGE.
+			assertEquals("There is no application attached to current thread " + Thread.currentThread().getName(), e.getMessage());
+		}
+		
+		assertNotNull(webApplication);
+		
+		log.info("WebApplication Name: " + webApplication.getName());
+		
+		servletContext = webApplication.getServletContext();
+		assertNotNull(servletContext);
+		log.info("ServletContext Name: " + servletContext.getServletContextName());
+		assertEquals("WildFly Quickstart: Wicket TEST WAR",servletContext.getServletContextName());
+		
+		log.info("Server info: " + servletContext.getServerInfo());
+		return webApplication;
+	}
+
+	/**
+	 * Trying to use ServletContext from Container.
+	 * 
+	 * @param webApplication
+	 */
+	private void reuseServletContextFromContainerOrCreateMock(WebApplication webApplication) {
+		try {
+			log.info("TRYING TO REUSE CONTAINER'S SERVLETCONTEXT/FILTER.");
+			wicketTester = new WicketTester(webApplication);
+			assertNotNull(wicketTester.getApplication());
+			log.info("USING CONTAINER'S SERVLETCONTEXT/FILTER.");
+			log.info("WebApplication after wicketTester Name: " + wicketTester.getApplication().getName());
+			log.info("ServletContext after wicketTester Name: " + wicketTester.getServletContext().getServletContextName());
+			log.info("Server info: " + wicketTester.getServletContext().getServerInfo());
+		} catch (IllegalStateException e) {
+			assertEquals("Application name can only be set once.",e.getMessage());
+			log.error("CANNOT USE CONTAINER'S SERVLETCONTEXT.\n", e);
+		}
+		if(wicketTester == null){
+			try {
+				wicketTester = new WicketTester(new TestWicketJavaEEApplication());
+				assertNotNull(wicketTester.getApplication());
+				log.info("USING A MOCK SERVLETCONTEXT.");
+				log.info("WebApplication MOCK after wicketTester Name: " + wicketTester.getApplication().getName());
+				log.info("ServletContext MOCK after wicketTester Name: " + wicketTester.getServletContext().getServletContextName());
+				log.info("Server info: " + wicketTester.getServletContext().getServerInfo());
+				assertEquals("Wicket Mock Test Environment v1.0", wicketTester.getServletContext().getServerInfo());
+			} catch (IllegalStateException e) {
+				// I DON'T KNOW WHAT OR IF COULD CAUSE THIS.
+				log.error("CANNOT USE A MOCK SERVLETCONTEXT.");
+//				assertEquals("Application name can only be set once.",e.getMessage());
+			}
+		}
+	}
+	
+	/**
+	 * Using mock.
+	 * 
+	 * @param wicketTester
+	 */
+	private void testFindResourcesServletContextMock(WicketTester wicketTester) {
+		testFindResourcesServletContext(wicketTester.getServletContext());
+	}
+	
+	/**
+	 * Look for resources (like html, js, css, img, etc).
+	 * 
+	 * @param servletContext
+	 */
+	private void testFindResourcesServletContext(ServletContext servletContext) {
+		try {
+			// Doing the same thing that ResourceWebApplicationPath does.
+			URL resource = servletContext.getResource("/pages/InsertContact.html");
+			if(resource == null) {
+				throw new MalformedURLException("Resource /pages/InsertContact.html not found.");
+			}
+			log.info("RESOURCE FOUND " + resource.getFile());
+			assertTrue(resource.getFile().contains("/pages/InsertContact.html"));
+		} catch (Exception e) {
+			assertEquals("Resource /pages/InsertContact.html not found.", e.getMessage());
+			log.error("RESOURCE CANNOT BE FOUND.", e);
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/resources/arquillian.xml b/testing/wicket-arquillian/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..b709b61
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/resources/arquillian.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns="http://jboss.org/schema/arquillian"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+    <defaultProtocol type="Servlet 3.0" />
+    <engine>
+        <property name="deploymentExportPath">target</property>
+    </engine>
+    
+    <container qualifier="wildfly" default="true">
+    	<configuration>
+    		<property name="jbossHome">target/wildfly-8.1.0.Final</property>
+            <!-- JDK before 8: -XX:MaxPermSize=128m -XX -->
+            <!-- JDK 8 and later: -XX:MaxMetaspaceSize=128m -->
+            <!-- DEBUG MODE MANAGED: -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y -->
+    		<property name="javaVmArguments">-Xmx128m -XX:MaxMetaspaceSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
+            </property>
+    	</configuration>
+    </container>
+
+</arquillian>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/11b458bc/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml b/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..b52ea2a
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2013, Red Hat, Inc. 
+	and/or its affiliates, and individual contributors by the @authors tag. See 
+	the copyright.txt in the distribution for a full listing of individual contributors. 
+	Licensed 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. -->
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+	<display-name>WildFly Quickstart: Wicket TEST WAR</display-name>
+
+	<!-- Enable Wicket -->
+	<filter>
+		<filter-name>WicketTesterFilter</filter-name>
+		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+		<init-param>
+			<!-- Specify the "entry point" for Wicket to configure itself from -->
+			<param-name>applicationClassName</param-name>
+			<param-value>org.jboss.as.quickstarts.wicketWar.TestWicketJavaEEApplication</param-value>
+		</init-param>
+	</filter>
+
+	<!-- Have wicket manage the context root -->
+	<filter-mapping>
+		<filter-name>WicketTesterFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+	<!-- A message displayed on the page, externalized into web.xml -->
+	<env-entry>
+		<env-entry-name>welcomeMessage</env-entry-name>
+		<env-entry-type>java.lang.String</env-entry-type>
+		<env-entry-value>Welcome to the WildFly Quickstart showing the use of Wicket, packaged in an WAR</env-entry-value>
+	</env-entry>
+
+</web-app>


[09/14] wicket git commit: Merge branch 'master' of https://github.com/apache/wicket.git

Posted by mg...@apache.org.
Merge branch 'master' of https://github.com/apache/wicket.git

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8c3854d6
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8c3854d6
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8c3854d6

Branch: refs/heads/master
Commit: 8c3854d65e65a1bd9b08787b391ffb82c9dd82bb
Parents: e944570 3e63e97
Author: Felipe C. <fr...@gmail.com>
Authored: Wed Jun 24 13:51:13 2015 -0300
Committer: Felipe C. <fr...@gmail.com>
Committed: Wed Jun 24 13:51:13 2015 -0300

----------------------------------------------------------------------
 CHANGELOG-7.x                                   |  95 ++++++++-
 build-versions.py                               |   4 +-
 pom.xml                                         |  39 +++-
 release-dashorst.sh                             |  76 +++++--
 .../java/org/apache/wicket/Application.java     |   2 +-
 .../apache/wicket/ajax/AjaxRequestTarget.java   | 110 +---------
 .../handler/IPartialPageRequestHandler.java     | 129 ++++++++++++
 .../mapper/BasicResourceReferenceMapper.java    |   2 +-
 .../core/request/mapper/ResourceMapper.java     |   2 +-
 .../apache/wicket/markup/html/MarkupUtil.java   |   6 -
 .../markup/html/form/upload/FileUpload.java     |   4 +-
 .../wicket/markup/html/image/InlineImage.java   |   8 +-
 .../wicket/markup/html/list/ListView.java       |  14 +-
 .../markup/html/list/PageableListView.java      |   4 +-
 .../markup/html/list/PropertyListView.java      |   4 +-
 .../apache/wicket/pageStore/DiskDataStore.java  |  11 +-
 .../wicket/pageStore/PerSessionPageStore.java   |   2 +-
 .../protocol/http/AbstractRequestLogger.java    |  32 +--
 .../CsrfPreventionRequestCycleListener.java     |  44 ++--
 .../http/mock/MockHttpServletRequest.java       |   5 +-
 .../protocol/http/mock/MockServletContext.java  |  30 +--
 .../request/handler/render/WebPageRenderer.java |   2 +-
 .../request/resource/PackageResource.java       |   3 +-
 .../resource/PackageResourceReference.java      |  36 ++--
 .../apache/wicket/resource/ResourceUtil.java    |  10 +-
 .../org/apache/wicket/util/image/ImageUtil.java |   4 +-
 .../wicket/util/tester/WicketTestCase.java      | 202 +++++++++++++++++++
 .../wicket/AttributeModifierComponentTest.java  |   2 +-
 .../org/apache/wicket/AuthorizationTest.java    |   1 +
 .../org/apache/wicket/BehaviorRequestTest.java  |   1 +
 .../java/org/apache/wicket/BehaviorUrlTest.java |   1 +
 ...entBehaviorOverComponentTagBehaviorTest.java |   1 +
 .../wicket/ComponentConfigurationTest.java      |   1 +
 .../ComponentInitializationIntegrationTest.java |   1 +
 .../wicket/ComponentInitializationTest.java     |   1 +
 .../apache/wicket/ComponentOnConfigureTest.java |   1 +
 .../java/org/apache/wicket/ComponentTest.java   |   1 +
 .../ComponentWithLazyModelCreationTest.java     |   1 +
 ...ceptionMapperResourceBlockedDevModeTest.java |   1 +
 ...eptionMapperResourceBlockedProdModeTest.java |   1 +
 .../wicket/DefaultExceptionMapperTest.java      |   1 +
 .../apache/wicket/DisabledComponentTest.java    |   1 +
 .../org/apache/wicket/EventDispatcherTest.java  |   1 +
 .../org/apache/wicket/ExceptionMapperTest.java  |   1 +
 .../org/apache/wicket/FeedbackMessagesTest.java |   2 +-
 .../apache/wicket/FormDispatchEventTest.java    |   1 +
 .../org/apache/wicket/MarkupContainerTest.java  |   1 +
 .../apache/wicket/MarkupIdGeneratorTest.java    |   1 +
 .../java/org/apache/wicket/PageFactoryTest.java |   1 +
 .../apache/wicket/PageMarkupLoadingTest.java    |   1 +
 .../wicket/ParentResourceEscapePathTest.java    |   1 +
 .../org/apache/wicket/PlaceholderTagIdTest.java |   1 +
 .../test/java/org/apache/wicket/RemoveTest.java |   1 +
 .../org/apache/wicket/RequestEncodingTest.java  |   1 +
 .../java/org/apache/wicket/ResourceTest.java    |   1 +
 ...ponseAtInterceptPageExceptionInAjaxTest.java |   1 +
 ...artResponseAtInterceptPageExceptionTest.java |   1 +
 .../wicket/RestartResponseExceptionTest.java    |   1 +
 .../wicket/RestartWithMountedPageTest.java      |   1 +
 .../org/apache/wicket/SetResponsePageTest.java  |   1 +
 .../apache/wicket/SharedResourceUrlTest.java    |   1 +
 .../test/java/org/apache/wicket/TesterTest.java |   1 +
 .../java/org/apache/wicket/VisitorTest.java     |   2 +-
 .../java/org/apache/wicket/WicketTestCase.java  | 201 ------------------
 .../ajax/AjaxBehaviorAndMetaDataTest.java       |   2 +-
 .../wicket/ajax/AjaxBehaviorEnabledTest.java    |   2 +-
 .../wicket/ajax/AjaxCallbackFunctionTest.java   |   2 +-
 .../org/apache/wicket/ajax/AjaxChannelTest.java |   2 +-
 .../ajax/AjaxComponentVisibilityTest.java       |   2 +-
 .../wicket/ajax/AjaxEventBehaviorTest.java      |   2 +-
 .../wicket/ajax/AjaxHeaderContributionTest.java |   2 +-
 .../wicket/ajax/AjaxRequestHandlerTest.java     |   2 +-
 .../wicket/ajax/AjaxTimerBehaviorTest.java      |   2 +-
 .../apache/wicket/ajax/DomReadyOrderTest.java   |   2 +-
 .../ajax/GlobalUpdateAjaxAttributesTest.java    |   2 +-
 .../InternalErrorCallsAjaxOnFailureTest.java    |   2 +-
 ...FormChoiceComponentUpdatingBehaviorTest.java |   2 +-
 .../ajax/form/AjaxFormSubmitBehaviorTest.java   |   2 +-
 .../wicket/ajax/form/AjaxFormSubmitTest.java    |   2 +-
 .../ajax/form/OnChangeAjaxBehaviorTest.java     |   2 +-
 .../ajax/markup/html/AjaxFallbackLinkTest.java  |   2 +-
 .../ajax/markup/html/ajaxLink/AjaxLinkTest.java |   2 +-
 .../html/componentMap/SimpleTestPanelTest.java  |   2 +-
 .../ajax/markup/html/form/AjaxButtonTest.java   |   2 +-
 .../ComponentIsRenderedAllowedTest.java         |   2 +-
 .../behavior/ImmutableBehaviorIdsTest.java      |   2 +-
 .../wicket/behavior/SharedBehaviorTest.java     |   2 +-
 .../component/replacewith/ReplaceWithTest.java  |   2 +-
 .../ListenerInterfaceRequestHandlerTest.java    |   2 +-
 .../mapper/AbstractBookmarkableMapperTest.java  |   2 +-
 .../core/request/mapper/ResourceMapperTest.java |   2 +-
 .../checker/DifferentPageCheckerTest.java       |   2 +-
 .../checker/OrphanComponentCheckerTest.java     |   2 +-
 .../objects/checker/SessionCheckerTest.java     |   2 +-
 .../resource/ClassPathResourceFinderTest.java   |   2 +-
 .../ComponentRendererTest.java                  |   2 +-
 .../DontStoreNotRenderedPageTestCase.java       |   2 +-
 .../wicket/feedback/FeedbackRenderTest.java     |   2 +-
 .../InterceptDataCleanedAfterReadTest.java      |   2 +-
 .../ComponentTagAttributeEscapingTest.java      |   2 +-
 .../DefaultMarkupCacheKeyProviderTest.java      |   2 +-
 .../wicket/markup/HtmlProblemFinderTest.java    |   2 +-
 .../apache/wicket/markup/MarkupCacheTest.java   |   2 +-
 .../wicket/markup/MarkupFragmentTest.java       |   2 +-
 .../wicket/markup/MarkupInheritanceTest.java    |   2 +-
 .../apache/wicket/markup/MarkupParserTest.java  |   2 +-
 .../org/apache/wicket/markup/MarkupTest.java    |   2 +-
 .../wicket/markup/MarkupVariationTest.java      |   2 +-
 .../markup/RefreshingViewOnRemoveTest.java      |   2 +-
 .../wicket/markup/WicketNamespaceTest.java      |   2 +-
 .../wicket/markup/head/HeaderResponseTest.java  |   2 +-
 .../filter/FilteringHeaderResponseTest.java     |   2 +-
 .../markup/html/ComponentMarkupIdTest.java      |   3 +-
 .../html/DecoratingHeaderResponseTest.java      |   2 +-
 .../markup/html/HeaderContributorTest.java      |   2 +-
 .../wicket/markup/html/MarkupHeadFirstTest.java |   2 +-
 .../markup/html/PackageResourceGuardTest.java   |   2 +-
 .../wicket/markup/html/PackageResourceTest.java |   2 +-
 .../html/SecurePackageResourceGuardTest.java    |   2 +-
 .../html/TransparentWebMarkupContainerTest.java |   2 +-
 .../apache/wicket/markup/html/WebPageTest.java  |   2 +-
 .../wicket/markup/html/XmlDeclResponseTest.java |   2 +-
 .../AutocomponetsGenerationTest.java            |   2 +-
 .../html/autolink/AutoLinkInPanelsTest.java     |   2 +-
 .../markup/html/autolink/AutolinkTest.java      |   2 +-
 .../markup/html/basic/HomePageRedirectTest.java |   2 +-
 .../wicket/markup/html/basic/LabelTest.java     |   2 +-
 .../markup/html/basic/SimplePageTest.java       |   2 +-
 .../html/basic/SimpleResponsePageClassTest.java |   2 +-
 .../wicket/markup/html/basic/XmlPageTest.java   |   2 +-
 .../markup/html/border/ComponentBorderTest.java |   2 +-
 .../html/debug/WicketComponentTreeTest.java     |   2 +-
 ...tComponentConvertEmptyStringsToNullTest.java |   2 +-
 .../html/form/AutoFormLabelPickupTest.java      |   2 +-
 .../wicket/markup/html/form/AutoLabelTest.java  |   2 +-
 .../html/form/AutoLabelWithContentTest.java     |   2 +-
 .../html/form/AutoLabelWithinEnclosureTest.java |   2 +-
 .../wicket/markup/html/form/ButtonTest.java     |   2 +-
 .../html/form/CheckBoxMultipleChoiceTest.java   |   2 +-
 .../wicket/markup/html/form/CheckGroupTest.java |   2 +-
 .../html/form/CollectionFormComponentTest.java  |   2 +-
 .../form/DisabledItemRetainingCheckBoxTest.java |   2 +-
 .../markup/html/form/DropDownChoiceTest.java    |   2 +-
 .../form/FormComponentPanelProcessingTest.java  |   2 +-
 .../markup/html/form/FormComponentTest.java     |   3 +-
 .../form/FormParentDisabledRawInputTest.java    |   2 +-
 .../markup/html/form/FormSubmitOrderTest.java   |   2 +-
 .../wicket/markup/html/form/FormSubmitTest.java |   2 +-
 .../wicket/markup/html/form/FormTest.java       |   2 +-
 ...FormValidationDisabledFormComponentTest.java |   2 +-
 .../html/form/FormWithMultipleButtonsTest.java  |   2 +-
 .../html/form/ListMultipleChoiceTest.java       |   2 +-
 .../html/form/LocalizedErrorMessageTest.java    |   2 +-
 .../markup/html/form/NestedFormSubmitTest.java  |   2 +-
 .../markup/html/form/NestedFormsTest.java       |   2 +-
 .../markup/html/form/NumberTextFieldTest.java   |   2 +-
 .../html/form/OnValidateModelObjectsTest.java   |   2 +-
 .../html/form/PrimitiveTypeRequiredTest.java    |   2 +-
 .../markup/html/form/RadioChoiceTest.java       |   2 +-
 .../wicket/markup/html/form/RadioGroupTest.java |   2 +-
 .../markup/html/form/TestFormHasError.java      |   2 +-
 .../wicket/markup/html/form/TextAreaTest.java   |   2 +-
 .../wicket/markup/html/form/TextFieldTest.java  |   2 +-
 .../html/form/ValidatorPropertiesTest.java      |   2 +-
 .../markup/html/form/border/TestHomePage.java   |   2 +-
 .../html/form/border/TestHomePage_2134.java     |   2 +-
 .../markup/html/form/encryption/CryptTest.java  |   2 +-
 .../html/form/feedback/FormFeedbackTest.java    |   2 +-
 .../form/formComponentPanel/SimplePageTest.java |   2 +-
 .../html/form/imagebutton/ImageButtonTest.java  |   2 +-
 .../imagebutton/InvalidImageButtonTest.java     |   2 +-
 .../markup/html/form/login/InterceptTest.java   |   2 +-
 .../html/form/panelBorder/TestHomePage.java     |   2 +-
 .../form/panelBorder/TestHomePage_2134.java     |   2 +-
 .../html/form/submitlink/TestHomePage.java      |   2 +-
 .../html/form/upload/FileUploadErrorTest.java   |   2 +-
 .../html/form/upload/FileUploadFieldTest.java   |   2 +-
 .../markup/html/form/upload/FileUploadTest.java |   2 +-
 .../form/upload/MultiFileUploadFieldTest.java   |   2 +-
 .../validation/FormValidatorBehaviorTest.java   |   2 +-
 .../html/form/validation/HomePageTest.java      |   2 +-
 .../innerfeedback/InnerFeedbackTest.java        |   2 +-
 .../markup/html/header/HeaderScopingTest.java   |   2 +-
 .../header/inheritance/InheritanceHeadTest.java |   2 +-
 .../markup/html/header/testing/HeaderTest.java  |   2 +-
 .../markup/html/header/testing2/HeaderTest.java |   2 +-
 .../markup/html/header/testing3/HeaderTest.java |   2 +-
 .../header/threelayers/InheritanceHeadTest.java |   2 +-
 .../threelayers2/InheritanceHeadTest.java       |   2 +-
 .../markup/html/image/AjaxUpdatedImageTest.java |   2 +-
 .../wicket/markup/html/image/ImageTest.java     |   2 +-
 .../markup/html/image/InlineImageTest.java      |   2 +-
 .../markup/html/image/InvalidImageTest.java     |   2 +-
 .../markup/html/image/NonCachingImageTest.java  |   2 +-
 .../markup/html/image/ResponsiveImageTest.java  |   2 +-
 .../markup/html/internal/AjaxEnclosureTest.java |   2 +-
 .../markup/html/internal/EnclosureTest.java     |   2 +-
 .../html/internal/HtmlHeaderContainerTest.java  |   2 +-
 .../html/internal/InlineEnclosureTest.java      |   2 +-
 .../markup/html/internal/TogglePageTest.java    |   2 +-
 .../HtmlHeaderItemsContainerTest.java           |   2 +-
 .../markup/html/link/AbstractLinkTest.java      |   2 +-
 .../wicket/markup/html/link/AutolinkTest.java   |   2 +-
 .../link/BookmarkableHomePageLinksTest.java     |   2 +-
 .../html/link/BookmarkablePageLinkTest.java     |   2 +-
 .../html/link/ClientSideImageMapTest.java       |   2 +-
 .../markup/html/link/DownloadLinkTest.java      |   2 +-
 .../markup/html/link/ExternalLinkTest.java      |   2 +-
 .../wicket/markup/html/link/HrefTest.java       |   2 +-
 .../markup/html/link/MountedPageLinkTest.java   |   2 +-
 .../html/link/submitLink/FormPage2Test.java     |   3 +-
 .../html/link/submitLink/FormPageTest.java      |   3 +-
 .../list/IncrementalTableNavigationTest.java    |   2 +-
 .../wicket/markup/html/list/ListViewTest.java   |  19 +-
 .../html/list/PagedTableNavigatorTest.java      |   2 +-
 ...agedTableNavigatorWithLabelProviderTest.java |   2 +-
 .../list/PagedTableNavigatorWithMarginTest.java |   2 +-
 .../wicket/markup/html/list/PagedTableTest.java |   2 +-
 .../markup/html/list/SimpleTableTest.java       |   2 +-
 .../wicket/markup/html/list/TableTest.java      |   2 +-
 .../markup/html/markupId/TestHomePage.java      |   2 +-
 .../wicket/markup/html/media/MediaTagsTest.java |   2 +-
 .../paging/AbstractPagingNavigationTest.java    |   2 +-
 .../wicket/markup/html/page/TestHomePage.java   |   2 +-
 .../markup/html/panel/FeedbackPanelTest.java    |   2 +-
 .../wicket/markup/html/panel/FragmentTest.java  |   2 +-
 .../wicket/markup/html/panel/PanelTest.java     |   2 +-
 .../markup/html/tags/InputTagNotClosedTest.java |   2 +-
 .../OutputTransformerContainerTest.java         |   2 +-
 .../wicket/markup/parser/MergedMarkupTest.java  |   2 +-
 .../parser/RelativePathPrefixHandlerTest.java   |   2 +-
 .../wicket/markup/parser/TestHomePage.java      |   2 +-
 .../parser/filter/DoubleHeaderPartPageTest.java |   2 +-
 .../markup/parser/filter/HeaderSectionTest.java |   2 +-
 .../markup/parser/filter/HtmlHandlerTest.java   |   2 +-
 .../filter/HtmlHeaderSectionHandlerTest.java    |   2 +-
 .../parser/filter/OpenCloseTagExpanderTest.java |   2 +-
 .../filter/StyleAndScriptIdentifierTest.java    |   2 +-
 .../ChildFirstHeaderRenderStrategyTest.java     |   2 +-
 .../wicket/markup/resolver/TestHomePage.java    |   2 +-
 .../resolver/WicketContainerResolverTest.java   |   2 +-
 .../resolver/WicketMessageResolverTest.java     |   2 +-
 .../border/WicketMessageResolverTest.java       |   2 +-
 .../AutoLinkResolveInParentsMarkupTest.java     |   2 +-
 .../markup/resolver/issue3559/MyTest.java       |   2 +-
 .../resolver/issue5569/Issue5569Test.java       |   2 +-
 .../AbstractTransformerBehaviorTest.java        |   2 +-
 .../markupFragments/MarkupFragmentTest.java     |  16 +-
 .../wicket/model/CompoundPropertyModelTest.java |   2 +-
 .../org/apache/wicket/model/DetachableTest.java |   2 +-
 .../apache/wicket/model/InheritedModelTest.java |   2 +-
 .../model/LoadableDetachableModelTest.java      |   2 +-
 .../apache/wicket/model/ModelToStringTest.java  |   2 +-
 .../apache/wicket/model/PropertyModelTest.java  |   2 +-
 .../apache/wicket/model/ResourceModelTest.java  |   2 +-
 .../wicket/model/StringResourceModelTest.java   |   2 +-
 .../org/apache/wicket/model/TestHomePage.java   |   2 +-
 .../wicket/noheadnobody/NoHeadNoBodyTest.java   |   2 +-
 .../PageExpirationRecoveryTest.java             |   2 +-
 .../memory/HttpSessionDataStoreTest.java        |   2 +-
 .../wicket/properties/PropertiesTest.java       |   2 +-
 .../http/AbstractRequestLoggerTest.java         |   2 +-
 .../protocol/http/BufferedWebResponseTest.java  |   2 +-
 .../CsrfPreventionRequestCycleListenerTest.java |   2 +-
 .../protocol/http/ModifyCookiePageTest.java     |   2 +-
 .../protocol/http/WebApplicationTest.java       |   3 +-
 .../http/WebResponseExceptionsTest.java         |   2 +-
 .../protocol/http/WicketTagPanelTest.java       |   2 +-
 .../http/mock/MockHttpServletRequestTest.java   |   2 +-
 .../CryptedUrlWebRequestCodingStrategyTest.java |   2 +-
 ...dRemoteAddressRequestWrapperFactoryTest.java |   2 +-
 .../http/servlet/WicketSessionFilterTest.java   |   2 +-
 .../servlet/XForwardedRequestWrapperTest.java   |   2 +-
 .../ComponentQueueingPerformanceTest.java       |   2 +-
 .../wicket/queueing/ComponentQueueingTest.java  |   2 +-
 ...eueingTransparentWebMarkupContainerTest.java |   2 +-
 .../redirect/RestartWithMountedPageTest.java    |   2 +-
 .../redirect/abort/AbortExceptionTest.java      |   2 +-
 .../redirect/intercept/InterceptTest.java       |   2 +-
 .../MultiRequestCycleListenerCallOrderTest.java |   2 +-
 .../cycle/PageRequestHandlerTrackerTest.java    |   2 +-
 .../request/handler/PageProviderTest.java       |   2 +-
 .../SkipRenderWithSetResponsePageTest.java      |   2 +-
 ...elessPageManipulatingPageParametersTest.java |   2 +-
 .../resource/ResourceAuthorizationTest.java     |   2 +-
 .../request/resource/ByteArrayResourceTest.java |   2 +-
 .../ContextRelativeResourceReferenceTest.java   |   2 +-
 .../resource/CssPackageResourceTest.java        |   4 +-
 .../resource/DynamicImageResourceTest.java      |   2 +-
 .../resource/JavaScriptPackageResourceTest.java |   2 +-
 .../resource/LessResourceReferenceTest.java     |   2 +-
 .../MinifiedAwareResourceReferenceTest.java     |   2 +-
 .../resource/PackageResourceReferenceTest.java  |   2 +-
 .../request/resource/ResouceBundleTest.java     |   2 +-
 .../resource/ResourceReferenceRegistryTest.java |   2 +-
 .../resource/UrlResourceReferenceTest.java      |   2 +-
 .../ContextRelativeResourceCachingTest.java     |   2 +-
 .../wicket/resource/CssUrlReplacerTest.java     |   2 +-
 .../wicket/resource/ResourceUtilTest.java       |  21 +-
 .../TextTemplateResourceReferenceTest.java      |   2 +-
 .../UtfPropertiesFilePropertiesLoaderTest.java  |   2 +-
 .../resource/XmlFilePropertiesLoaderTest.java   |   2 +-
 .../ResourceAggregatorRenderTest.java           |   2 +-
 .../aggregator/ResourceAggregatorTest.java      |   2 +-
 .../resource/bundles/CompressBundlesTest.java   |   2 +-
 .../loader/ClassStringResourceLoaderTest.java   |   2 +-
 .../ComponentStringResourceLoaderTest.java      |   2 +-
 .../loader/PackageStringResourceLoaderTest.java |   2 +-
 .../ValidatorStringResourceLoaderTest.java      |   2 +-
 .../PreserveCookieForTheNextHandlerTest.java    |   2 +-
 .../response/filter/ResponseFilterTest.java     |   2 +-
 .../serialize/java/JavaSerializerTest.java      |   2 +-
 .../session/BindSessionOnRedirectTest.java      |   2 +-
 .../wicket/session/DefaultPageFactoryTest.java  |   2 +-
 .../wicket/settings/DebugSettingsTest.java      |   2 +-
 .../wicket/settings/ISecuritySettingsTest.java  |   2 +-
 .../def/SetCustomResourceSettingsTest.java      |   2 +-
 .../wicket/stateless/ImageStatelessTest.java    |   2 +-
 .../stateless/StatelessComponentTest.java       |   2 +-
 .../stateless/StatelessDynmicLinksTest.java     |   2 +-
 .../wicket/stateless/StatelessFormTest.java     |   2 +-
 .../wicket/stateless/StatelessFormUrlTest.java  |   2 +-
 .../wicket/stateless/TemporarySessionTest.java  |   2 +-
 .../pages/RefreshStatelessPageTest.java         |   2 +-
 .../stateless/pages/StatelessFormTest.java      |   2 +-
 .../wicket/util/cookies/CookieUtilsTest.java    |   2 +-
 ...PreserveRequestCookieAfterLinkClickTest.java |   2 +-
 .../util/cookies/SetCookieAndRedirectTest.java  |   2 +-
 .../iterator/AbstractHierarchyIteratorTest.java |   2 +-
 .../util/iterator/ComponentIteratorTest.java    |   2 +-
 .../wicket/util/lang/PropertyResolverTest.java  |   2 +-
 .../wicket/util/lang/WicketObjectsTest.java     |   2 +-
 .../apache/wicket/util/resource/PathTest.java   |   2 +-
 .../resource/ResourceStreamLocatorTest.java     |   2 +-
 .../locator/ResourceNameIteratorTest.java       |   2 +-
 .../util/tester/FormTesterSubmitLinkTest.java   |   1 -
 .../wicket/util/tester/FormTesterTest.java      |   1 -
 ...tartComponentInPageRedirectToRenderTest.java |   1 -
 .../WicketTesterClickExternalLinkTest.java      |   1 -
 .../util/tester/WicketTesterCookieTest.java     |   1 -
 .../WicketTesterLazyIsPageStatelessBase.java    |   1 -
 .../tester/WicketTesterSessionCreationTest.java |   1 -
 .../WicketTesterSessionInvalidateTest.java      |   1 -
 .../wicket/util/tester/WicketTesterTest.java    |   1 -
 .../apache/wicket/util/tester/apps_2/Test.java  |   2 +-
 .../util/tester/apps_3/FormTesterTest.java      |   2 +-
 .../util/tester/apps_4/FormTesterTest.java      |   2 +-
 .../util/tester/apps_5/AjaxLinkClickTest.java   |   2 +-
 .../tester/apps_5/AjaxSubmitLinkClickTest.java  |   2 +-
 .../wicket/util/tester/apps_7/TestHomePage.java |   2 +-
 .../validation/ValidatorBehaviorTest.java       |   2 +-
 .../java/org/apache/wicket/WicketTestCase.java  | 146 --------------
 .../extensions/yui/calendar/DatePickerTest.java |  10 +-
 .../yui/calendar/DateTimeFieldTest.java         |   2 +-
 .../org/apache/wicket/examples/images/Home.java |   2 +-
 .../main/webapp/META-INF/velocity.properties    | 168 +++++++++++++++
 wicket-examples/src/main/webapp/WEB-INF/web.xml |   5 +
 .../apache/wicket/examples/WicketTestCase.java  |  51 -----
 .../examples/ajax/prototype/AjaxTest.java       |   2 +-
 .../wicket/examples/compref/ComprefTest.java    |   2 +-
 .../wicket/examples/encodings/EncodingTest.java |   2 +-
 .../examples/forminput/FormInputTest.java       |   2 +-
 .../examples/guestbook/GuestbookTest.java       |   2 +-
 .../examples/hangman/WordGeneratorTest.java     |   2 +-
 .../examples/helloworld/HelloWorldTest.java     |   2 +-
 .../examples/linkomatic/LinkomaticTest.java     |   2 +-
 wicket-experimental/wicket-atmosphere/pom.xml   |   7 +-
 .../html/repeater/data/table/DataTable.java     |   3 +-
 .../java/org/apache/wicket/WicketTestCase.java  | 166 ---------------
 .../ajax/markup/html/AjaxEditableTest.java      |   2 +-
 .../html/autocomplete/AutoCompleteTest.java     |   2 +-
 .../html/AjaxLazyLoadPanelTesterTest.java       |   2 +-
 .../markup/html/form/DateTextFieldTest.java     |   2 +-
 .../markup/html/form/palette/PaletteTest.java   |   2 +-
 .../markup/html/form/select/SelectTest.java     |   2 +-
 .../resource/ThumbnailImageResourceTest.java    |   2 +-
 .../html/repeater/data/table/DataTableTest.java |   2 +-
 .../markup/html/tabs/TabbedPanelTest.java       |   2 +-
 .../html/tabs/TabbedPanelVisibilityTest.java    |   2 +-
 .../upload/UploadFormWithProgressBarTest.java   |   2 +-
 .../extensions/wizard/WizardModelTest.java      |   2 +-
 .../wicket/guice/GuiceFieldValueFactory.java    |  16 +-
 .../wicket/guice/GuiceProxyTargetLocator.java   |   6 +-
 .../wicket/guice/AbstractInjectorTest.java      |   2 +
 .../apache/wicket/guice/EvilTestService.java    |  36 ++++
 .../wicket/guice/JavaxInjectTestComponent.java  |  16 +-
 .../org/apache/wicket/guice/TestComponent.java  |   8 +
 .../wicket/guice/TestComponentInterface.java    |   2 +
 wicket-ioc/pom.xml                              |   5 +
 .../wicket/proxy/LazyInitProxyFactory.java      |  59 +++++-
 .../objenesis/ObjenesisCGLibInterceptor.java    |  39 ++++
 .../proxy/objenesis/ObjenesisProxyFactory.java  |  48 +++++
 .../objenesis/ObjenesisProxyReplacement.java    |  55 +++++
 .../ws/api/IWebSocketRequestHandler.java        |   5 +-
 .../ws/api/WebSocketRequestHandler.java         |  13 +-
 .../src/docs/guide/resources/resources_9.gdoc   |   2 +-
 .../java/org/apache/wicket/util/io/IOUtils.java |   1 -
 .../org/apache/wicket/util/lang/Objects.java    |   4 +-
 398 files changed, 1464 insertions(+), 1195 deletions(-)
----------------------------------------------------------------------



[05/14] wicket git commit: Update WicketJavaEEApplication.java

Posted by mg...@apache.org.
Update WicketJavaEEApplication.java

Just identation.

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/55ce3e59
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/55ce3e59
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/55ce3e59

Branch: refs/heads/master
Commit: 55ce3e59e78aa3255070d3e7417402a972a1ccbf
Parents: af093ab
Author: Felipe Campos de Almeida <fr...@gmail.com>
Authored: Tue Jun 23 15:18:44 2015 -0300
Committer: Felipe Campos de Almeida <fr...@gmail.com>
Committed: Tue Jun 23 15:18:44 2015 -0300

----------------------------------------------------------------------
 .../apache/wicket/arquillian/testing/WicketJavaEEApplication.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/55ce3e59/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java
index cd86e75..6dc0c93 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java
@@ -71,7 +71,7 @@ public class WicketJavaEEApplication extends WebApplication {
      */
     protected void initResourceFinder() {
     	getResourceSettings().getResourceFinders().add(new ResourceWebApplicationPath(WicketJavaEEApplication.class.getPackage().getName(), getServletContext()));
-	}
+    }
 
     
 }


[11/14] wicket git commit: WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Posted by mg...@apache.org.
WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Add wicket-arquillian test as a module in the parent Maven project
Improve the tests so they do not dump stacktraces in the log while finishing successfully


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e4ee5b72
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e4ee5b72
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e4ee5b72

Branch: refs/heads/master
Commit: e4ee5b72347d9bd10afced909b26b975330de3b9
Parents: d3765b1
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Jun 25 10:37:07 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jun 25 10:37:07 2015 +0300

----------------------------------------------------------------------
 pom.xml                                         |  1 +
 testing/wicket-arquillian/pom.xml               |  2 +-
 .../ArquillianContainerProvidedTest.java        | 83 ++++++++++----------
 3 files changed, 44 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/e4ee5b72/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index df52519..d5952ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -109,6 +109,7 @@
 		<module>archetypes/quickstart</module>
 		<module>testing/wicket-common-tests</module>
 		<module>testing/wicket-js-tests</module>
+		<module>testing/wicket-arquillian</module>
 		<module>wicket-native-websocket</module>
 		<module>wicket-bean-validation</module>
 		<module>wicket-cdi-1.1</module>

http://git-wip-us.apache.org/repos/asf/wicket/blob/e4ee5b72/testing/wicket-arquillian/pom.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml
index 37e558f..31afa72 100644
--- a/testing/wicket-arquillian/pom.xml
+++ b/testing/wicket-arquillian/pom.xml
@@ -268,7 +268,7 @@
 				<version>${version.wildfly.maven.plugin}</version>
 				<configuration>
 					<fileNames>
-						<fileName>target/${build.finalName}.war</fileName>
+						<fileName>target/${project.build.finalName}.war</fileName>
 					</fileNames>
 				</configuration>
 			</plugin>

http://git-wip-us.apache.org/repos/asf/wicket/blob/e4ee5b72/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
index e459348..24ab51a 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
@@ -49,14 +49,17 @@ import org.slf4j.LoggerFactory;
  */
 @RunWith(Arquillian.class)
 public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
-	
+
 	private static final Logger log = LoggerFactory.getLogger(ArquillianContainerProvidedTest.class);
 
+	private static final String RESOURCE_PAGES_INSERT_CONTACT_HTML_NOT_FOUND = "Resource /pages/InsertContact.html not found.";
+
 	/**
 	 * Using container's servlet context and/or filter provided configured in web.xml and using Arquillian.
 	 */
 	@Test
-	public void testFindResourcesServletContextFromContainer() {
+	public void testFindResourcesServletContextFromContainer() throws MalformedURLException
+	{
 		WebApplication webApplication =  useServletContextContainer();
 		setWicketTester(new WicketTester(webApplication, webApplication.getServletContext(), false));
 		findResourcesServletContext();
@@ -66,7 +69,8 @@ public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
 	 * Using container's servlet context and/or filter provided configured in web.xml and using Arquillian.
 	 */
 	@Test
-	public void testFindResourcesWebApplicationFromContainer() {
+	public void testFindResourcesWebApplicationFromContainer() throws MalformedURLException
+	{
 		WebApplication webApplication = useServletContextContainer();
 		setWicketTester(new WicketTester(webApplication, false));
 		findResourcesServletContext();
@@ -79,12 +83,12 @@ public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
 	public void testNewApplicationTryReuseServletContextFilter() {
 		try {
 			log.info("Trying to reuse container's ServletContext/Filter.");
-			setWicketTester(new WicketTester(new TestWicketJavaEEApplication(),false));
+			setWicketTester(new WicketTester(new TestWicketJavaEEApplication(), false));
+			fail("Should not be able to reuse the servlet context");
 		} catch (IllegalStateException e) {
-			assertEquals("servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor",e.getMessage());
-			log.error("Cannot use container's ServletContext.\n", e);
+			assertEquals("servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor", e.getMessage());
 		}
-		
+
 		assertNull(wicketTester);
 	}
 	
@@ -95,55 +99,52 @@ public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
 	public void testNullApplication() {
 		try {
 			log.info("Trying to use a null application.");
-			setWicketTester(new WicketTester(null,false));
+			setWicketTester(new WicketTester(null, false));
+			fail("WebApplication cannot be null");
 		} catch (AssertionError e) {
-			assertEquals("WebApplication cannot be null",e.getMessage());
-			log.error("WebApplication cannot be null\n", e);
-			assertNull(wicketTester);
+			assertEquals("WebApplication cannot be null", e.getMessage());
 		}
-		
+		assertNull(wicketTester);
 	}
 	
 	/**
 	 * Test with new application.
 	 */
 	@Test
-	public void testNewApplication() {
-		try {
-			setWicketTester(new WicketTester(new TestWicketJavaEEApplication()));
-			assertNotNull(getWicketTester().getApplication());
-			log.info("Using mock servletcontext.");
-			log.info("WebApplication MOCK after wicketTester Name: " + getWicketTester().getApplication().getName());
-			log.info("ServletContext MOCK after wicketTester Name: " + getWicketTester().getServletContext().getServletContextName());
-			log.info("Server info: " + getWicketTester().getServletContext().getServerInfo());
-			assertEquals("Wicket Mock Test Environment v1.0", getWicketTester().getServletContext().getServerInfo());
-		} catch (IllegalStateException e) {
-			// I don't know what or if could cause this.
-			fail("Cannot use a mock ServletContext.");
-		}
-		
+	public void testNewApplication() throws MalformedURLException
+	{
+		setWicketTester(new WicketTester(new TestWicketJavaEEApplication()));
+		assertNotNull(getWicketTester().getApplication());
+		log.info("Using mock servletcontext.");
+		log.info("WebApplication MOCK after wicketTester Name: " + getWicketTester().getApplication().getName());
+		log.info("ServletContext MOCK after wicketTester Name: " + getWicketTester().getServletContext().getServletContextName());
+		log.info("Server info: " + getWicketTester().getServletContext().getServerInfo());
+		assertEquals("Wicket Mock Test Environment v1.0", getWicketTester().getServletContext().getServerInfo());
+
 		// USING MOCK.
-		findResourcesServletContext();
+		try
+		{
+			findResourcesServletContext();
+			fail("Should not be able to find '/pages/InsertContact.html' in the mocked servlet context");
+		}
+		catch (IllegalStateException isx)
+		{
+			assertEquals(RESOURCE_PAGES_INSERT_CONTACT_HTML_NOT_FOUND, isx.getMessage());
+		}
 	}
 
 	/**
 	 * Look for resources (like html, js, css, img, etc).
-	 * 
-	 * @param servletContext
 	 */
-	private void findResourcesServletContext() {
-		try {
-			// Doing the same thing that ResourceWebApplicationPath does.
-			URL resource = getWicketTester().getServletContext().getResource("/pages/InsertContact.html");
-			if(resource == null) {
-				throw new MalformedURLException("Resource /pages/InsertContact.html not found.");
-			}
-			log.info("Resource found " + resource.getFile());
-			assertTrue(resource.getFile().contains("/pages/InsertContact.html"));
-		} catch (Exception e) {
-			assertEquals("Resource /pages/InsertContact.html not found.", e.getMessage());
-			log.error("Resource cannot be found.", e);
+	private void findResourcesServletContext() throws MalformedURLException
+	{
+		// Doing the same thing that ResourceWebApplicationPath does.
+		URL resource = getWicketTester().getServletContext().getResource("/pages/InsertContact.html");
+		if (resource == null) {
+			throw new IllegalStateException(RESOURCE_PAGES_INSERT_CONTACT_HTML_NOT_FOUND);
 		}
+		log.info("Resource found " + resource.getFile());
+		assertTrue(resource.getFile().contains("/pages/InsertContact.html"));
 	}
 
 }


[06/14] wicket git commit: Update ResourceWebApplicationPath.java

Posted by mg...@apache.org.
Update ResourceWebApplicationPath.java

Added a comment.

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/42e92314
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/42e92314
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/42e92314

Branch: refs/heads/master
Commit: 42e92314f5f4a12adcdcec8cdec33b132d5651e7
Parents: 55ce3e5
Author: Felipe Campos de Almeida <fr...@gmail.com>
Authored: Tue Jun 23 15:22:14 2015 -0300
Committer: Felipe Campos de Almeida <fr...@gmail.com>
Committed: Tue Jun 23 15:22:14 2015 -0300

----------------------------------------------------------------------
 .../arquillian/testing/util/ResourceWebApplicationPath.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/42e92314/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
index e936f79..292c771 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
@@ -40,7 +40,8 @@ public final class ResourceWebApplicationPath implements IResourceFinder
 
 	/** The web apps servlet context */
 	private final ServletContext servletContext;
-
+	
+	/** basePath of the project org/apache/wicket/arquillian/testing **/
 	private String basePath;
 
 	/**


[04/14] wicket git commit: Changes required to merge. Tests are now organized and added one more as an functional example. Added the patch on BaseWicketTester and WicketTester.

Posted by mg...@apache.org.
Changes required to merge.
Tests are now organized and added one more as an functional example.
Added the patch on BaseWicketTester and WicketTester.

Signed-off-by: Felipe C. <fr...@gmail.com>

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/af093ab1
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/af093ab1
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/af093ab1

Branch: refs/heads/master
Commit: af093ab1db443077c38fe316903e5b00b9cc9384
Parents: 1fd7934
Author: Felipe C. <fr...@gmail.com>
Authored: Tue Jun 23 15:08:57 2015 -0300
Committer: Felipe C. <fr...@gmail.com>
Committed: Tue Jun 23 15:08:57 2015 -0300

----------------------------------------------------------------------
 testing/wicket-arquillian/README.md             |   4 +-
 testing/wicket-arquillian/pom.xml               | 169 +++++++--------
 .../testing/WicketJavaEEApplication.java        |  77 +++++++
 .../arquillian/testing/dao/ContactDao.java      |  61 ++++++
 .../arquillian/testing/dao/ContactDaoBean.java  |  69 +++++++
 .../arquillian/testing/model/Contact.java       | 109 ++++++++++
 .../arquillian/testing/pages/InsertContact.java |  82 ++++++++
 .../arquillian/testing/pages/ListContacts.java  |  70 +++++++
 .../util/ResourceWebApplicationPath.java        |  92 +++++++++
 .../wicketWar/WicketJavaEEApplication.java      |  70 -------
 .../quickstarts/wicketWar/dao/ContactDao.java   |  61 ------
 .../wicketWar/dao/ContactDaoBean.java           |  69 -------
 .../as/quickstarts/wicketWar/model/Contact.java | 104 ----------
 .../wicketWar/pages/InsertContact.java          |  82 --------
 .../wicketWar/pages/ListContacts.java           |  70 -------
 .../util/ResourceWebApplicationPath.java        |  98 ---------
 .../src/main/resources/META-INF/persistence.xml |   7 +-
 .../src/main/webapp/WEB-INF/faces-config.xml    |   9 -
 .../src/main/webapp/WEB-INF/web.xml             |  10 +-
 .../WEB-INF/wicket-arquillian-testing-ds.xml    |  37 ++++
 .../webapp/WEB-INF/wicket-quickstart-ds.xml     |  37 ----
 .../testing/TestWicketJavaEEApplication.java    |  35 ++++
 .../deployment/AbstractDeploymentTest.java      | 145 +++++++++++++
 .../testing/pages/InsertContactTest.java        | 115 +++++++++++
 .../ArquillianContainerProvidedTest.java        | 149 +++++++++++++
 .../wicketWar/TestWicketJavaEEApplication.java  |  36 ----
 .../wicketWar/pages/InsertContactTest.java      | 207 -------------------
 .../src/test/resources/arquillian.xml           |   4 +-
 .../src/test/webapp/WEB-INF/web.xml             |   4 +-
 .../wicket/util/tester/BaseWicketTester.java    |  84 ++++++--
 .../apache/wicket/util/tester/WicketTester.java |  30 ++-
 31 files changed, 1219 insertions(+), 977 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/README.md
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/README.md b/testing/wicket-arquillian/README.md
index 6e17c0b..b3ca219 100644
--- a/testing/wicket-arquillian/README.md
+++ b/testing/wicket-arquillian/README.md
@@ -3,14 +3,14 @@ wicket-war: Wicket Framework used in a WAR.
 Author: Ondrej Zizka <oz...@redhat.com>
 Level: Intermediate
 Technologies: Apache Wicket, JPA
-Summary: Demonstrates how to use the Wicket Framework 1.5 with the JBoss server using the Wicket-Stuff Java EE integration packaged as a WAR
+Summary: Demonstrates how to use the Wicket Framework 7.x with the JBoss server using the Wicket-Stuff Java EE integration packaged as a WAR
 Target Project: WildFly
 Source: <https://github.com/wildfly/quickstart/>
 
 What is it?
 -----------
 
-This is an example of how to use Wicket Framework 1.5 with WildFly, leveraging features of Java EE 7, using the Wicket-Stuff Java EE integration.
+This is an example of how to use Wicket Framework 7.x with WildFly, leveraging features of Java EE 6, using the CDI Java EE integration.
 
 Features used:
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/pom.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml
index 0c8d4fc..91b5f23 100644
--- a/testing/wicket-arquillian/pom.xml
+++ b/testing/wicket-arquillian/pom.xml
@@ -1,24 +1,35 @@
 <?xml version="1.0"?>
-<!-- JBoss, Home of Professional Open Source Copyright 2013, Red Hat, Inc. 
-	and/or its affiliates, and individual contributors by the @authors tag. See 
-	the copyright.txt in the distribution for a full listing of individual contributors. 
-	Licensed 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. -->
+<!--
+   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.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
-
-	<groupId>org.wildfly.quickstarts</groupId>
-	<artifactId>wildfly-arquillian-wicket-war</artifactId>
-	<version>8.0.0-SNAPSHOT</version>
+	
+	<parent>
+		<groupId>org.apache.wicket</groupId>
+		<artifactId>wicket-parent</artifactId>
+		<version>7.0.0-SNAPSHOT</version>
+		<relativePath>../../pom.xml</relativePath>
+	</parent>
+	
+	<artifactId>wicket-arquillian-testing</artifactId>
 	<packaging>war</packaging>
 
-	<name>WildFly Quickstarts: Wicket: WAR</name>
+	<name>Wicket Arquillian Testing with Wildfly Java EE 6 Managed and Unpacked :: WAR</name>
 	<licenses>
 		<license>
 			<name>Apache License, Version 2.0</name>
@@ -28,57 +39,40 @@
 	</licenses>
 
 	<description>
-        A sample JAVA EE 6 project demonstrating how to use Wicket Framework with JBoss WildFly.
+        A sample JAVA EE 6 project demonstrating how to use Arquillian with Wicket Framework deployed on JBoss WildFly managed downloaded from maven repository (NEXUS for example) and unpacked with dependency plugin.
         WAR version (everything in a single .war file).
     </description>
 
 
 	<properties>
-		<!-- Explicitly declaring the source encoding eliminates the following 
-			message: -->
-		<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
-			resources, i.e. build is platform dependent! -->
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
-		<!-- JBoss dependency versions -->
-
+		<!-- Wildfly dependency versions -->
 		<version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin>
+		<version.wildfly_8>8.1.0.Final</version.wildfly_8>
+		
+		<!-- Java EE 6 SPEC JBoss -->
+		<version.jboss.spec.javaee.6.0>3.0.3.Final</version.jboss.spec.javaee.6.0>
 
-		<version.jboss.spec.javaee.7.0>3.0.2.Final</version.jboss.spec.javaee.7.0>
-
-
-		<!-- Other dependency versions -->
-		<version.org.apache.wicket>1.5.5</version.org.apache.wicket>
-		<version.net.ftlines.wicket-cdi>1.2</version.net.ftlines.wicket-cdi>
-
-		<!-- other plugin versions -->
-		<version.compiler.plugin>3.1</version.compiler.plugin>
-		<version.war.plugin>2.1.1</version.war.plugin>
-
-		<!-- maven-compiler-plugin -->
-		<maven.compiler.target>1.7</maven.compiler.target>
-		<maven.compiler.source>1.7</maven.compiler.source>
-
+		<!-- ShrinkWrap Resolvers Maven -->
 		<version.shrinkwrap.resolvers>2.1.1</version.shrinkwrap.resolvers>
+		
+		<!-- Arquillian -->
 		<version.arquillian_core>1.0.3.Final</version.arquillian_core>
-		<version.jbossas_7>8.1.0.Final</version.jbossas_7>
-		<version.junit>4.8.1</version.junit>
 	</properties>
 
 	<dependencyManagement>
 		<dependencies>
-			<!-- JBoss distributes a complete set of Java EE 7 APIs including a Bill 
+			<!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill 
 				of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
 				of artifacts. We use this here so that we always get the correct versions 
-				of artifacts. Here we use the jboss-javaee-7.0-with-tools stack (you can 
-				read this as the JBoss stack of the Java EE 7 APIs, with some extras tools 
-				for your project, such as Arquillian for testing) and the jboss-javaee-7.0-with-hibernate 
-				stack you can read this as the JBoss stack of the Java EE 7 APIs, with extras 
+				of artifacts. Here we use the jboss-javaee-6.0-with-tools stack (you can 
+				read this as the JBoss stack of the Java EE 6 APIs, with some extras tools 
+				for your project, such as Arquillian for testing) and the jboss-javaee-6.0-with-hibernate 
+				stack you can read this as the JBoss stack of the Java EE 6 APIs, with extras 
 				from the Hibernate family of projects) -->
 			<dependency>
 				<groupId>org.jboss.spec</groupId>
 				<artifactId>jboss-javaee-6.0</artifactId>
-				<version>${version.jboss.spec.javaee.7.0}</version>
+				<version>${version.jboss.spec.javaee.6.0}</version>
 				<type>pom</type>
 				<scope>import</scope>
 			</dependency>
@@ -87,14 +81,14 @@
 			<dependency>
 				<groupId>org.apache.wicket</groupId>
 				<artifactId>wicket-core</artifactId>
-				<version>${version.org.apache.wicket}</version>
+				<version>${project.version}</version>
 			</dependency>
 
 			<!-- Wicket Java EE integration. -->
 			<dependency>
-				<groupId>net.ftlines.wicket-cdi</groupId>
+				<groupId>org.apache.wicket</groupId>
 				<artifactId>wicket-cdi</artifactId>
-				<version>${version.net.ftlines.wicket-cdi}</version>
+				<version>${project.version}</version>
 			</dependency>
 
 			<!-- Arquillian -->
@@ -126,6 +120,11 @@
 				<version>${version.arquillian_core}</version>
 				<classifier>tests</classifier>
 			</dependency>
+			<dependency>
+				<groupId>org.wildfly</groupId>
+				<artifactId>wildfly-arquillian-container-managed</artifactId>
+				<version>${version.wildfly_8}</version>
+			</dependency>
 		</dependencies>
 	</dependencyManagement>
 
@@ -176,7 +175,7 @@
 
 		<!-- Wicket CDI integration. -->
 		<dependency>
-			<groupId>net.ftlines.wicket-cdi</groupId>
+			<groupId>org.apache.wicket</groupId>
 			<artifactId>wicket-cdi</artifactId>
 		</dependency>
 
@@ -184,22 +183,11 @@
 		<dependency>
 			<groupId>org.jboss.shrinkwrap.resolver</groupId>
 			<artifactId>shrinkwrap-resolver-depchain</artifactId>
-			<!-- <version>${version.shrinkwrap.resolvers}</version> -->
 			<scope>test</scope>
 			<type>pom</type>
 		</dependency>
-		<!-- <dependency> <groupId>org.jboss.shrinkwrap</groupId> <artifactId>shrinkwrap-api</artifactId> 
-			<scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap</groupId> 
-			<artifactId>shrinkwrap-spi</artifactId> <scope>test</scope> </dependency> 
-			<dependency> <groupId>org.jboss.shrinkwrap</groupId> <artifactId>shrinkwrap-impl-base</artifactId> 
-			<scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> 
-			<artifactId>shrinkwrap-resolver-api</artifactId> <scope>test</scope> </dependency> 
-			<dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-api-maven</artifactId> 
-			<scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> 
-			<artifactId>shrinkwrap-resolver-impl-maven</artifactId> <scope>test</scope> 
-			</dependency> -->
 
-		<!-- Arquillian Test Harness -->
+		<!-- Arquillian -->
 		<dependency>
 			<groupId>org.jboss.arquillian.core</groupId>
 			<artifactId>arquillian-core-api</artifactId>
@@ -225,7 +213,6 @@
 			<artifactId>arquillian-container-test-spi</artifactId>
 			<scope>test</scope>
 		</dependency>
-
 		<dependency>
 			<groupId>org.jboss.arquillian.junit</groupId>
 			<artifactId>arquillian-junit-container</artifactId>
@@ -243,41 +230,36 @@
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
-
 		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${version.junit}</version>
+			<groupId>org.jboss.arquillian.protocol</groupId>
+			<artifactId>arquillian-protocol-servlet</artifactId>
 			<scope>test</scope>
 		</dependency>
+		
+		<!-- JUnit -->
 		<dependency>
-			<groupId>org.jboss.arquillian.protocol</groupId>
-			<artifactId>arquillian-protocol-servlet</artifactId>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
 			<scope>test</scope>
 		</dependency>
+		
+		<!-- Wildfly managed. -->
 		<dependency>
 			<groupId>org.wildfly</groupId>
 			<artifactId>wildfly-arquillian-container-managed</artifactId>
-			<version>${version.jbossas_7}</version>
 			<scope>test</scope>
 		</dependency>
 	</dependencies>
 
 	<build>
-		<!-- Set the name of the war, used as the context root when the app is 
-			deployed. -->
+		<testResources>
+			<testResource>
+				<directory>src/test/resources</directory>
+				<filtering>true</filtering>
+			</testResource>
+		</testResources>
+		<!-- Set the name of the war, used as the context root when the app is deployed. -->
 		<finalName>${project.artifactId}</finalName>
-
-		<!-- Allow packaging the html files alongside the java sources -->
-		<!-- <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> 
-			</resource> <resource> <directory>src/main/java</directory> <filtering>true</filtering> 
-			<includes> <include>**</include> </includes> <excludes> <exclude>**/*.java</exclude> 
-			</excludes> </resource> </resources> -->
-		<!-- <testResources> <testResource> <directory>src/test/resources</directory> 
-			<filtering>true</filtering> </testResource> <testResource> <directory>src/test/java</directory> 
-			<filtering>true</filtering> <includes> <include>**</include> </includes> 
-			<excludes> <exclude>**/*.java</exclude> </excludes> </testResource> </testResources> -->
-
 		<plugins>
 			<!-- WildFly plugin to deploy the war -->
 			<plugin>
@@ -290,32 +272,21 @@
 					</fileNames>
 				</configuration>
 			</plugin>
-			<!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation 
-				processors -->
-			<plugin>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>${version.compiler.plugin}</version>
-				<configuration>
-					<source>${maven.compiler.source}</source>
-					<target>${maven.compiler.target}</target>
-				</configuration>
-			</plugin>
-
 			<plugin>
 				<artifactId>maven-surefire-plugin</artifactId>
-				<version>2.12.4</version>
 				<configuration>
 					<environmentVariables>
-						<JBOSS_HOME>${project.build.directory}/wildfly-${version.jbossas_7}</JBOSS_HOME>
+						<JBOSS_HOME>${project.build.directory}/wildfly-${version.wildfly_8}</JBOSS_HOME>
 					</environmentVariables>
 					<systemProperties>
-						<jboss.version>${version.jbossas_7}</jboss.version>
+						<jboss.version>${version.wildfly_8}</jboss.version>
 					</systemProperties>
 				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-dependency-plugin</artifactId>
+				<version>2.10</version>
 				<executions>
 					<execution>
 						<id>unpack</id>
@@ -328,7 +299,7 @@
 								<artifactItem>
 									<groupId>org.wildfly</groupId>
 									<artifactId>wildfly-dist</artifactId>
-									<version>${version.jbossas_7}</version>
+									<version>${version.wildfly_8}</version>
 									<type>zip</type>
 									<overWrite>true</overWrite>
 									<outputDirectory>${project.build.directory}</outputDirectory>

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java
new file mode 100644
index 0000000..cd86e75
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/WicketJavaEEApplication.java
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+package org.apache.wicket.arquillian.testing;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.arquillian.testing.pages.InsertContact;
+import org.apache.wicket.arquillian.testing.pages.ListContacts;
+import org.apache.wicket.arquillian.testing.util.ResourceWebApplicationPath;
+import org.apache.wicket.cdi.CdiConfiguration;
+import org.apache.wicket.cdi.ConversationPropagation;
+import org.apache.wicket.protocol.http.WebApplication;
+
+
+/**
+ * Modified to create test with Arquillian looking for resources in an ServletContext.
+ * 
+ * @author Ondrej Zizka
+ * @author felipecalmeida
+ * 			Modified to create test with Arquillian looking for resources in an ServletContext.
+ * @since 06/23/2015
+ * 
+ */
+public class WicketJavaEEApplication extends WebApplication {
+
+    @Override
+    public Class<? extends Page> getHomePage() {
+        return ListContacts.class;
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        // Enable CDI
+        BeanManager bm;
+        try {
+            bm = (BeanManager) new InitialContext().lookup("java:comp/BeanManager");
+        } catch (NamingException e) {
+            throw new IllegalStateException("Unable to obtain CDI BeanManager", e);
+        }
+
+        initResourceFinder();
+        
+        // Configure CDI, disabling Conversations as we aren't using them
+        new CdiConfiguration(bm).setPropagation(ConversationPropagation.NONE).configure(this);
+        
+        // Mount the InsertContact page at /insert
+        mountPage("/insert", InsertContact.class);
+    }
+    
+    /**
+     * Adding resource finder as we need (container web or during the phase test that reuses the container web).
+     */
+    protected void initResourceFinder() {
+    	getResourceSettings().getResourceFinders().add(new ResourceWebApplicationPath(WicketJavaEEApplication.class.getPackage().getName(), getServletContext()));
+	}
+
+    
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java
new file mode 100644
index 0000000..3615244
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.apache.wicket.arquillian.testing.dao;
+
+import java.util.List;
+
+import javax.ejb.Local;
+
+import org.apache.wicket.arquillian.testing.model.Contact;
+
+/**
+ *
+ * @author Filippo Diotalevi
+ */
+@Local
+public interface ContactDao {
+
+    /**
+     * Returns the currently available contacts.
+     *
+     * @return every contact in the database
+     */
+    public List<Contact> getContacts();
+
+    /**
+     * Returns a specific Contact from DB.
+     *
+     * @param id The Id for the Contact
+     * @return The specified Contact object
+     */
+    public Contact getContact(Long id);
+
+    /**
+     * Persist a new Contact in the DB.
+     *
+     * @param name The name of the new Contact
+     * @param email The e-mail address of the new Contact
+     */
+    public void addContact(String name, String email);
+
+    /**
+     * Removes a specific item from the DB.
+     *
+     * @param modelObject The specific Contact object, which we wants to remove
+     */
+    public void remove(Contact modelObject);
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java
new file mode 100644
index 0000000..fb1cb08
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.apache.wicket.arquillian.testing.dao;
+
+import java.util.List;
+
+import javax.ejb.Stateless;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.apache.wicket.arquillian.testing.model.Contact;
+
+/**
+ * A bean which manages Contact entities.
+ */
+@Stateless
+public class ContactDaoBean implements ContactDao {
+
+    @PersistenceContext
+    private EntityManager em;
+
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<Contact> getContacts() {
+        return em.createQuery("SELECT c FROM Contact c").getResultList();
+    }
+
+    /**
+     * Get Contact by ID.
+     */
+    @Override
+    public Contact getContact(Long id) {
+        return em.find(Contact.class, id);
+    }
+
+    /**
+     * Add a new Contact.
+     */
+    @Override
+    public void addContact(String name, String email) {
+        em.merge(new Contact(null, name, email));
+    }
+
+    /**
+     * Remove a Contact.
+     */
+    @Override
+    public void remove(Contact modelObject) {
+        Contact managed = em.merge(modelObject);
+        em.remove(managed);
+        em.flush();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
new file mode 100644
index 0000000..947333b
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.apache.wicket.arquillian.testing.model;
+
+import static javax.persistence.GenerationType.IDENTITY;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+
+/**
+ *
+ * @author Filippo Diotalevi
+ */
+@SuppressWarnings("serial")
+@Entity
+public class Contact implements Serializable {
+
+    @Id
+    @GeneratedValue(strategy = IDENTITY)
+    private Long id;
+    private String name;
+    
+    @Column(unique=true)
+    private String email;
+
+    public Contact() {
+    }
+
+    public Contact(Long id, String name, String email) {
+        this.id = id;
+        this.name = name;
+        this.email = email;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((email == null) ? 0 : email.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Contact other = (Contact) obj;
+        if (email == null) {
+            if (other.email != null)
+                return false;
+        } else if (!email.equals(other.email))
+            return false;
+        return true;
+    }
+    
+    @Override
+    public String toString() {
+    	return "Name: " + name + " / E-mail: " + email;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
new file mode 100644
index 0000000..902b6d6
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.apache.wicket.arquillian.testing.pages;
+
+import javax.inject.Inject;
+
+import org.apache.wicket.arquillian.testing.dao.ContactDao;
+import org.apache.wicket.arquillian.testing.model.Contact;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.model.PropertyModel;
+
+/**
+ *
+ * @author Filippo Diotalevi
+ */
+@SuppressWarnings("serial")
+public class InsertContact extends WebPage {
+    
+    private Form<Contact> insertForm;
+    
+    private String name;
+    
+    private String email;
+    
+    @Inject
+    private ContactDao contactDao;
+
+    
+    public InsertContact() {
+        add(new FeedbackPanel("feedback"));
+
+        insertForm = new Form<Contact>("insertForm") {
+
+            @Override
+            protected void onSubmit() {
+                contactDao.addContact(name, email);
+                setResponsePage(ListContacts.class);
+            }
+        };
+
+        insertForm.add(new RequiredTextField<String>("name",
+                new PropertyModel<String>(this, "name")));
+        insertForm.add(new RequiredTextField<String>("email", new PropertyModel<String>(this,
+                "email")));
+        add(insertForm);
+    }
+
+    
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
new file mode 100644
index 0000000..4694438
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.
+ */
+package org.apache.wicket.arquillian.testing.pages;
+
+import javax.annotation.Resource;
+import javax.inject.Inject;
+
+import org.apache.wicket.arquillian.testing.dao.ContactDao;
+import org.apache.wicket.arquillian.testing.model.Contact;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+
+/**
+ * Dynamic behavior for the ListContact page
+ * 
+ * @author Filippo Diotalevi
+ */
+@SuppressWarnings("serial")
+public class ListContacts extends WebPage {
+
+    // Inject the ContactDao using @Inject
+    @Inject
+    private ContactDao contactDao;
+
+    @Resource(name = "welcomeMessage")
+    private String welcome;
+
+    // Set up the dynamic behavior for the page, widgets bound by id
+    public ListContacts() {
+
+        // Add the dynamic welcome message, specified in web.xml
+        add(new Label("welcomeMessage", welcome));
+        add(new ListView<Contact>("contacts", contactDao.getContacts()) {
+
+            // Populate the table of contacts
+            @Override
+            protected void populateItem(final ListItem<Contact> item) {
+                Contact contact = item.getModelObject();
+                item.add(new Label("name", contact.getName()));
+                item.add(new Label("email", contact.getEmail()));
+                item.add(new Link<Contact>("delete", item.getModel()) {
+
+                    @Override
+                    public void onClick() {
+                        contactDao.remove(item.getModelObject());
+                        setResponsePage(ListContacts.class);
+                    }
+                });
+            }
+        });
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
new file mode 100644
index 0000000..e936f79
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+package org.apache.wicket.arquillian.testing.util;
+
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+
+import org.apache.wicket.core.util.resource.UrlResourceStream;
+import org.apache.wicket.util.file.IResourceFinder;
+import org.apache.wicket.util.resource.IResourceStream;
+
+
+/**
+ * Maintain a list of paths which might either be ordinary folders of the filesystem or relative
+ * paths to the web application's servlet context.
+ * 
+ * @author Johan Compagner
+ * 
+ * @author felipecalmeida
+ * 		Modified to look inside servletContext and same package as Application.
+ */
+public final class ResourceWebApplicationPath implements IResourceFinder
+{
+	private static final String WEB_INF = "WEB-INF/";
+
+	/** The web apps servlet context */
+	private final ServletContext servletContext;
+
+	private String basePath;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param servletContext
+	 *            The webapplication context where the resources must be loaded from
+	 */
+	public ResourceWebApplicationPath(String basePath,final ServletContext servletContext)
+	{
+		this.basePath = basePath.replaceAll("\\.", "\\/");
+		this.servletContext = servletContext;
+	}
+
+	/**
+	 * 
+	 * @see org.apache.wicket.util.file.IResourceFinder#find(Class, String)
+	 */
+	public IResourceStream find(final Class<?> clazz, final String pathname)
+	{
+
+		if (pathname.startsWith(WEB_INF) == false)
+		{
+			try
+			{
+				final URL url = servletContext.getResource(pathname.replaceFirst(basePath, ""));
+				if (url != null)
+				{
+					return new UrlResourceStream(url);
+				}
+			}
+			catch (Exception ex)
+			{
+				// ignore, file couldn't be found
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString()
+	{
+		return "[webapppath: " + basePath + "]";
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java
deleted file mode 100644
index a91c104..0000000
--- a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/WicketJavaEEApplication.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed 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.
- */
-package org.jboss.as.quickstarts.wicketWar;
-
-import static net.ftlines.wicket.cdi.ConversationPropagation.NONE;
-
-import javax.enterprise.inject.spi.BeanManager;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import net.ftlines.wicket.cdi.CdiConfiguration;
-
-import org.apache.wicket.Page;
-import org.apache.wicket.protocol.http.WebApplication;
-import org.apache.wicket.util.file.IResourceFinder;
-import org.jboss.as.quickstarts.wicketWar.pages.InsertContact;
-import org.jboss.as.quickstarts.wicketWar.pages.ListContacts;
-import org.jboss.as.quickstarts.wicketWar.util.ResourceWebApplicationPath;
-
-
-/**
- *
- * @author Ondrej Zizka
- */
-public class WicketJavaEEApplication extends WebApplication {
-
-    @Override
-    public Class<? extends Page> getHomePage() {
-        return ListContacts.class;
-    }
-
-    @Override
-    protected void init() {
-        super.init();
-
-        // Enable CDI
-        BeanManager bm;
-        try {
-            bm = (BeanManager) new InitialContext().lookup("java:comp/BeanManager");
-        } catch (NamingException e) {
-            throw new IllegalStateException("Unable to obtain CDI BeanManager", e);
-        }
-
-        // Configure CDI, disabling Conversations as we aren't using them
-        new CdiConfiguration(bm).setPropagation(NONE).configure(this);
-        
-        // Mount the InsertContact page at /insert
-        mountPage("/insert", InsertContact.class);
-    }
-    
-    @Override
-    protected IResourceFinder getResourceFinder() {
-    	return new ResourceWebApplicationPath(WicketJavaEEApplication.class.getPackage().getName(), getServletContext());
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java
deleted file mode 100644
index 78d7003..0000000
--- a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDao.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed 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.
- */
-package org.jboss.as.quickstarts.wicketWar.dao;
-
-import java.util.List;
-
-import javax.ejb.Local;
-
-import org.jboss.as.quickstarts.wicketWar.model.Contact;
-
-/**
- *
- * @author Filippo Diotalevi
- */
-@Local
-public interface ContactDao {
-
-    /**
-     * Returns the currently available contacts.
-     *
-     * @return every contact in the database
-     */
-    public List<Contact> getContacts();
-
-    /**
-     * Returns a specific Contact from DB.
-     *
-     * @param id The Id for the Contact
-     * @return The specified Contact object
-     */
-    public Contact getContact(Long id);
-
-    /**
-     * Persist a new Contact in the DB.
-     *
-     * @param name The name of the new Contact
-     * @param email The e-mail address of the new Contact
-     */
-    public void addContact(String name, String email);
-
-    /**
-     * Removes a specific item from the DB.
-     *
-     * @param modelObject The specific Contact object, which we wants to remove
-     */
-    public void remove(Contact modelObject);
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java
deleted file mode 100644
index 25fb2d1..0000000
--- a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/dao/ContactDaoBean.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed 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.
- */
-package org.jboss.as.quickstarts.wicketWar.dao;
-
-import java.util.List;
-
-import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import org.jboss.as.quickstarts.wicketWar.model.Contact;
-
-/**
- * A bean which manages Contact entities.
- */
-@Stateless
-public class ContactDaoBean implements ContactDao {
-
-    @PersistenceContext
-    private EntityManager em;
-
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public List<Contact> getContacts() {
-        return em.createQuery("SELECT c FROM Contact c").getResultList();
-    }
-
-    /**
-     * Get Contact by ID.
-     */
-    @Override
-    public Contact getContact(Long id) {
-        return em.find(Contact.class, id);
-    }
-
-    /**
-     * Add a new Contact.
-     */
-    @Override
-    public void addContact(String name, String email) {
-        em.merge(new Contact(null, name, email));
-    }
-
-    /**
-     * Remove a Contact.
-     */
-    @Override
-    public void remove(Contact modelObject) {
-        Contact managed = em.merge(modelObject);
-        em.remove(managed);
-        em.flush();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java
deleted file mode 100644
index 152b777..0000000
--- a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/model/Contact.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed 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.
- */
-package org.jboss.as.quickstarts.wicketWar.model;
-
-import static javax.persistence.GenerationType.IDENTITY;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-
-/**
- *
- * @author Filippo Diotalevi
- */
-@SuppressWarnings("serial")
-@Entity
-public class Contact implements Serializable {
-
-    @Id
-    @GeneratedValue(strategy = IDENTITY)
-    private Long id;
-    private String name;
-    
-    @Column(unique=true)
-    private String email;
-
-    public Contact() {
-    }
-
-    public Contact(Long id, String name, String email) {
-        this.id = id;
-        this.name = name;
-        this.email = email;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((email == null) ? 0 : email.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        Contact other = (Contact) obj;
-        if (email == null) {
-            if (other.email != null)
-                return false;
-        } else if (!email.equals(other.email))
-            return false;
-        return true;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java
deleted file mode 100644
index ce7c692..0000000
--- a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContact.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed 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.
- */
-package org.jboss.as.quickstarts.wicketWar.pages;
-
-import javax.inject.Inject;
-
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.RequiredTextField;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
-import org.apache.wicket.model.PropertyModel;
-import org.jboss.as.quickstarts.wicketWar.dao.ContactDao;
-import org.jboss.as.quickstarts.wicketWar.model.Contact;
-
-/**
- *
- * @author Filippo Diotalevi
- */
-@SuppressWarnings("serial")
-public class InsertContact extends WebPage {
-    
-    private Form<Contact> insertForm;
-    
-    private String name;
-    
-    private String email;
-    
-    @Inject
-    private ContactDao contactDao;
-
-    
-    public InsertContact() {
-        add(new FeedbackPanel("feedback"));
-
-        insertForm = new Form<Contact>("insertForm") {
-
-            @Override
-            protected void onSubmit() {
-                contactDao.addContact(name, email);
-                setResponsePage(ListContacts.class);
-            }
-        };
-
-        insertForm.add(new RequiredTextField<String>("name",
-                new PropertyModel<String>(this, "name")));
-        insertForm.add(new RequiredTextField<String>("email", new PropertyModel<String>(this,
-                "email")));
-        add(insertForm);
-    }
-
-    
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java
deleted file mode 100644
index fe86ce1..0000000
--- a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/pages/ListContacts.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed 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.
- */
-package org.jboss.as.quickstarts.wicketWar.pages;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-import org.jboss.as.quickstarts.wicketWar.dao.ContactDao;
-import org.jboss.as.quickstarts.wicketWar.model.Contact;
-
-/**
- * Dynamic behavior for the ListContact page
- * 
- * @author Filippo Diotalevi
- */
-@SuppressWarnings("serial")
-public class ListContacts extends WebPage {
-
-    // Inject the ContactDao using @Inject
-    @Inject
-    private ContactDao contactDao;
-
-    @Resource(name = "welcomeMessage")
-    private String welcome;
-
-    // Set up the dynamic behavior for the page, widgets bound by id
-    public ListContacts() {
-
-        // Add the dynamic welcome message, specified in web.xml
-        add(new Label("welcomeMessage", welcome));
-        add(new ListView<Contact>("contacts", contactDao.getContacts()) {
-
-            // Populate the table of contacts
-            @Override
-            protected void populateItem(final ListItem<Contact> item) {
-                Contact contact = item.getModelObject();
-                item.add(new Label("name", contact.getName()));
-                item.add(new Label("email", contact.getEmail()));
-                item.add(new Link<Contact>("delete", item.getModel()) {
-
-                    @Override
-                    public void onClick() {
-                        contactDao.remove(item.getModelObject());
-                        setResponsePage(ListContacts.class);
-                    }
-                });
-            }
-        });
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java b/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java
deleted file mode 100644
index 6aea12e..0000000
--- a/testing/wicket-arquillian/src/main/java/org/jboss/as/quickstarts/wicketWar/util/ResourceWebApplicationPath.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.as.quickstarts.wicketWar.util;
-
-import java.net.URL;
-
-import javax.servlet.ServletContext;
-
-import org.apache.wicket.util.file.IResourcePath;
-import org.apache.wicket.util.resource.IResourceStream;
-import org.apache.wicket.util.resource.UrlResourceStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Maintain a list of paths which might either be ordinary folders of the filesystem or relative
- * paths to the web application's servlet context.
- * 
- * @author Johan Compagner
- */
-public final class ResourceWebApplicationPath implements IResourcePath
-{
-	private final static Logger log = LoggerFactory.getLogger(ResourceWebApplicationPath.class);
-
-	private static final String WEB_INF = "WEB-INF/";
-
-	/** The web apps servlet context */
-	private final ServletContext servletContext;
-
-	private String basePath;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param servletContext
-	 *            The webapplication context where the resources must be loaded from
-	 */
-	public ResourceWebApplicationPath(String basePath,final ServletContext servletContext)
-	{
-		this.basePath = basePath.replaceAll("\\.", "\\/");
-		this.servletContext = servletContext;
-	}
-
-	/**
-	 * 
-	 * @see org.apache.wicket.util.file.IResourceFinder#find(Class, String)
-	 */
-	public IResourceStream find(final Class<?> clazz, final String pathname)
-	{
-
-		if (pathname.startsWith(WEB_INF) == false)
-		{
-			try
-			{
-				final URL url = servletContext.getResource(pathname.replaceFirst(basePath, ""));
-				if (url != null)
-				{
-					return new UrlResourceStream(url);
-				}
-			}
-			catch (Exception ex)
-			{
-				// ignore, file couldn't be found
-			}
-		}
-
-		return null;
-	}
-
-	/**
-	 * @see java.lang.Object#toString()
-	 */
-	@Override
-	public String toString()
-	{
-		return "[webapppath: " + basePath + "]";
-	}
-
-	@Override
-	public void add(String folder) {
-		// DO NOTHING.
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml b/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
index 0c3470d..e42cebe 100644
--- a/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
+++ b/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
@@ -20,12 +20,11 @@
     xsi:schemaLocation="
         http://java.sun.com/xml/ns/persistence
         http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
-    <persistence-unit name="primary">
+    <persistence-unit name="wicketArquillianTesting">
         <!-- If you are running in a production environment, add a managed 
             data source, this example data source is just for development and testing! -->
-        <!-- The datasource is deployed as <EAR>/META-INF/wicket-quickstart-ds.xml, 
-            you can find it in the source at ear/src/main/application/META-INF/wicket-quickstart-ds.xml -->
-        <jta-data-source>java:jboss/datasources/WicketQuickstartDS</jta-data-source>
+        <!-- You can find it in the source at src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml -->
+        <jta-data-source>java:jboss/datasources/WicketArquillianTestingDS</jta-data-source>
         <properties>
             <!-- Properties for Hibernate -->
             <property name="hibernate.hbm2ddl.auto" value="create-drop" />

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml
deleted file mode 100644
index ddd61c7..0000000
--- a/testing/wicket-arquillian/src/main/webapp/WEB-INF/faces-config.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<faces-config
-    xmlns="http://java.sun.com/xml/ns/javaee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
-    version="1.2">
-
-</faces-config>

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
index 040099d..cafe4bd 100644
--- a/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
@@ -15,11 +15,11 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-    version="2.5">
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 
-    <display-name>WildFly Quickstart: Wicket WAR</display-name>
+    <display-name>Wicket Arquillian WildFly Quickstart: Wicket WAR</display-name>
 
     <!-- Enable Wicket -->
     <filter>
@@ -29,7 +29,7 @@
             <!-- Specify the "entry point" for Wicket to configure itself 
                 from -->
             <param-name>applicationClassName</param-name>
-            <param-value>org.jboss.as.quickstarts.wicketWar.WicketJavaEEApplication</param-value>
+            <param-value>org.apache.wicket.arquillian.testing.WicketJavaEEApplication</param-value>
         </init-param>
     </filter>
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml
new file mode 100644
index 0000000..af137fe
--- /dev/null
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    JBoss, Home of Professional Open Source
+    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
+    contributors by the @authors tag. See the copyright.txt in the
+    distribution for a full listing of individual contributors.
+
+    Licensed 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.
+-->
+<!-- This is an unmanaged datasource. It should be used for proofs of concept 
+    or testing only. It uses H2, an in memory database that ships with JBoss 
+    AS. -->
+<datasources xmlns="http://www.jboss.org/ironjacamar/schema"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
+    <!-- The datasource is bound into JNDI at this location. We reference 
+        this in META-INF/persistence.xml -->
+    <datasource jndi-name="java:jboss/datasources/WicketArquillianTestingDS"
+        pool-name="wicket-arquillian-testing" enabled="true"
+        use-java-context="true">
+        <connection-url>jdbc:h2:mem:wicket-arquillian-testing;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1</connection-url>
+        <driver>h2</driver>
+        <security>
+            <user-name>sa</user-name>
+            <password>sa</password>
+        </security>
+    </datasource>
+</datasources>
+ 

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml
deleted file mode 100644
index 92fa71a..0000000
--- a/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-quickstart-ds.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    JBoss, Home of Professional Open Source
-    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
-    contributors by the @authors tag. See the copyright.txt in the
-    distribution for a full listing of individual contributors.
-
-    Licensed 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.
--->
-<!-- This is an unmanaged datasource. It should be used for proofs of concept 
-    or testing only. It uses H2, an in memory database that ships with JBoss 
-    AS. -->
-<datasources xmlns="http://www.jboss.org/ironjacamar/schema"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
-    <!-- The datasource is bound into JNDI at this location. We reference 
-        this in META-INF/persistence.xml -->
-    <datasource jndi-name="java:jboss/datasources/WicketQuickstartDS"
-        pool-name="wicket-quickstart" enabled="true"
-        use-java-context="true">
-        <connection-url>jdbc:h2:mem:wicket-quickstart;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1</connection-url>
-        <driver>h2</driver>
-        <security>
-            <user-name>sa</user-name>
-            <password>sa</password>
-        </security>
-    </datasource>
-</datasources>
- 

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
new file mode 100644
index 0000000..cb2cdf8
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+package org.apache.wicket.arquillian.testing;
+
+import org.apache.wicket.arquillian.testing.util.ResourceWebApplicationPath;
+
+/**
+ * Just extends the Application to add some needs.
+ * 
+ * @author felipecalmeida
+ * @since 06/20/2015
+ */
+public class TestWicketJavaEEApplication extends WicketJavaEEApplication {
+  
+	// Has some security ignores during the test (example: accept all roles).
+	
+	@Override
+	protected void initResourceFinder() {
+    	getResourceSettings().getResourceFinders().add(new ResourceWebApplicationPath(TestWicketJavaEEApplication.class.getPackage().getName(), getServletContext()));
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
new file mode 100644
index 0000000..268d098
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
@@ -0,0 +1,145 @@
+/*
+ * 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.
+ */
+package org.apache.wicket.arquillian.testing.deployment;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+
+import javax.servlet.ServletContext;
+
+import org.apache.wicket.arquillian.testing.TestWicketJavaEEApplication;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.util.tester.WicketTester;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.shrinkwrap.api.Filters;
+import org.jboss.shrinkwrap.api.GenericArchive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
+import org.jboss.shrinkwrap.api.importer.ExplodedImporter;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.Maven;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <b>WARNING: If this error occurs - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
+ *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
+ *	
+ *	<b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * 
+ * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try again. </b>
+ * 
+ * @author felipecalmeida
+ * @since 06/23/2015
+ *
+ */
+public abstract class AbstractDeploymentTest {
+	
+	private static final Logger log = LoggerFactory.getLogger(AbstractDeploymentTest.class);
+	
+	private static final String WEBAPP_SRC = "src/main/webapp";
+	private static final String WEBAPP_TEST_SRC = "src/test/webapp";
+
+	@Deployment
+	public static WebArchive deployment() {
+		// Create webapp files from src/main/webapp. (WEB AS NORMAL)
+		GenericArchive webapp = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_SRC).as(GenericArchive.class);
+		
+		// Create webapptest files from src/test/webapp. (TEST)
+		GenericArchive webappTest = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_TEST_SRC).as(GenericArchive.class);
+		
+		// Some configurations to create a manifest.mf.
+		ByteArrayAsset resource = new ByteArrayAsset("Dependencies: org.jboss.msc".getBytes());
+		
+		// Create libs from POM.XML.
+		File[] asFile = Maven.configureResolver()
+				// I'm not using internet directly, I have a Nexus Repository that handles the libs for me.
+				.workOffline().withMavenCentralRepo(false)
+				// Load everything from pom, that is compile and runtime, as a file and transitivity to don't loose anything and cause exceptions.
+				.loadPomFromFile("./pom.xml").importCompileAndRuntimeDependencies()
+				.resolve().withTransitivity().asFile();
+		
+		// Create the WAR.
+		return ShrinkWrap.create(WebArchive.class, "wicket-servletContext.war")
+						 // Add packages and/or classes.
+						 .addPackages(true, TestWicketJavaEEApplication.class.getPackage())
+						 // Add the persistence.xml
+						 .addAsResource("META-INF/persistence.xml")
+						 // Add a manifest.
+						 .addAsManifestResource(resource, "MANIFEST.MF")
+						 // Add WEBAPP files.
+						 .merge(webapp,"/",Filters.exclude(".*\\web.xml"))
+						 // Add WEBAPP TEST files.
+						 .merge(webappTest,"/",Filters.includeAll())
+						 // Add LIBS from POM.XML.
+						 .addAsLibraries(asFile);
+	}
+	
+	protected WicketTester wicketTester;
+	
+	/**
+	 * Set a new instance of wicketTester.
+	 *
+	 * @param wicketTester
+	 */
+	public void setWicketTester(WicketTester wicketTester) {
+		this.wicketTester = wicketTester;
+	}
+	
+	/**
+	 * Get an instance of wicketTester. The first time verify and create a new one.
+	 *
+	 * @return
+	 */
+	public WicketTester getWicketTester() {
+		if(wicketTester == null) {
+			wicketTester = new WicketTester(useServletContextContainer(),false);
+		}
+		return wicketTester;
+	}
+	
+	/**
+	 * Loading the TestWicketJavaEEApplication from src/test/webapp/WEB-INF/web.xml.
+	 * 
+	 * @return
+	 */
+	protected WebApplication useServletContextContainer() {
+		WebApplication webApplication = null;
+		try {
+			webApplication = TestWicketJavaEEApplication.get();
+		} catch (Exception e) {
+			log.error("If not using arquillian, maybe org.apache.wicket.Application has a message for you " + e.getMessage());
+			// I didn't test it, just supposing that i'm not using arquillian, so should show this message.
+			assertEquals("There is no application attached to current thread " + Thread.currentThread().getName(), e.getMessage());
+		}
+		
+		assertNotNull(webApplication);
+		
+		log.info("WebApplication Name: " + webApplication.getName());
+		
+		ServletContext servletContext = webApplication.getServletContext();
+		assertNotNull(servletContext);
+		log.info("ServletContext Name: " + servletContext.getServletContextName());
+		assertEquals("Wicket Arquillian WildFly Quickstart: Wicket TEST WAR",servletContext.getServletContextName());
+		
+		log.info("Server info: " + servletContext.getServerInfo());
+		return webApplication;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java
new file mode 100644
index 0000000..b3c9230
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+package org.apache.wicket.arquillian.testing.pages;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.wicket.arquillian.testing.dao.ContactDao;
+import org.apache.wicket.arquillian.testing.deployment.AbstractDeploymentTest;
+import org.apache.wicket.arquillian.testing.model.Contact;
+import org.apache.wicket.util.tester.FormTester;
+import org.jboss.arquillian.junit.Arquillian;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <b>WARNING: If this error occurs - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
+ *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
+ *	
+ *	<b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * 
+ * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try again. </b>
+ * 
+ * Just a class test to show that everything is working.
+ * 
+ * @author felipecalmeida
+ * @since 06/21/2015
+ *
+ */
+@RunWith(Arquillian.class)
+public class InsertContactTest extends AbstractDeploymentTest {
+	
+	private static final String EMAIL_IS_REQUIRED = "'email' is required.";
+
+	private static final String NAME_IS_REQUIRED = "'name' is required.";
+
+	private static final String INSERT_FORM = "insertForm";
+
+	private static final String EMAIL = "email";
+
+	private static final String NAME = "name";
+
+	private static final String WICKET_ARQUILLIAN_TEST_APACHE_ORG = "wicket-arquillian-test@apache.org";
+
+	private static final String WICKET_ARQUILLIAN_TEST = "Wicket Arquillian Test";
+
+	private static final Logger log = LoggerFactory.getLogger(InsertContactTest.class);
+
+	@Inject
+    private ContactDao contactDao;
+	
+	@Test
+	public void testErrorMessagesInsertContact() {
+		Class<InsertContact> pageClass = InsertContact.class;
+		getWicketTester().startPage(pageClass);
+		getWicketTester().assertRenderedPage(pageClass);
+		
+		FormTester formTester = getWicketTester().newFormTester(INSERT_FORM);
+		formTester.submit();
+		getWicketTester().assertErrorMessages(NAME_IS_REQUIRED, EMAIL_IS_REQUIRED);
+		log.info("Required Messages: " + NAME_IS_REQUIRED + " and " + EMAIL_IS_REQUIRED);
+		
+		getWicketTester().assertRenderedPage(pageClass);
+	}
+	
+	@Test
+	public void testInsertContact() {
+		Class<InsertContact> pageClass = InsertContact.class;
+		getWicketTester().startPage(pageClass);
+		getWicketTester().assertRenderedPage(pageClass);
+		
+		FormTester formTester = getWicketTester().newFormTester(INSERT_FORM);
+		formTester.setValue(NAME, WICKET_ARQUILLIAN_TEST);
+		formTester.setValue(EMAIL, WICKET_ARQUILLIAN_TEST_APACHE_ORG);
+		formTester.submit();
+		
+		getWicketTester().assertNoErrorMessage();
+		getWicketTester().assertRenderedPage(ListContacts.class);
+		
+		log.info("Retrieving contacts to assert:");
+		List<Contact> contacts = contactDao.getContacts();
+		int contactsSize = contacts.size();
+		assertEquals(1, contactsSize);
+		
+		Contact contact = contacts.get(0);
+		assertNotNull(contact.getId());
+		assertEquals(WICKET_ARQUILLIAN_TEST,contact.getName());
+		assertEquals(WICKET_ARQUILLIAN_TEST_APACHE_ORG,contact.getEmail());
+		
+		log.info("Contacts size: " + contactsSize);
+		for (Contact infoContact : contacts) {
+			log.info("Contacts info: " + infoContact);
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
new file mode 100644
index 0000000..e459348
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ */
+package org.apache.wicket.arquillian.testing.servletcontext;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.wicket.arquillian.testing.TestWicketJavaEEApplication;
+import org.apache.wicket.arquillian.testing.deployment.AbstractDeploymentTest;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.util.tester.WicketTester;
+import org.jboss.arquillian.junit.Arquillian;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <b>WARNING: If this error occurs - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
+ *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
+ *	
+ *	<b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * 
+ * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try again. </b>
+ * 
+ * @author felipecalmeida
+ * @since 06/23/2015
+ *
+ */
+@RunWith(Arquillian.class)
+public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
+	
+	private static final Logger log = LoggerFactory.getLogger(ArquillianContainerProvidedTest.class);
+
+	/**
+	 * Using container's servlet context and/or filter provided configured in web.xml and using Arquillian.
+	 */
+	@Test
+	public void testFindResourcesServletContextFromContainer() {
+		WebApplication webApplication =  useServletContextContainer();
+		setWicketTester(new WicketTester(webApplication, webApplication.getServletContext(), false));
+		findResourcesServletContext();
+	}
+	
+	/**
+	 * Using container's servlet context and/or filter provided configured in web.xml and using Arquillian.
+	 */
+	@Test
+	public void testFindResourcesWebApplicationFromContainer() {
+		WebApplication webApplication = useServletContextContainer();
+		setWicketTester(new WicketTester(webApplication, false));
+		findResourcesServletContext();
+	}
+	
+	/**
+	 * Creating another application and trying to reuse the ServletContext/Filter.
+	 */
+	@Test
+	public void testNewApplicationTryReuseServletContextFilter() {
+		try {
+			log.info("Trying to reuse container's ServletContext/Filter.");
+			setWicketTester(new WicketTester(new TestWicketJavaEEApplication(),false));
+		} catch (IllegalStateException e) {
+			assertEquals("servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor",e.getMessage());
+			log.error("Cannot use container's ServletContext.\n", e);
+		}
+		
+		assertNull(wicketTester);
+	}
+	
+	/**
+	 * Null application to test error.
+	 */
+	@Test
+	public void testNullApplication() {
+		try {
+			log.info("Trying to use a null application.");
+			setWicketTester(new WicketTester(null,false));
+		} catch (AssertionError e) {
+			assertEquals("WebApplication cannot be null",e.getMessage());
+			log.error("WebApplication cannot be null\n", e);
+			assertNull(wicketTester);
+		}
+		
+	}
+	
+	/**
+	 * Test with new application.
+	 */
+	@Test
+	public void testNewApplication() {
+		try {
+			setWicketTester(new WicketTester(new TestWicketJavaEEApplication()));
+			assertNotNull(getWicketTester().getApplication());
+			log.info("Using mock servletcontext.");
+			log.info("WebApplication MOCK after wicketTester Name: " + getWicketTester().getApplication().getName());
+			log.info("ServletContext MOCK after wicketTester Name: " + getWicketTester().getServletContext().getServletContextName());
+			log.info("Server info: " + getWicketTester().getServletContext().getServerInfo());
+			assertEquals("Wicket Mock Test Environment v1.0", getWicketTester().getServletContext().getServerInfo());
+		} catch (IllegalStateException e) {
+			// I don't know what or if could cause this.
+			fail("Cannot use a mock ServletContext.");
+		}
+		
+		// USING MOCK.
+		findResourcesServletContext();
+	}
+
+	/**
+	 * Look for resources (like html, js, css, img, etc).
+	 * 
+	 * @param servletContext
+	 */
+	private void findResourcesServletContext() {
+		try {
+			// Doing the same thing that ResourceWebApplicationPath does.
+			URL resource = getWicketTester().getServletContext().getResource("/pages/InsertContact.html");
+			if(resource == null) {
+				throw new MalformedURLException("Resource /pages/InsertContact.html not found.");
+			}
+			log.info("Resource found " + resource.getFile());
+			assertTrue(resource.getFile().contains("/pages/InsertContact.html"));
+		} catch (Exception e) {
+			assertEquals("Resource /pages/InsertContact.html not found.", e.getMessage());
+			log.error("Resource cannot be found.", e);
+		}
+	}
+
+}


[08/14] wicket git commit: Minor updates. Upgrading Wildfly and Arquillian version and removing unnecessary comments.

Posted by mg...@apache.org.
Minor updates.
Upgrading Wildfly and Arquillian version and removing unnecessary
comments.

Signed-off-by: Felipe C. <fr...@gmail.com>

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e944570a
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e944570a
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e944570a

Branch: refs/heads/master
Commit: e944570a33bda0d40e3196d5861511dd391d4397
Parents: 192f514
Author: Felipe C. <fr...@gmail.com>
Authored: Tue Jun 23 18:05:01 2015 -0300
Committer: Felipe C. <fr...@gmail.com>
Committed: Tue Jun 23 18:05:01 2015 -0300

----------------------------------------------------------------------
 testing/wicket-arquillian/pom.xml                                | 4 ++--
 .../java/org/apache/wicket/util/tester/BaseWicketTester.java     | 2 +-
 .../main/java/org/apache/wicket/util/tester/WicketTester.java    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/e944570a/testing/wicket-arquillian/pom.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml
index 91b5f23..37e558f 100644
--- a/testing/wicket-arquillian/pom.xml
+++ b/testing/wicket-arquillian/pom.xml
@@ -47,7 +47,7 @@
 	<properties>
 		<!-- Wildfly dependency versions -->
 		<version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin>
-		<version.wildfly_8>8.1.0.Final</version.wildfly_8>
+		<version.wildfly_8>8.2.0.Final</version.wildfly_8>
 		
 		<!-- Java EE 6 SPEC JBoss -->
 		<version.jboss.spec.javaee.6.0>3.0.3.Final</version.jboss.spec.javaee.6.0>
@@ -56,7 +56,7 @@
 		<version.shrinkwrap.resolvers>2.1.1</version.shrinkwrap.resolvers>
 		
 		<!-- Arquillian -->
-		<version.arquillian_core>1.0.3.Final</version.arquillian_core>
+		<version.arquillian_core>1.1.8.Final</version.arquillian_core>
 	</properties>
 
 	<dependencyManagement>

http://git-wip-us.apache.org/repos/asf/wicket/blob/e944570a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
index 74b5309..773a433 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
@@ -254,7 +254,7 @@ public class BaseWicketTester
 	}
 
 	/**
-	 * Creates a <code>WicketTester</code>. Constructor to keep compatibility.
+	 * Creates a <code>WicketTester</code>.
 	 * 
 	 * @param application
 	 *            a <code>WicketTester</code> <code>WebApplication</code> object

http://git-wip-us.apache.org/repos/asf/wicket/blob/e944570a/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
index 886a092..3b2b225 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
@@ -221,7 +221,7 @@ public class WicketTester extends BaseWicketTester
 	}
 
 	/**
-	 * Creates a <code>WicketTester</code> to help unit testing. Constructor to keep compatibility.
+	 * Creates a <code>WicketTester</code> to help unit testing.
 	 * 
 	 * @param application
 	 *            a <code>WicketTester</code> <code>WebApplication</code> object


[03/14] wicket git commit: Changes required to merge. Tests are now organized and added one more as an functional example. Added the patch on BaseWicketTester and WicketTester.

Posted by mg...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java b/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java
deleted file mode 100644
index da90dcf..0000000
--- a/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/TestWicketJavaEEApplication.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed 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.
- */
-package org.jboss.as.quickstarts.wicketWar;
-
-import org.apache.wicket.util.file.IResourceFinder;
-import org.jboss.as.quickstarts.wicketWar.util.ResourceWebApplicationPath;
-
-/**
- * Just extends the Application to add some needs.
- * 
- * @author felipecalmeida
- * @since 06/20/2015
- */
-public class TestWicketJavaEEApplication extends WicketJavaEEApplication {
-  
-	// Has some security ignores during the test (example: accept all roles).
-	
-	@Override
-    protected IResourceFinder getResourceFinder() {
-    	return new ResourceWebApplicationPath(TestWicketJavaEEApplication.class.getPackage().getName(), getServletContext());
-    }
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java b/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java
deleted file mode 100644
index c7a6631..0000000
--- a/testing/wicket-arquillian/src/test/java/org/jboss/as/quickstarts/wicketWar/pages/InsertContactTest.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- * 
- */
-package org.jboss.as.quickstarts.wicketWar.pages;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.servlet.ServletContext;
-
-import org.apache.wicket.protocol.http.WebApplication;
-import org.apache.wicket.util.tester.WicketTester;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.as.quickstarts.wicketWar.TestWicketJavaEEApplication;
-import org.jboss.as.quickstarts.wicketWar.WicketJavaEEApplication;
-import org.jboss.shrinkwrap.api.Filters;
-import org.jboss.shrinkwrap.api.GenericArchive;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
-import org.jboss.shrinkwrap.api.importer.ExplodedImporter;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <b>WARNING: IF THIS ERROR OCCURS - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
- *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
- *	
- *	<b>SOLUTION: SEARCH AND KILL WILDFLY OR JBOSS PROCCESS INSTANCE THAT ARE USING PORT 8080.</b>
- * 
- * @author felipecalmeida
- * @since 06/21/2015
- *
- */
-@RunWith(Arquillian.class)
-public class InsertContactTest {
-	
-	/** log. */
-	private static final Logger log = LoggerFactory.getLogger(InsertContactTest.class);
-	
-	private static final String WEBAPP_SRC = "src/main/webapp";
-	private static final String WEBAPP_TEST_SRC = "src/test/webapp";
-
-	@Deployment
-	public static WebArchive deployment() {
-		// Create webapp files from src/main/webapp. (WEB AS NORMAL)
-		GenericArchive webapp = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_SRC).as(GenericArchive.class);
-		
-		// Create webapptest files from src/test/webapp. (TEST)
-		GenericArchive webappTest = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_TEST_SRC).as(GenericArchive.class);
-		
-		// Some configurations to create a manifest.mf.
-		ByteArrayAsset resource = new ByteArrayAsset("Dependencies: org.jboss.msc".getBytes());
-		
-		// Create libs from POM.XML.
-		File[] asFile = Maven.configureResolver()
-				// I'm not using internet directly, I have a Nexus Repository that handles the libs for me.
-				.workOffline().withMavenCentralRepo(false)
-				// Load everything from pom, that is compile and runtime, as a file and transitivity to don't loose anything and cause exceptions.
-				.loadPomFromFile("./pom.xml").importCompileAndRuntimeDependencies()
-				.resolve().withTransitivity().asFile();
-		
-		// Create the WAR.
-		return ShrinkWrap.create(WebArchive.class, "wicket-servletContext.war")
-						 // Add packages and/or classes.
-						 .addPackages(true, TestWicketJavaEEApplication.class.getPackage())
-						 // Add the persistence.xml
-						 .addAsResource("META-INF/persistence.xml")
-						 // Add a manifest.
-						 .addAsManifestResource(resource, "MANIFEST.MF")
-						 // Add WEBAPP files.
-						 .merge(webapp,"/",Filters.exclude(".*\\web.xml"))
-						 // Add WEBAPP TEST files.
-						 .merge(webappTest,"/",Filters.includeAll())
-						 // Add LIBS from POM.XML.
-						 .addAsLibraries(asFile);
-	}
-	
-	private WicketTester wicketTester;
-
-	private ServletContext servletContext;
-	
-//	private String basePath = TestWicketJavaEEApplication.class.getPackage().getName().replaceAll("\\.", "\\/");
-	
-	@After
-	public void tearDown() throws Exception {
-		if(wicketTester != null && wicketTester.getApplication() != null) {
-			wicketTester.getApplication().internalDestroy();
-		}
-	}
-
-	@Test
-	public void testFindResources(){
-		WebApplication webApplication = useServletContextContainer();
-		
-		// USING CONTAINER'S SERVLET.
-		testFindResourcesServletContext(servletContext);
-		
-		reuseServletContextFromContainerOrCreateMock(webApplication);
-		
-		// USING MOCK.
-		testFindResourcesServletContextMock(wicketTester);
-		
-	}
-
-	/**
-	 * Loading the TestWicketJavaEEApplication from src/test/webapp/WEB-INF/web.xml.
-	 * 
-	 * @return
-	 */
-	private WebApplication useServletContextContainer() {
-		WebApplication webApplication = null;
-		try {
-			webApplication = TestWicketJavaEEApplication.get();
-		} catch (Exception e) {
-			log.error("IF NOT USING ARQUILLIAN, org.apache.wicket.Application has a message for you " + e.getMessage());
-			// DIDN'T TEST THIS, JUST SUPPOSING THAT I'M NOT USING ARQUILLIAN, SO SHOULD SHOW THIS MESSAGE.
-			assertEquals("There is no application attached to current thread " + Thread.currentThread().getName(), e.getMessage());
-		}
-		
-		assertNotNull(webApplication);
-		
-		log.info("WebApplication Name: " + webApplication.getName());
-		
-		servletContext = webApplication.getServletContext();
-		assertNotNull(servletContext);
-		log.info("ServletContext Name: " + servletContext.getServletContextName());
-		assertEquals("WildFly Quickstart: Wicket TEST WAR",servletContext.getServletContextName());
-		
-		log.info("Server info: " + servletContext.getServerInfo());
-		return webApplication;
-	}
-
-	/**
-	 * Trying to use ServletContext from Container.
-	 * 
-	 * @param webApplication
-	 */
-	private void reuseServletContextFromContainerOrCreateMock(WebApplication webApplication) {
-		try {
-			log.info("TRYING TO REUSE CONTAINER'S SERVLETCONTEXT/FILTER.");
-			wicketTester = new WicketTester(webApplication);
-			assertNotNull(wicketTester.getApplication());
-			log.info("USING CONTAINER'S SERVLETCONTEXT/FILTER.");
-			log.info("WebApplication after wicketTester Name: " + wicketTester.getApplication().getName());
-			log.info("ServletContext after wicketTester Name: " + wicketTester.getServletContext().getServletContextName());
-			log.info("Server info: " + wicketTester.getServletContext().getServerInfo());
-		} catch (IllegalStateException e) {
-			assertEquals("Application name can only be set once.",e.getMessage());
-			log.error("CANNOT USE CONTAINER'S SERVLETCONTEXT.\n", e);
-		}
-		if(wicketTester == null){
-			try {
-				wicketTester = new WicketTester(new TestWicketJavaEEApplication());
-				assertNotNull(wicketTester.getApplication());
-				log.info("USING A MOCK SERVLETCONTEXT.");
-				log.info("WebApplication MOCK after wicketTester Name: " + wicketTester.getApplication().getName());
-				log.info("ServletContext MOCK after wicketTester Name: " + wicketTester.getServletContext().getServletContextName());
-				log.info("Server info: " + wicketTester.getServletContext().getServerInfo());
-				assertEquals("Wicket Mock Test Environment v1.0", wicketTester.getServletContext().getServerInfo());
-			} catch (IllegalStateException e) {
-				// I DON'T KNOW WHAT OR IF COULD CAUSE THIS.
-				log.error("CANNOT USE A MOCK SERVLETCONTEXT.");
-//				assertEquals("Application name can only be set once.",e.getMessage());
-			}
-		}
-	}
-	
-	/**
-	 * Using mock.
-	 * 
-	 * @param wicketTester
-	 */
-	private void testFindResourcesServletContextMock(WicketTester wicketTester) {
-		testFindResourcesServletContext(wicketTester.getServletContext());
-	}
-	
-	/**
-	 * Look for resources (like html, js, css, img, etc).
-	 * 
-	 * @param servletContext
-	 */
-	private void testFindResourcesServletContext(ServletContext servletContext) {
-		try {
-			// Doing the same thing that ResourceWebApplicationPath does.
-			URL resource = servletContext.getResource("/pages/InsertContact.html");
-			if(resource == null) {
-				throw new MalformedURLException("Resource /pages/InsertContact.html not found.");
-			}
-			log.info("RESOURCE FOUND " + resource.getFile());
-			assertTrue(resource.getFile().contains("/pages/InsertContact.html"));
-		} catch (Exception e) {
-			assertEquals("Resource /pages/InsertContact.html not found.", e.getMessage());
-			log.error("RESOURCE CANNOT BE FOUND.", e);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/resources/arquillian.xml b/testing/wicket-arquillian/src/test/resources/arquillian.xml
index 6ae0d20..cca5a0c 100644
--- a/testing/wicket-arquillian/src/test/resources/arquillian.xml
+++ b/testing/wicket-arquillian/src/test/resources/arquillian.xml
@@ -11,9 +11,7 @@
     <container qualifier="wildfly" default="true">
     	<configuration>
     		<property name="jbossHome">target/wildfly-8.1.0.Final</property>
-            <!-- JDK before 8: -XX:MaxPermSize=128m -XX -->
-            <!-- JDK 8 and later: -XX:MaxMetaspaceSize=128m -->
-            <!-- DEBUG MODE MANAGED: -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y -->
+            <!-- DEBUG MODE MANAGED: -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -->
     		<property name="javaVmArguments">-Xmx128m -XX:MaxPermSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
             </property>
     	</configuration>

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml b/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
index b52ea2a..4266a83 100644
--- a/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
+++ b/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
@@ -13,7 +13,7 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 
-	<display-name>WildFly Quickstart: Wicket TEST WAR</display-name>
+	<display-name>Wicket Arquillian WildFly Quickstart: Wicket TEST WAR</display-name>
 
 	<!-- Enable Wicket -->
 	<filter>
@@ -22,7 +22,7 @@
 		<init-param>
 			<!-- Specify the "entry point" for Wicket to configure itself from -->
 			<param-name>applicationClassName</param-name>
-			<param-value>org.jboss.as.quickstarts.wicketWar.TestWicketJavaEEApplication</param-value>
+			<param-value>org.apache.wicket.arquillian.testing.TestWicketJavaEEApplication</param-value>
 		</init-param>
 	</filter>
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
index f94305c..74b5309 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
@@ -137,6 +137,7 @@ import org.apache.wicket.util.string.Strings;
 import org.apache.wicket.util.time.Duration;
 import org.apache.wicket.util.visit.IVisit;
 import org.apache.wicket.util.visit.IVisitor;
+import org.junit.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -253,7 +254,7 @@ public class BaseWicketTester
 	}
 
 	/**
-	 * Creates a <code>WicketTester</code>.
+	 * Creates a <code>WicketTester</code>. Constructor to keep compatibility.
 	 * 
 	 * @param application
 	 *            a <code>WicketTester</code> <code>WebApplication</code> object
@@ -262,20 +263,59 @@ public class BaseWicketTester
 	 */
 	public BaseWicketTester(final WebApplication application, final ServletContext servletCtx)
 	{
+		this(application, servletCtx, true);
+	}
+	
+	/**
+	 * Creates a <code>WicketTester</code>.
+	 * 
+	 * @param application
+	 *            a <code>WicketTester</code> <code>WebApplication</code> object
+	 * @param init
+	 *            force the application to be initialized (default = true)
+	 */
+	public BaseWicketTester(final WebApplication application, boolean init)
+	{
+		this(application, null, init);
+	}
+	
+	/**
+	 * Creates a <code>WicketTester</code>.
+	 * 
+	 * @param application
+	 *            a <code>WicketTester</code> <code>WebApplication</code> object
+	 * @param servletCtx
+	 *            the servlet context used as backend
+	 * @param init
+	 *            force the application to be initialized (default = true)
+	 */
+	public BaseWicketTester(final WebApplication application, final ServletContext servletCtx, boolean init)
+	{
+		// Assert the application is not null.
+		if(!init)
+		{
+			Assert.assertNotNull("WebApplication cannot be null",application);
+		}
+		
 		servletContext = servletCtx != null ? servletCtx
+			// If it's provided from the container it's not necessary to mock. 
+			: !init && application.getServletContext() != null ? application.getServletContext()
 			: new MockServletContext(application, null);
-
-		final FilterConfig filterConfig = new TestFilterConfig();
-		WicketFilter filter = new WicketFilter()
+		
+		// If using Arquillian and it's configured in a web.xml it'll be provided. If not, mock it.
+		if(application.getWicketFilter() == null)
 		{
-			@Override
-			public FilterConfig getFilterConfig()
+			final FilterConfig filterConfig = new TestFilterConfig();
+			WicketFilter filter = new WicketFilter()
 			{
-				return filterConfig;
-			}
-		};
-
-		application.setWicketFilter(filter);
+				@Override
+				public FilterConfig getFilterConfig()
+				{
+					return filterConfig;
+				}
+			};
+			application.setWicketFilter(filter);
+		}
 
 		httpSession = new MockHttpSession(servletContext);
 
@@ -283,15 +323,23 @@ public class BaseWicketTester
 
 		this.application = application;
 
-		// FIXME some tests are leaking applications by not calling destroy on them or overriding
-		// teardown() without calling super, for now we work around by making each name unique
-		application.setName("WicketTesterApplication-" + UUID.randomUUID());
+		// If it's provided from the container it's not necessary to set again.
+		if(init)
+		{
+			// FIXME some tests are leaking applications by not calling destroy on them or overriding
+			// teardown() without calling super, for now we work around by making each name unique
+			application.setName("WicketTesterApplication-" + UUID.randomUUID());
+		}
+		
 		ThreadContext.setApplication(application);
 
-		application.setServletContext(servletContext);
-
-		// initialize the application
-		application.initApplication();
+		// If it's provided from the container it's not necessary to set again and init.
+		if(init)
+		{
+			application.setServletContext(servletContext);
+			// initialize the application
+			application.initApplication();
+		}
 
 		// We don't expect any changes during testing. In addition we avoid creating
 		// ModificationWatcher threads tests.

http://git-wip-us.apache.org/repos/asf/wicket/blob/af093ab1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
index e860574..886a092 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java
@@ -221,7 +221,7 @@ public class WicketTester extends BaseWicketTester
 	}
 
 	/**
-	 * Creates a <code>WicketTester</code> to help unit testing.
+	 * Creates a <code>WicketTester</code> to help unit testing. Constructor to keep compatibility.
 	 * 
 	 * @param application
 	 *            a <code>WicketTester</code> <code>WebApplication</code> object
@@ -232,6 +232,34 @@ public class WicketTester extends BaseWicketTester
 	{
 		super(application, servletCtx);
 	}
+	
+	/**
+	 * Creates a <code>WicketTester</code> to help unit testing.
+	 * 
+	 * @param application
+	 *            a <code>WicketTester</code> <code>WebApplication</code> object
+	 * @param init
+	 *            force the application to be initialized (default = true)
+	 */
+	public WicketTester(WebApplication application, boolean init)
+	{
+		super(application, init);
+	}
+	
+	/**
+	 * Creates a <code>WicketTester</code> to help unit testing.
+	 * 
+	 * @param application
+	 *            a <code>WicketTester</code> <code>WebApplication</code> object
+	 * @param servletCtx
+	 *            the servlet context used as backend
+	 * @param init
+	 *            force the application to be initialized (default = true)
+	 */
+	public WicketTester(WebApplication application, ServletContext servletCtx, boolean init)
+	{
+		super(application, servletCtx, init);
+	}
 
 	/**
 	 * Asserts that the Ajax location header is present.


[02/14] wicket git commit: Update arquillian.xml

Posted by mg...@apache.org.
Update arquillian.xml

Updating the arquillian.xml to work with java 7 and so on.

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1fd79349
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1fd79349
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1fd79349

Branch: refs/heads/master
Commit: 1fd793496e4edef5b659dd55c9008b972a0e2040
Parents: 11b458b
Author: Felipe Campos de Almeida <fr...@gmail.com>
Authored: Sun Jun 21 11:12:22 2015 -0300
Committer: Felipe Campos de Almeida <fr...@gmail.com>
Committed: Sun Jun 21 11:12:22 2015 -0300

----------------------------------------------------------------------
 testing/wicket-arquillian/src/test/resources/arquillian.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/1fd79349/testing/wicket-arquillian/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/resources/arquillian.xml b/testing/wicket-arquillian/src/test/resources/arquillian.xml
index b709b61..6ae0d20 100644
--- a/testing/wicket-arquillian/src/test/resources/arquillian.xml
+++ b/testing/wicket-arquillian/src/test/resources/arquillian.xml
@@ -14,9 +14,9 @@
             <!-- JDK before 8: -XX:MaxPermSize=128m -XX -->
             <!-- JDK 8 and later: -XX:MaxMetaspaceSize=128m -->
             <!-- DEBUG MODE MANAGED: -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y -->
-    		<property name="javaVmArguments">-Xmx128m -XX:MaxMetaspaceSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
+    		<property name="javaVmArguments">-Xmx128m -XX:MaxPermSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
             </property>
     	</configuration>
     </container>
 
-</arquillian>
\ No newline at end of file
+</arquillian>


[14/14] wicket git commit: WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Posted by mg...@apache.org.
WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Add Apache licence headers


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ea1dc12e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ea1dc12e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ea1dc12e

Branch: refs/heads/master
Commit: ea1dc12e41c9f68322a56e3c1c271df4f0800a79
Parents: 967aeb4
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Jun 25 11:05:47 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jun 25 11:05:47 2015 +0300

----------------------------------------------------------------------
 .../arquillian/testing/dao/ContactDao.java      | 28 ++++++++++---
 .../arquillian/testing/dao/ContactDaoBean.java  | 33 +++++++++++----
 .../arquillian/testing/model/Contact.java       | 16 ++++++++
 .../arquillian/testing/pages/InsertContact.java | 41 ++++++++++++++-----
 .../arquillian/testing/pages/ListContacts.java  | 25 +++++++++---
 .../util/ResourceWebApplicationPath.java        | 13 +-----
 .../src/main/resources/META-INF/persistence.xml | 16 ++++++++
 .../src/main/webapp/WEB-INF/beans.xml           | 16 ++++++++
 .../src/main/webapp/WEB-INF/web.xml             | 16 ++++++++
 .../WEB-INF/wicket-arquillian-testing-ds.xml    | 16 ++++++++
 .../src/main/webapp/pages/InsertContact.html    | 17 ++++++++
 .../src/main/webapp/pages/ListContacts.html     | 17 ++++++++
 .../testing/ApacheLicenceHeaderTest.java        | 42 ++++++++++++++++++++
 .../src/test/resources/arquillian.xml           | 16 ++++++++
 .../src/test/webapp/WEB-INF/web.xml             | 16 ++++++++
 15 files changed, 288 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java
index 3615244..e2cd94c 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDao.java
@@ -1,4 +1,20 @@
 /*
+ * 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.
+ */
+/*
  * JBoss, Home of Professional Open Source
  * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
  * contributors by the @authors tag. See the copyright.txt in the
@@ -27,14 +43,14 @@ import org.apache.wicket.arquillian.testing.model.Contact;
  * @author Filippo Diotalevi
  */
 @Local
-public interface ContactDao {
-
+public interface ContactDao
+{
     /**
      * Returns the currently available contacts.
      *
      * @return every contact in the database
      */
-    public List<Contact> getContacts();
+    List<Contact> getContacts();
 
     /**
      * Returns a specific Contact from DB.
@@ -42,7 +58,7 @@ public interface ContactDao {
      * @param id The Id for the Contact
      * @return The specified Contact object
      */
-    public Contact getContact(Long id);
+    Contact getContact(Long id);
 
     /**
      * Persist a new Contact in the DB.
@@ -50,12 +66,12 @@ public interface ContactDao {
      * @param name The name of the new Contact
      * @param email The e-mail address of the new Contact
      */
-    public void addContact(String name, String email);
+    void addContact(String name, String email);
 
     /**
      * Removes a specific item from the DB.
      *
      * @param modelObject The specific Contact object, which we wants to remove
      */
-    public void remove(Contact modelObject);
+    void remove(Contact modelObject);
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java
index fb1cb08..a7982c1 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/dao/ContactDaoBean.java
@@ -1,4 +1,20 @@
 /*
+ * 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.
+ */
+/*
  * JBoss, Home of Professional Open Source
  * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
  * contributors by the @authors tag. See the copyright.txt in the
@@ -28,15 +44,15 @@ import org.apache.wicket.arquillian.testing.model.Contact;
  * A bean which manages Contact entities.
  */
 @Stateless
-public class ContactDaoBean implements ContactDao {
-
+public class ContactDaoBean implements ContactDao
+{
     @PersistenceContext
     private EntityManager em;
 
-
     @Override
     @SuppressWarnings("unchecked")
-    public List<Contact> getContacts() {
+    public List<Contact> getContacts()
+    {
         return em.createQuery("SELECT c FROM Contact c").getResultList();
     }
 
@@ -44,7 +60,8 @@ public class ContactDaoBean implements ContactDao {
      * Get Contact by ID.
      */
     @Override
-    public Contact getContact(Long id) {
+    public Contact getContact(Long id)
+    {
         return em.find(Contact.class, id);
     }
 
@@ -52,7 +69,8 @@ public class ContactDaoBean implements ContactDao {
      * Add a new Contact.
      */
     @Override
-    public void addContact(String name, String email) {
+    public void addContact(String name, String email)
+    {
         em.merge(new Contact(null, name, email));
     }
 
@@ -60,7 +78,8 @@ public class ContactDaoBean implements ContactDao {
      * Remove a Contact.
      */
     @Override
-    public void remove(Contact modelObject) {
+    public void remove(Contact modelObject)
+    {
         Contact managed = em.merge(modelObject);
         em.remove(managed);
         em.flush();

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
index 947333b..e5a2bcc 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
@@ -1,4 +1,20 @@
 /*
+ * 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.
+ */
+/*
  * JBoss, Home of Professional Open Source
  * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
  * contributors by the @authors tag. See the copyright.txt in the

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
index 902b6d6..e78831a 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
@@ -1,4 +1,20 @@
 /*
+ * 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.
+ */
+/*
  * JBoss, Home of Professional Open Source
  * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
  * contributors by the @authors tag. See the copyright.txt in the
@@ -31,8 +47,8 @@ import org.apache.wicket.model.PropertyModel;
  * @author Filippo Diotalevi
  */
 @SuppressWarnings("serial")
-public class InsertContact extends WebPage {
-    
+public class InsertContact extends WebPage
+{
     private Form<Contact> insertForm;
     
     private String name;
@@ -42,8 +58,8 @@ public class InsertContact extends WebPage {
     @Inject
     private ContactDao contactDao;
 
-    
-    public InsertContact() {
+    public InsertContact()
+    {
         add(new FeedbackPanel("feedback"));
 
         insertForm = new Form<Contact>("insertForm") {
@@ -55,28 +71,31 @@ public class InsertContact extends WebPage {
             }
         };
 
-        insertForm.add(new RequiredTextField<String>("name",
+        insertForm.add(new RequiredTextField<>("name",
                 new PropertyModel<String>(this, "name")));
-        insertForm.add(new RequiredTextField<String>("email", new PropertyModel<String>(this,
+        insertForm.add(new RequiredTextField<>("email", new PropertyModel<String>(this,
                 "email")));
         add(insertForm);
     }
 
     
-    public String getEmail() {
+    public String getEmail()
+    {
         return email;
     }
 
-    public void setEmail(String email) {
+    public void setEmail(String email)
+    {
         this.email = email;
     }
 
-    public String getName() {
+    public String getName()
+    {
         return name;
     }
 
-    public void setName(String name) {
+    public void setName(String name)
+    {
         this.name = name;
     }
-
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
index 4694438..f08ff55 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
@@ -1,4 +1,20 @@
 /*
+ * 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.
+ */
+/*
  * JBoss, Home of Professional Open Source
  * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
  * contributors by the @authors tag. See the copyright.txt in the
@@ -33,8 +49,8 @@ import org.apache.wicket.markup.html.list.ListView;
  * @author Filippo Diotalevi
  */
 @SuppressWarnings("serial")
-public class ListContacts extends WebPage {
-
+public class ListContacts extends WebPage
+{
     // Inject the ContactDao using @Inject
     @Inject
     private ContactDao contactDao;
@@ -43,8 +59,8 @@ public class ListContacts extends WebPage {
     private String welcome;
 
     // Set up the dynamic behavior for the page, widgets bound by id
-    public ListContacts() {
-
+    public ListContacts()
+    {
         // Add the dynamic welcome message, specified in web.xml
         add(new Label("welcomeMessage", welcome));
         add(new ListView<Contact>("contacts", contactDao.getContacts()) {
@@ -66,5 +82,4 @@ public class ListContacts extends WebPage {
             }
         });
     }
-
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
index 292c771..d647626 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
@@ -29,8 +29,6 @@ import org.apache.wicket.util.resource.IResourceStream;
  * Maintain a list of paths which might either be ordinary folders of the filesystem or relative
  * paths to the web application's servlet context.
  * 
- * @author Johan Compagner
- * 
  * @author felipecalmeida
  * 		Modified to look inside servletContext and same package as Application.
  */
@@ -56,14 +54,10 @@ public final class ResourceWebApplicationPath implements IResourceFinder
 		this.servletContext = servletContext;
 	}
 
-	/**
-	 * 
-	 * @see org.apache.wicket.util.file.IResourceFinder#find(Class, String)
-	 */
+	@Override
 	public IResourceStream find(final Class<?> clazz, final String pathname)
 	{
-
-		if (pathname.startsWith(WEB_INF) == false)
+		if (pathname != null && pathname.startsWith(WEB_INF) == false)
 		{
 			try
 			{
@@ -82,9 +76,6 @@ public final class ResourceWebApplicationPath implements IResourceFinder
 		return null;
 	}
 
-	/**
-	 * @see java.lang.Object#toString()
-	 */
 	@Override
 	public String toString()
 	{

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml b/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
index e42cebe..49b98fb 100644
--- a/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
+++ b/testing/wicket-arquillian/src/main/resources/META-INF/persistence.xml
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+   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.
+-->
+<!--
     JBoss, Home of Professional Open Source
     Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
     contributors by the @authors tag. See the copyright.txt in the

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml
index e7488ad..8c6322f 100644
--- a/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/beans.xml
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+   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.
+-->
+<!--
     JBoss, Home of Professional Open Source
     Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
     contributors by the @authors tag. See the copyright.txt in the

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
index cafe4bd..1118849 100644
--- a/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/web.xml
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+   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.
+-->
+<!--
     JBoss, Home of Professional Open Source
     Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
     contributors by the @authors tag. See the copyright.txt in the

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml b/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml
index af137fe..cc13b92 100644
--- a/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml
+++ b/testing/wicket-arquillian/src/main/webapp/WEB-INF/wicket-arquillian-testing-ds.xml
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+   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.
+-->
+<!--
     JBoss, Home of Professional Open Source
     Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
     contributors by the @authors tag. See the copyright.txt in the

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html b/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html
index 309531e..a9636b2 100644
--- a/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html
+++ b/testing/wicket-arquillian/src/main/webapp/pages/InsertContact.html
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+   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.
+-->
 <!--
     JBoss, Home of Professional Open Source
     Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html b/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html
index d6613bd..b2bb4ca 100644
--- a/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html
+++ b/testing/wicket-arquillian/src/main/webapp/pages/ListContacts.html
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+   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.
+-->
 <!--
     JBoss, Home of Professional Open Source
     Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java
new file mode 100644
index 0000000..ac5aa02
--- /dev/null
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+package org.apache.wicket.arquillian.testing;
+
+import java.util.Arrays;
+
+import org.apache.wicket.util.license.ApacheLicenseHeaderTestCase;
+
+/**
+ * Test that the license headers are in place in this project. The tests are run
+ * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
+ * tests here if needed.
+ * 
+ * @author Frank Bille Jensen (frankbille)
+ */
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
+	/**
+	 * Construct.
+	 */
+	public ApacheLicenceHeaderTest()
+	{
+//		xmlIgnore.add(".settings");
+//		xmlIgnore.add("src/main/resources/META-INF/beans.xml");
+//		xmlIgnore.add("src/test/java/simplelogger.properties");
+//		xmlPrologIgnore = Arrays.asList("src");
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/resources/arquillian.xml b/testing/wicket-arquillian/src/test/resources/arquillian.xml
index e80f901..ae8ef29 100644
--- a/testing/wicket-arquillian/src/test/resources/arquillian.xml
+++ b/testing/wicket-arquillian/src/test/resources/arquillian.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
 <arquillian xmlns="http://jboss.org/schema/arquillian"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

http://git-wip-us.apache.org/repos/asf/wicket/blob/ea1dc12e/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml b/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
index 4266a83..54c8105 100644
--- a/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
+++ b/testing/wicket-arquillian/src/test/webapp/WEB-INF/web.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
 <!-- JBoss, Home of Professional Open Source Copyright 2013, Red Hat, Inc. 
 	and/or its affiliates, and individual contributors by the @authors tag. See 
 	the copyright.txt in the distribution for a full listing of individual contributors. 


[07/14] wicket git commit: Update TestWicketJavaEEApplication.java

Posted by mg...@apache.org.
Update TestWicketJavaEEApplication.java

Indentation.

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/192f5147
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/192f5147
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/192f5147

Branch: refs/heads/master
Commit: 192f514762f772ee9765d95c18abdd20c255e879
Parents: 42e9231
Author: Felipe Campos de Almeida <fr...@gmail.com>
Authored: Tue Jun 23 15:24:12 2015 -0300
Committer: Felipe Campos de Almeida <fr...@gmail.com>
Committed: Tue Jun 23 15:24:12 2015 -0300

----------------------------------------------------------------------
 .../arquillian/testing/TestWicketJavaEEApplication.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/192f5147/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
index cb2cdf8..9f2d146 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
@@ -27,9 +27,9 @@ import org.apache.wicket.arquillian.testing.util.ResourceWebApplicationPath;
 public class TestWicketJavaEEApplication extends WicketJavaEEApplication {
   
 	// Has some security ignores during the test (example: accept all roles).
-	
-	@Override
-	protected void initResourceFinder() {
+    
+    @Override
+    protected void initResourceFinder() {
     	getResourceSettings().getResourceFinders().add(new ResourceWebApplicationPath(TestWicketJavaEEApplication.class.getPackage().getName(), getServletContext()));
-	}
+    }
 }


[12/14] wicket git commit: WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Posted by mg...@apache.org.
WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Fix Maven warning


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a458b494
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a458b494
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a458b494

Branch: refs/heads/master
Commit: a458b494f5869846def6c191175100aff8794bc5
Parents: e4ee5b7
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Jun 25 10:40:53 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jun 25 10:40:53 2015 +0300

----------------------------------------------------------------------
 testing/wicket-arquillian/pom.xml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/a458b494/testing/wicket-arquillian/pom.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml
index 31afa72..6630542 100644
--- a/testing/wicket-arquillian/pom.xml
+++ b/testing/wicket-arquillian/pom.xml
@@ -267,9 +267,7 @@
 				<artifactId>wildfly-maven-plugin</artifactId>
 				<version>${version.wildfly.maven.plugin}</version>
 				<configuration>
-					<fileNames>
-						<fileName>target/${project.build.finalName}.war</fileName>
-					</fileNames>
+					<filename>target/${project.build.finalName}.war</filename>
 				</configuration>
 			</plugin>
 			<plugin>


[10/14] wicket git commit: WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Posted by mg...@apache.org.
WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Use the configured version of WildFly in arquillian.xml


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d3765b1e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d3765b1e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d3765b1e

Branch: refs/heads/master
Commit: d3765b1eb99c4ee39ab1f19643aa49f730938d52
Parents: 8c3854d
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Jun 25 10:14:58 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jun 25 10:14:58 2015 +0300

----------------------------------------------------------------------
 testing/wicket-arquillian/src/test/resources/arquillian.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/d3765b1e/testing/wicket-arquillian/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/resources/arquillian.xml b/testing/wicket-arquillian/src/test/resources/arquillian.xml
index cca5a0c..e80f901 100644
--- a/testing/wicket-arquillian/src/test/resources/arquillian.xml
+++ b/testing/wicket-arquillian/src/test/resources/arquillian.xml
@@ -10,7 +10,7 @@
     
     <container qualifier="wildfly" default="true">
     	<configuration>
-    		<property name="jbossHome">target/wildfly-8.1.0.Final</property>
+    		<property name="jbossHome">target/wildfly-${version.wildfly_8}</property>
             <!-- DEBUG MODE MANAGED: -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -->
     		<property name="javaVmArguments">-Xmx128m -XX:MaxPermSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
             </property>


[13/14] wicket git commit: WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Posted by mg...@apache.org.
WICKET-5926 Arquillian Support with Container ServletContext in BaseWicketTester/WicketTester.

Mark Arquillian tests as slow tests so they are not executed when running with -Pfast profile


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/967aeb42
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/967aeb42
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/967aeb42

Branch: refs/heads/master
Commit: 967aeb42526f86e08db4bfc4b335acb2f96bf8d2
Parents: a458b49
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Jun 25 10:43:58 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jun 25 10:43:58 2015 +0300

----------------------------------------------------------------------
 .../arquillian/testing/deployment/AbstractDeploymentTest.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/967aeb42/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
index 268d098..9108d1e 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
@@ -25,6 +25,7 @@ import javax.servlet.ServletContext;
 
 import org.apache.wicket.arquillian.testing.TestWicketJavaEEApplication;
 import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.util.SlowTests;
 import org.apache.wicket.util.tester.WicketTester;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.shrinkwrap.api.Filters;
@@ -34,6 +35,7 @@ import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
 import org.jboss.shrinkwrap.api.importer.ExplodedImporter;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,6 +51,7 @@ import org.slf4j.LoggerFactory;
  * @since 06/23/2015
  *
  */
+@Category(SlowTests.class)
 public abstract class AbstractDeploymentTest {
 	
 	private static final Logger log = LoggerFactory.getLogger(AbstractDeploymentTest.class);