# Maven pom.xml

Editamos el archivo pom.xml y agregamos el repositorio

```
   <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
  </repository>
```

Agregar jmoordbunit

```
       <dependency>
        <groupId>com.github.avbravo</groupId>
        <artifactId>jmoordbunit</artifactId>
        <version>0.4.4</version>
    </dependency>
```

Actualizar la versiòn de primefaces

```
     <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>6.2</version>
        </dependency>
```

Dar clic derecho y seleccionar en **Dependencies-**-> **Add dependency**...

![](https://119655977-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc1Wg6ni0R6l7RuGH7f%2F-Lc1WimEKh7cRoxzlSLb%2F-Lc1WoZqyrQJCSaAd5iZ%2Fadd2.png?generation=1554820587398005\&alt=media)

Buscamos microtestingejb

![](https://119655977-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc1Wg6ni0R6l7RuGH7f%2F-Lc1WimEKh7cRoxzlSLb%2F-Lc1WoZsmhXhkknJ4Vs6%2Fmicrs.png?generation=1554820587291835\&alt=media)

Esto nos agrega la nueva dependencia.

```
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>microtestingejb</artifactId>
            <version>${project.version}</version>
        </dependency>
```

E**n la sección \<build> agregar**

```
<finalName>microtesting </finalName>
```

![](https://119655977-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc1Wg6ni0R6l7RuGH7f%2F-Lc1WimEKh7cRoxzlSLb%2F-Lc1WoZuvBhYtc7nCqke%2Fpom.png?generation=1554820587655542\&alt=media)

## pom.xml

```java
<?xml version="1.0" encoding="UTF-8"?>
<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.avbravo</groupId>
    <artifactId>microtesting</artifactId>
    <version>0.1</version>
    <packaging>war</packaging>

    <name>microtesting</name>

    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.payara.micro>5.182</version.payara.micro>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.faces</artifactId>
            <version>2.2.7</version>
        </dependency>
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>6.2</version>
        </dependency>
        <dependency>
            <groupId>com.avbravo</groupId>
            <artifactId>microtestingejb</artifactId>
            <version>0.1</version>
        </dependency>

        <dependency>
            <groupId>com.github.avbravo</groupId>
            <artifactId>jmoordbunit</artifactId>
            <version>0.4.4</version>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>8.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>microtesting</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>
                                    <artifactId>javaee-endorsed-api</artifactId>
                                    <version>7.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>fish.payara.maven.plugins</groupId>
                <artifactId>payara-micro-maven-plugin</artifactId>
                <configuration>
                    <payaraVersion>${version.payara.micro}</payaraVersion>
                    <deployWar>false</deployWar>
                    <commandLineOptions>
                        <option>
                            <key>--autoBindHttp</key>
                        </option>
                        <option>
                            <key>--deploy</key>
                            <value>${project.build.directory}/${project.build.finalName}</value>
                        </option>
                    </commandLineOptions>
                </configuration>
                <version>1.0.1</version>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <url>http://repository.primefaces.org/</url>
            <id>PrimeFaces-maven-lib</id>
            <layout>default</layout>
            <name>Repository for library PrimeFaces-maven-lib</name>
        </repository>

        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

</project>
```
