<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">

    <properties>
        <java.versao>1.8</java.versao>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <!--
        <spring.version>4.2.6.RELEASE</spring.version>
        <hibernate.version>4.3.1.Final</hibernate.version>

        <github.global.server>github</github.global.server>
        -->

        <spring.version>4.2.8.RELEASE</spring.version>
        <jasper.version>6.2.0</jasper.version>
        <github.global.server>github</github.global.server>

        <hibernate.version>4.3.11.Final</hibernate.version>
        <hibernate.validator.version>5.1.0.Final</hibernate.validator.version>

        <javax.servlet.api.version>3.1.0</javax.servlet.api.version>
        <javax.servlet.jsp.api.version>2.2</javax.servlet.jsp.api.version>
        <javax.servlet.jstl.version>1.2</javax.servlet.jstl.version>
        <javax.validation.api.version>1.1.0.Final</javax.validation.api.version>


        <junit.version>4.11</junit.version>

        <net.jodah.version>0.3.1</net.jodah.version>

        <com.fasterxml.jackson.version>2.6.7</com.fasterxml.jackson.version>

        <commons.lang3.version>3.3</commons.lang3.version>



        <org.glassfish.web.el.impl.version>2.2</org.glassfish.web.el.impl.version>

        <hikaricp.version>2.5.1</hikaricp.version>
        <!-- Não pode trocar a versão do querydsl, por que quebra o build no anymarkey -->
        <querydsl.apt.version>3.4.0</querydsl.apt.version>
        <querydsl.jpa.version>3.4.0</querydsl.jpa.version>
        <querydsl.core.version>3.4.0</querydsl.core.version>

        <commons.fileupload.version>1.3.1</commons.fileupload.version>

        <commons.io.version>2.4</commons.io.version>

        <httpclient.version>4.5</httpclient.version>

        <commons.email.version>1.4</commons.email.version>

        <liquibase.core.version>3.5.3</liquibase.core.version>

        <h2.version>1.4.196</h2.version>

        <slf4j.version>1.7.6</slf4j.version>

        <spring-data-jpa.version>1.8.2.RELEASE</spring-data-jpa.version>
        <guava.version>18.0</guava.version>
        <mockito.version>1.9.5</mockito.version>
        <el-api.version>2.2</el-api.version>
        <springfox-swagger2.version>2.0.1</springfox-swagger2.version>
        <swagger-spring-mvc-ui.versiom>0.4</swagger-spring-mvc-ui.versiom>
        <stimulsoft-reports-base.version>2017.1.10</stimulsoft-reports-base.version>
        <javax.interceptor-api.version>1.2</javax.interceptor-api.version>
        <spring-data-mongodb.version>1.10.0.RELEASE</spring-data-mongodb.version>
        <cogroo-ann-pt_br.version>4.2.0</cogroo-ann-pt_br.version>
        <reflections.version>0.9.10</reflections.version>
        <freemarker.version>2.3.23</freemarker.version>
        <hibernate-search-orm.version>5.1.0.Final</hibernate-search-orm.version>
        <mail.version>1.4.7</mail.version>
    </properties>

    <name>Gumga Framework Backend</name>
    <description>
        Gumga Framework Backend
    </description>
    <organization>
        <name>Gumga</name>
        <url>http://gumga.io</url>
    </organization>
    <url>https://github.com/gumga</url>
    <scm>
        <connection>scm:git:git@github.com:GUMGA/frameworkbackend.git</connection>
        <developerConnection>scm:git:git@github.com:GUMGA/frameworkbackend.git</developerConnection>
        <url>https://github.com/GUMGA/frameworkbackend</url>
    </scm>
    <licenses>
        <license>
            <name>GNU General Public License (GPL)</name>
            <url>http://www.gnu.org/licenses/gpl.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>gumga</id>
            <name>Gumga</name>
            <email>gumgait@gmail.com</email>
            <organization>Gumga</organization>
            <organizationUrl>http://gumga.io</organizationUrl>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>


    <modelVersion>4.0.0</modelVersion>

    <groupId>io.gumga</groupId>
    <artifactId>gumga-backend-all</artifactId>

    <version>3.2.2</version>


    <packaging>pom</packaging>
    <!--<name>Gumga Framework Backend</name>-->

    <modules>
        <module>gumga-core</module>
        <module>gumga-domain</module>
        <module>gumga-presentation</module>
        <module>gumga-security</module>
        <module>gumga-validation</module>
        <module>gumga-application</module>
        <module>gumga-reports</module>
        <module>gumga-amazon-ses</module>
        <module>gumga-freshdesk</module>
    </modules>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.gumga</groupId>
                <artifactId>gumga-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.gumga</groupId>
                <artifactId>gumga-domain</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.gumga</groupId>
                <artifactId>gumga-presentation</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.gumga</groupId>
                <artifactId>gumga-security</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.gumga</groupId>
                <artifactId>gumga-validation</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.gumga</groupId>
                <artifactId>gumga-application</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.gumga</groupId>
                <artifactId>gumga-freshdesk</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-jpa</artifactId>
                <version>${spring-data-jpa.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>net.jodah</groupId>
                <artifactId>typetools</artifactId>
                <version>${net.jodah.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${javax.validation.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-envers</artifactId>
                <version>${hibernate.version}</version>
            </dependency>

            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${h2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${javax.servlet.api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>${javax.servlet.jsp.api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>${javax.servlet.jstl.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons.lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate.validator.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${com.fasterxml.jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-hibernate4</artifactId>
                <version>${com.fasterxml.jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
                <version>${com.fasterxml.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.mysema.querydsl</groupId>
                <artifactId>querydsl-apt</artifactId>
                <version>${querydsl.apt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mysema.querydsl</groupId>
                <artifactId>querydsl-jpa</artifactId>
                <version>${querydsl.jpa.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mysema.querydsl</groupId>
                <artifactId>querydsl-core</artifactId>
                <version>${querydsl.core.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            

            <dependency>
                <groupId>net.sf.jasperreports</groupId>
                <artifactId>jasperreports</artifactId>
                <version>${jasper.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.lucene</groupId>
                        <artifactId>lucene-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.lucene</groupId>
                        <artifactId>lucene-analyzers-common</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.lucene</groupId>
                        <artifactId>lucene-queryparser</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-annotations</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>


            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
            </dependency>


            <dependency>
                <groupId>javax.el</groupId>
                <artifactId>el-api</artifactId>
                <version>${el-api.version}</version>
            </dependency>

            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox-swagger2.version}</version>
            </dependency>


            <dependency>
                <groupId>org.ajar</groupId>
                <artifactId>swagger-spring-mvc-ui</artifactId>
                <version>${swagger-spring-mvc-ui.versiom}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-mongodb</artifactId>
                <version>${spring-data-mongodb.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.interceptor</groupId>
                <artifactId>javax.interceptor-api</artifactId>
                <version>${javax.interceptor-api.version}</version>
            </dependency>

            <dependency>
                <groupId>com.stimulsoft</groupId>
                <artifactId>stimulsoft-reports-base</artifactId>
                <version>${stimulsoft-reports-base.version}</version>
            </dependency>

            <dependency>
                <groupId>org.cogroo.lang.pt_br</groupId>
                <artifactId>cogroo-ann-pt_br</artifactId>
                <version>${cogroo-ann-pt_br.version}</version>
            </dependency>

            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${reflections.version}</version>
            </dependency>

            <dependency>
                <groupId>com.zaxxer</groupId>
                <artifactId>HikariCP</artifactId>
                <version>${hikaricp.version}</version>
            </dependency>

            <dependency>
                <groupId>org.freemarker</groupId>
                <artifactId>freemarker</artifactId>
                <version>${freemarker.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-orm</artifactId>
                <version>${hibernate-search-orm.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>${mail.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>maven-central</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.3</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>nexus-releases</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <version>3.1</version>
                            <configuration>
                                <target>${java.versao}</target>
                                <source>${java.versao}</source>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-source-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>attach-sources</id>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>attach-javadocs</id>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>

                                </execution>
                            </executions>
                            <configuration>
                                <additionalparam>-Xdoclint:none</additionalparam>
                                <failOnError>false</failOnError>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>

            <distributionManagement>
                <repository>
                    <id>nexus-releases</id>
                    <name>Nexus Release Repository</name>
                    <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.jetty</groupId>
                            <artifactId>jetty-maven-plugin</artifactId>
                            <version>9.0.6.v20130930</version>
                        </plugin>
                        <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>
                                <encoding>${project.build.sourceEncoding}</encoding>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.7.2.201409121644</version>

                        <executions>
                            <execution>
                                <id>default-prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.gmaven</groupId>
                        <artifactId>gmaven-plugin</artifactId>
                        <version>1.5</version>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>copyGitHooks</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <configuration>
                                    <source>
                                        def destinationDir = new File(project.basedir, '.git/hooks')
                                        def sourceDir = new File(project.basedir, '.git_hooks')
                                        ant.mkdir(dir: destinationDir)
                                        ant.copy(todir: destinationDir) {
                                        fileset(dir: sourceDir) {
                                        include(name: 'pre-commit')
                                        include(name: 'commit-msg')
                                        }
                                        }
                                        ant.chmod(dir:".git/hooks", perm:'+w', includes:"*")
                                        <!--def oldSettings = new File(System.getProperty('user.home'), '.m2/settings.xml')
                                        def settingsBackup = new File(System.getProperty('user.home'), '.m2/settings_backup.xml')
                                        if (oldSettings.exists()) {
                                            ant.copy(tofile: settingsBackup, file:oldSettings, overwrite:false)
                                        }
                                        def newSettings = new File(project.basedir, 'maven_settings.xml');
                                        ant.copy(tofile: oldSettings, file: newSettings, overwrite: true) -->
                                    </source>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <configuration>
                            <altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <version>0.12</version>
                        <configuration>
                            <merge>true</merge>
                            <message>Maven artifacts for ${project.version}</message>  <!-- git commit message -->
                            <noJekyll>true</noJekyll>                                  <!-- disable webpage processing -->
                            <!-- matches distribution management repository url above -->
                            <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
                            <branch>refs/heads/mvn-repo</branch>                       <!-- remote branch name -->
                            <includes>
                                <include>**/*</include>
                            </includes>
                            <repositoryName>framework-backend</repositoryName>      <!-- github repo name -->
                            <repositoryOwner>GUMGA</repositoryOwner>    <!-- github username  -->
                        </configuration>
                        <executions>
                            <!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>deploy</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

            <distributionManagement>
                <repository>
                    <id>internal.repo</id>
                    <name>Temporary Staging Repository</name>
                    <url>file://${project.build.directory}/mvn-repo</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

</project>
