Front-end

A contiunación el cliente que va a consumir el coapi se va a realizar en jsf y primefaces.
Abrimos nuestro IDE eclipse y seleccionamos en File->New->Maven Project
clean service
Seleccionamos en Create a simple project y presionamos Next
Login Test
LLenamos los siguientes campos y presionamos Finish: liga azteca
Marca un error en los módulos porque no tiene el archivo web.xml , pero lo solucionaremos de la siguiente manera, hacemos clic derecho en el proyecto y selecionamos Properties
clean service
Seleccionamos Project Facets en el recuadro seleccionamos Dynamic Web Module 3.1 y Java Server Faces 2.2 y presionamos Apply posteriormente OK Login Test
Nos vamos al directorio src/main/webapp nos vamos a la carpeta WEB-INF y modificamos el web.xml
 
  
  <?xml version="1.0" encoding="UTF-8"?>
<web-app xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="3.1">
<display-name>ligaaztecaadmin</display-name>
<absolute-ordering/>
<!-- load spring configuration -->
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>arya</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/login.xhtml</welcome-file>
</welcome-file-list>
</web-app>
  
     
   

Nos vamos al archivo pom.xml y escribimos lo siguiente
 
             
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
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>
  <groupId>com.tutosoftware.clientaccess</groupId>
  <artifactId>clientaccess</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>Cliente Access</name>
  <repositories>
    <repository>
        <id>prime-repo</id>
        <name>PrimeFaces Maven Repository</name>
        <url>http://repository.primefaces.org/</url>
        <layout>default</layout>
    </repository>
</repositories>
  <properties>
        
	    <primefaces.version>13.0.1</primefaces.version>
		<jsf2.version>2.2.10</jsf2.version>
		<jstl.version>1.2</jstl.version>
		<jsp-api.version>2.1</jsp-api.version>
		<servlet-api.version>3.1.0</servlet-api.version>
		<itext.version>2.1.7</itext.version>
		<poi.version>3.17</poi.version>
		<elri.version>1.0</elri.version>
		<javaeewebapi.version>7.0</javaeewebapi.version>
	</properties>
 
 
 <dependencies>
 
 <dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>${primefaces.version}</version>
     </dependency>
     
		
		
		<dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.18</version>
        <scope>provided</scope>
    </dependency>
			
		
		<dependency>
			<groupId>com.sun.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>${jsf2.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.faces</groupId>
			<artifactId>jsf-impl</artifactId>
			<version>${jsf2.version}</version>
		</dependency>
		
			
		
		 <dependency>
				<groupId>javax.servlet.jsp</groupId>
				<artifactId>jsp-api</artifactId>
				<version>${jsp-api.version}</version>
				<scope>provided</scope>
			</dependency>
			
			
         <dependency>
	     <groupId>javax.servlet</groupId>
	    <artifactId>javax.servlet-api</artifactId>
	   <version>${servlet-api.version}</version>
        </dependency>
			
			
			
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>jstl</artifactId>
				<version>${jstl.version}</version>
			</dependency>
		
     <dependency>
			<groupId>com.sun.el</groupId>
			<artifactId>el-ri</artifactId>
			<version>${elri.version}</version>
		</dependency>
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-web-api</artifactId>
			<version>${javaeewebapi.version}</version>
			<scope>provided</scope>
		</dependency>
 
  
  <dependency>
    <groupId>com.lowagie</groupId>
    <artifactId>itext</artifactId>
    <version>${itext.version}</version>
</dependency>
     
   <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>${poi.version}</version>
</dependency>



   <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>javax.ws.rs-api</artifactId>
      <version>2.0</version>
   </dependency>
  
  <dependency>
 <groupId>org.glassfish.jersey.core</groupId>
 <artifactId>jersey-client</artifactId>
 <version>2.12</version>
 </dependency>
 
 <dependency>
 <groupId>org.glassfish.jersey.media</groupId>
 <artifactId>jersey-media-json-jackson</artifactId>
 <version>2.25</version>
 </dependency>
 
 <dependency>
    <groupId>com.fasterxml.jackson.datatype</groupId>
    <artifactId>jackson-datatype-jsr310</artifactId>
    <version>2.9.8</version>
      
</dependency>
 
 
 <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.9.8</version>
</dependency>
 
 <dependency>
    <groupId>com.fasterxml.jackson.module</groupId>
    <artifactId>jackson-module-parameter-names</artifactId>
    <version>2.9.8</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.datatype</groupId>
    <artifactId>jackson-datatype-jdk8</artifactId>
    <version>2.9.8</version>
</dependency>
  
 
 
 
 </dependencies>
 
 <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
           <source>1.8</source>
           <target>1.8</target>
        </configuration>
      </plugin> 
    </plugins>
   </build>
</project>