Most of the required configuration for the jboss-ejb3-web
subproject is pre-specified. The packaging for the jboss-ejb3-web
artifacts is set to war
:
<artifactId>jboss-ejb3-web</artifactId> <packaging>war</packaging> <name>jboss-ejb3 Web module</name>
The pom.xml
file for the subproject pre-specifies most of the required dependencies. It also specifies dependency on the jboss-ejb3-ejb
artifact:
<dependency> <groupId>org.jboss.ejb3</groupId> <artifactId>jboss-ejb3-ejb</artifactId> <type>ejb</type> <version>1.0.0</version> <scope>provided</scope> </dependency>
The EJB 3.1 API, the JPA 2.0 API, the JSF 2.1 API, and the JAX-RS 1.1 API are provided by the WildFly 8.x server, as indicated by the provided
scope in the dependency
declarations. Add the dependency on the hibernate-annotations
artifact. The build is preconfigured with the Maven WAR
plugin, which is required to package the subproject into an WAR
file:
<?xml version="1.0" encoding="UTF-8"?> <build> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>${version.war.plugin}</version> <configuration> <!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! --> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> </plugins> </build>
The pom.xml
file for the jboss-ejb3-web
subproject is available in the code downloaded for the chapter.