Deploying the web project with Maven

The Java EE web project we created is based on Maven. It includes pom.xml to build, compile, and package the web application. The default project in WildFly 8.1 is a Java EE 7 version. As the Java EE project is a web project, the packaging gets specified as war in pom.xml. The Group Id and Artifact Id attributes that we specified in creating a Java EE web project get configured in pom.xml as well. As we are using MySQL database, we need to add the dependency on the MySQL JDBC driver:

<dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>5.1.22</version>
</dependency>

The dependency on the Java EE 7 JSF 2.2 API, which is provided by WildFly 8.1, is included in pom.xml by ...

Get Advanced Java® EE Development with WildFly® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.