Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Continue moving examples over to a tested format.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmcwhirter committed Nov 30, 2015
1 parent a4f2cb7 commit 94b73bc
Show file tree
Hide file tree
Showing 19 changed files with 151 additions and 42 deletions.
File renamed without changes.
22 changes: 15 additions & 7 deletions jsf-shrinkwrap/pom.xml → jsf/jsf-shrinkwrap/pom.xml
Expand Up @@ -10,15 +10,15 @@

<parent>
<groupId>org.wildfly.swarm.examples</groupId>
<artifactId>wildfly-swarm-examples-parent</artifactId>
<artifactId>examples-jsf</artifactId>
<version>1.0.0.Alpha6-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

<artifactId>wildfly-swarm-example-jsf-shrinkwrap</artifactId>
<artifactId>example-jsf-shrinkwrap</artifactId>

<name>WildFly Swarm Examples: JSF Shrinkwrap</name>
<description>WildFly Swarm Examples: JSF Shrinkwrap</description>
<name>WildFly Swarm Examples: JSF ShrinkWrap</name>
<description>WildFly Swarm Examples: JSF ShrinkWrap</description>

<packaging>jar</packaging>

Expand All @@ -32,16 +32,24 @@
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
<id>package</id>
</execution>
<execution>
<id>start</id>
</execution>
<execution>
<id>stop</id>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.wildfly.swarm.examples</groupId>
<artifactId>examples-base</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-jsf</artifactId>
Expand Down
@@ -0,0 +1,28 @@
package org.wildfly.swarm.it.jsf;

import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
import org.wildfly.swarm.it.AbstractIntegrationTest;

import static org.fest.assertions.Assertions.assertThat;

/**
* @author Bob McWhirter
*/
@RunWith(Arquillian.class)
public class JSFApplicationIT extends AbstractIntegrationTest {

@Drone
WebDriver browser;

@Test
public void testIt() {
browser.navigate().to("http://localhost:8080/");
assertThat(browser.getPageSource()).contains("WildFly Swarm Facelet");
assertThat(browser.getPageSource()).contains("Hello from JSF");
assertThat(browser.getPageSource()).contains("Powered by WildFly Swarm");
}
}
File renamed without changes.
70 changes: 70 additions & 0 deletions jsf/jsf-war/pom.xml
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Red Hat, Inc. and/or its affiliates.
~
~ Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly.swarm.examples</groupId>
<artifactId>examples-jsf</artifactId>
<version>1.0.0.Alpha6-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

<artifactId>example-jsf-war</artifactId>

<name>WildFly Swarm Examples: JSF .war</name>
<description>WildFly Swarm Examples: JSF .war</description>

<packaging>war</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<packagingExcludes>WEB-INF/lib/wildfly-swarm-*.jar</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<executions>
<execution>
<id>package</id>
</execution>
<execution>
<id>start</id>
</execution>
<execution>
<id>stop</id>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.wildfly.swarm.examples</groupId>
<artifactId>examples-base</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-jsf</artifactId>
<version>${version.wildfly-swarm}</version>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-weld</artifactId>
<version>${version.wildfly-swarm}</version>
</dependency>
</dependencies>

</project>
@@ -0,0 +1,28 @@
package org.wildfly.swarm.it.jsf;

import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
import org.wildfly.swarm.it.AbstractIntegrationTest;

import static org.fest.assertions.Assertions.assertThat;

/**
* @author Bob McWhirter
*/
@RunWith(Arquillian.class)
public class JSFApplicationIT extends AbstractIntegrationTest {

@Drone
WebDriver browser;

@Test
public void testIt() {
browser.navigate().to("http://localhost:8080/");
assertThat(browser.getPageSource()).contains("WildFly Swarm Facelet");
assertThat(browser.getPageSource()).contains("Hello from JSF");
assertThat(browser.getPageSource()).contains("Powered by WildFly Swarm");
}
}
File renamed without changes.
File renamed without changes.
43 changes: 9 additions & 34 deletions jsf/pom.xml
Expand Up @@ -15,41 +15,16 @@
<relativePath>../</relativePath>
</parent>

<artifactId>wildfly-swarm-example-jsf</artifactId>
<artifactId>examples-jsf</artifactId>

<name>WildFly Swarm Examples: JSF</name>
<description>WildFly Swarm Examples: JSF</description>
<name>WildFly Swarm Examples: JSR parent</name>
<description>WildFly Swarm Examples: JSF parent</description>

<packaging>war</packaging>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<packagingExcludes>WEB-INF/lib/wildfly-swarm-*.jar</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-jsf</artifactId>
<version>${version.wildfly-swarm}</version>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-weld</artifactId>
<version>${version.wildfly-swarm}</version>
</dependency>
</dependencies>

</project>
<modules>
<module>jsf-war</module>
<module>jsf-shrinkwrap</module>
</modules>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -150,6 +150,7 @@

<module>jaxrs</module>
<module>jpa</module>
<module>jsf</module>
<module>msc</module>
<!--
<module>cdi-servlet</module>
Expand All @@ -161,7 +162,6 @@
<module>jpa-jaxrs-cdi-shrinkwrap2</module>
<module>jpa-servlet</module>
<module>jpa-servlet-shrinkwrap</module>
<module>jsf</module>
<module>jsf-shrinkwrap</module>
<module>kitchensink-html5-mobile</module>
<module>messaging</module>
Expand Down

0 comments on commit 94b73bc

Please sign in to comment.