Skip to content

Commit b527a0b

Browse files
committed
Use JSF as direct welcome file
1 parent 4d31fdd commit b527a0b

File tree

5 files changed

+66
-118
lines changed

5 files changed

+66
-118
lines changed

greeter/pom.xml

Lines changed: 44 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1919
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2020
<modelVersion>4.0.0</modelVersion>
21+
<parent>
22+
<groupId>org.wildfly.quickstarts</groupId>
23+
<artifactId>wildfly-quickstarts-parent</artifactId>
24+
<version>8.0.0-SNAPSHOT</version>
25+
<relativePath>../pom.xml</relativePath>
26+
</parent>
2127

22-
<groupId>org.wildfly.quickstarts</groupId>
2328
<artifactId>wildfly-greeter</artifactId>
24-
<version>8.0.0-SNAPSHOT</version>
2529
<packaging>war</packaging>
2630
<name>WildFly Quickstarts: Greeter</name>
2731
<description>WildFly Quickstarts: Greeter</description>
@@ -35,94 +39,72 @@
3539
</license>
3640
</licenses>
3741

38-
<properties>
39-
<!-- Explicitly declaring the source encoding eliminates the following
40-
message: -->
41-
<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
42-
resources, i.e. build is platform dependent! -->
43-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44-
45-
<!-- JBoss dependency versions -->
46-
47-
<version.wildfly.maven.plugin>1.0.0.Final</version.wildfly.maven.plugin>
48-
49-
<version.jboss.spec.javaee.7.0>1.0.0.Final</version.jboss.spec.javaee.7.0>
50-
51-
52-
<!-- other plugin versions -->
53-
<version.compiler.plugin>2.3.1</version.compiler.plugin>
54-
<version.war.plugin>2.1.1</version.war.plugin>
55-
56-
<!-- maven-compiler-plugin -->
57-
<maven.compiler.target>1.6</maven.compiler.target>
58-
<maven.compiler.source>1.6</maven.compiler.source>
59-
</properties>
6042

6143
<dependencyManagement>
6244
<dependencies>
63-
<!-- Define the version of JBoss' Java EE 7 APIs we want to import.
64-
Any dependencies from org.jboss.spec will have their version defined by this
65-
BOM -->
66-
<!-- JBoss distributes a complete set of Java EE 7 APIs including
67-
a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
68-
a collection) of artifacts. We use this here so that we always get the correct
69-
versions of artifacts. Here we use the jboss-javaee-7.0 stack (you can
70-
read this as the JBoss stack of the Java EE 7 APIs). You can actually
71-
use this stack with any version of WildFly that implements Java EE 7, not
72-
just WildFly 8! -->
73-
<dependency>
74-
<groupId>org.jboss.spec</groupId>
75-
<artifactId>jboss-javaee-7.0</artifactId>
76-
<version>${version.jboss.spec.javaee.7.0}</version>
77-
<type>pom</type>
78-
<scope>import</scope>
79-
</dependency>
45+
<!-- Define the version of JBoss' Java EE 7 APIs we want to import.
46+
Any dependencies from org.jboss.spec will have their version defined by this
47+
BOM -->
48+
<!-- JBoss distributes a complete set of Java EE 7 APIs including
49+
a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
50+
a collection) of artifacts. We use this here so that we always get the correct
51+
versions of artifacts. Here we use the jboss-javaee-7.0 stack (you can
52+
read this as the JBoss stack of the Java EE 7 APIs). You can actually
53+
use this stack with any version of WildFly that implements Java EE 7, not
54+
just WildFly 8! -->
55+
<dependency>
56+
<groupId>org.jboss.spec</groupId>
57+
<artifactId>jboss-javaee-7.0</artifactId>
58+
<version>${version.jboss.spec.javaee.7.0}</version>
59+
<type>pom</type>
60+
<scope>import</scope>
61+
</dependency>
8062
</dependencies>
8163
</dependencyManagement>
8264

8365
<dependencies>
8466

8567
<!-- Import the CDI API, we use provided scope as the API is included in JBoss WildFly -->
8668
<dependency>
87-
<groupId>javax.enterprise</groupId>
88-
<artifactId>cdi-api</artifactId>
89-
<scope>provided</scope>
69+
<groupId>javax.enterprise</groupId>
70+
<artifactId>cdi-api</artifactId>
71+
<scope>provided</scope>
9072
</dependency>
9173

9274
<!-- Import the Common Annotations API (JSR-250), we use provided scope
9375
as the API is included in JBoss WildFly -->
9476
<dependency>
95-
<groupId>org.jboss.spec.javax.annotation</groupId>
96-
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
97-
<scope>provided</scope>
77+
<groupId>org.jboss.spec.javax.annotation</groupId>
78+
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
79+
<scope>provided</scope>
9880
</dependency>
9981

10082
<!-- Import the JSF API, we use provided scope as the API is included in JBoss WildFly -->
10183
<dependency>
102-
<groupId>org.jboss.spec.javax.faces</groupId>
103-
<artifactId>jboss-jsf-api_2.2_spec</artifactId>
104-
<scope>provided</scope>
84+
<groupId>org.jboss.spec.javax.faces</groupId>
85+
<artifactId>jboss-jsf-api_2.2_spec</artifactId>
86+
<scope>provided</scope>
10587
</dependency>
10688

10789
<!-- Import the JPA API, we use provided scope as the API is included in JBoss WildFly -->
10890
<dependency>
109-
<groupId>org.hibernate.javax.persistence</groupId>
110-
<artifactId>hibernate-jpa-2.1-api</artifactId>
111-
<scope>provided</scope>
91+
<groupId>org.hibernate.javax.persistence</groupId>
92+
<artifactId>hibernate-jpa-2.1-api</artifactId>
93+
<scope>provided</scope>
11294
</dependency>
11395

11496
<!-- Import the JPA API, we use provided scope as the API is included in JBoss WildFly -->
11597
<dependency>
116-
<groupId>org.jboss.spec.javax.transaction</groupId>
117-
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
118-
<scope>provided</scope>
98+
<groupId>org.jboss.spec.javax.transaction</groupId>
99+
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
100+
<scope>provided</scope>
119101
</dependency>
120102

121103
<!-- Import the EJB API, we use provided scope as the API is included in JBoss WildFly -->
122104
<dependency>
123-
<groupId>org.jboss.spec.javax.ejb</groupId>
124-
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
125-
<scope>provided</scope>
105+
<groupId>org.jboss.spec.javax.ejb</groupId>
106+
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
107+
<scope>provided</scope>
126108
</dependency>
127109

128110
</dependencies>
@@ -132,31 +114,16 @@
132114
is deployed -->
133115
<finalName>${project.artifactId}</finalName>
134116
<plugins>
135-
<plugin>
136-
<artifactId>maven-war-plugin</artifactId>
137-
<version>${version.war.plugin}</version>
138-
<configuration>
139-
<!-- Java EE 7 doesn't require web.xml, Maven needs to catch
140-
up! -->
141-
<failOnMissingWebXml>false</failOnMissingWebXml>
142-
</configuration>
143-
</plugin>
144117
<!-- WildFly plugin to deploy war -->
145118
<plugin>
146119
<groupId>org.wildfly.plugins</groupId>
147120
<artifactId>wildfly-maven-plugin</artifactId>
148121
<version>${version.wildfly.maven.plugin}</version>
149-
</plugin>
150-
<!-- Compiler plugin enforces Java 1.6 compatibility and activates
151-
annotation processors -->
152-
<plugin>
153-
<artifactId>maven-compiler-plugin</artifactId>
154-
<version>${version.compiler.plugin}</version>
155122
<configuration>
156-
<source>${maven.compiler.source}</source>
157-
<target>${maven.compiler.target}</target>
123+
<skip>false</skip>
158124
</configuration>
159125
</plugin>
126+
160127
</plugins>
161128
</build>
162129

greeter/src/main/webapp/WEB-INF/faces-config.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
limitations under the License.
1717
-->
1818
<!-- Marker file indicating JSF should be enabled -->
19-
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
20-
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
19+
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
22+
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
23+
version="2.2">
2224

2325
</faces-config>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
3+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
4+
<display-name>helloJSF</display-name>
5+
<welcome-file-list>
6+
<welcome-file>faces/greet.xhtml</welcome-file>
7+
</welcome-file-list>
8+
<!-- <servlet>
9+
<servlet-name>Faces Servlet</servlet-name>
10+
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
11+
</servlet>
12+
<servlet-mapping>
13+
<servlet-name>Faces Servlet</servlet-name>
14+
<url-pattern>*.jsf</url-pattern>
15+
</servlet-mapping>-->
16+
</web-app>

greeter/src/main/webapp/index.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.jboss</groupId>
2323
<artifactId>jboss-parent</artifactId>
24-
<version>8</version>
24+
<version>12</version>
2525
<relativePath />
2626
</parent>
2727
<groupId>org.wildfly.quickstarts</groupId>
@@ -73,22 +73,8 @@
7373
<version.org.apache.wicket>1.5.5</version.org.apache.wicket>
7474
<version.net.ftlines.wicket-cdi>1.2</version.net.ftlines.wicket-cdi>
7575
<version.ro.isdc.wro4j>1.4.4</version.ro.isdc.wro4j>
76-
77-
<!-- other plugin versions -->
78-
<version.bundle.plugin>2.3.4</version.bundle.plugin>
79-
<version.clean.plugin>2.4.1</version.clean.plugin>
80-
<version.compiler.plugin>2.3.1</version.compiler.plugin>
81-
<version.ear.plugin>2.6</version.ear.plugin>
82-
<version.ejb.plugin>2.3</version.ejb.plugin>
83-
<version.exec.plugin>1.2.1</version.exec.plugin>
84-
<version.jar.plugin>2.2</version.jar.plugin>
8576
<version.org.codehaus.mojo.gwt.maven.plugin>2.4.0</version.org.codehaus.mojo.gwt.maven.plugin>
86-
<version.surefire.plugin>2.10</version.surefire.plugin>
87-
<version.war.plugin>2.1.1</version.war.plugin>
8877

89-
<!-- maven-compiler-plugin -->
90-
<maven.compiler.target>1.6</maven.compiler.target>
91-
<maven.compiler.source>1.6</maven.compiler.source>
9278
</properties>
9379

9480
<build>

0 commit comments

Comments
 (0)