Nov 8, 2018

Maven dependency for CDI, JSF, EJB, JTA, JAX-RS and Arquillian provided by JBoss EAP 6 / Wildfly 8

       <!-- Import the CDI API, we use provided scope as the API is included in
           JBoss EAP 6 -->
       <dependency>
           <groupId>javax.enterprise</groupId>
           <artifactId>cdi-api</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- Import the Common Annotations API (JSR-250), we use provided scope
           as the API is included in JBoss EAP 6 -->
       <dependency>
           <groupId>org.jboss.spec.javax.annotation</groupId>
           <artifactId>jboss-annotations-api_1.1_spec</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- Import the JAX-RS API, we use provided scope as the API is included
           in JBoss EAP 6 -->
       <dependency>
           <groupId>org.jboss.spec.javax.ws.rs</groupId>
           <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- Import the JPA API, we use provided scope as the API is included in
           JBoss EAP 6 -->
       <dependency>
           <groupId>org.hibernate.javax.persistence</groupId>
           <artifactId>hibernate-jpa-2.0-api</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- Import the EJB API, we use provided scope as the API is included in
           JBoss EAP 6 -->
       <dependency>
           <groupId>org.jboss.spec.javax.ejb</groupId>
           <artifactId>jboss-ejb-api_3.1_spec</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- JSR-303 (Bean Validation) Implementation -->
       <!-- Provides portable constraints such as @Email -->
       <!-- Hibernate Validator is shipped in JBoss EAP 6 -->
       <dependency>
           <groupId>org.hibernate</groupId>
           <artifactId>hibernate-validator</artifactId>
           <scope>provided</scope>
           <exclusions>
               <exclusion>
                   <groupId>org.slf4j</groupId>
                   <artifactId>slf4j-api</artifactId>
               </exclusion>
           </exclusions>
       </dependency>

       <!-- Import the JSF API, we use provided scope as the API is included in
           JBoss EAP 6 -->
       <dependency>
           <groupId>org.jboss.spec.javax.faces</groupId>
           <artifactId>jboss-jsf-api_2.1_spec</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- Now we declare any tools needed -->

       <!-- Annotation processor to generate the JPA 2.0 metamodel classes for
           typesafe criteria queries -->
       <dependency>
           <groupId>org.hibernate</groupId>
           <artifactId>hibernate-jpamodelgen</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- Annotation processor that raising compilation errors whenever constraint
           annotations are incorrectly used. -->
       <dependency>
           <groupId>org.hibernate</groupId>
           <artifactId>hibernate-validator-annotation-processor</artifactId>
           <scope>provided</scope>
       </dependency>

       <!-- Needed for running tests (you may also use TestNG) -->
       <dependency>
           <groupId>junit</groupId>
           <artifactId>junit</artifactId>
           <scope>test</scope>
       </dependency>

       <!-- Optional, but highly recommended -->
       <!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA)
           JPA from JUnit/TestNG -->
       <dependency>
           <groupId>org.jboss.arquillian.junit</groupId>
           <artifactId>arquillian-junit-container</artifactId>
           <scope>test</scope>
       </dependency>

       <dependency>
           <groupId>org.jboss.arquillian.protocol</groupId>
           <artifactId>arquillian-protocol-servlet</artifactId>
           <scope>test</scope>
       </dependency>