<?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.pvstream</groupId>
    <artifactId>PVStream</artifactId>
    <version>0.1.4</version>
    <packaging>war</packaging>

    <name>PVStream</name>

    <properties>
        <version.properties.file>${project.basedir}/version.properties</version.properties.file>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>

        <properties.file.local>${basedir}/local.properties</properties.file.local>
        <properties.file.local.build>${basedir}/local.build.properties</properties.file.local.build>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <war.final.name>pvstream</war.final.name>

        <version.deltaspike>1.5.4</version.deltaspike>
        <version.httpclient>4.5.1</version.httpclient>
        <version.httpcore>4.4.4</version.httpcore>
        <version.security.shiro>1.2.4</version.security.shiro>
        <version.aws.java.sdk>1.11.646</version.aws.java.sdk>
        <version.resteasy.jboss>3.0.14.Final</version.resteasy.jboss>
        <version.powermock>1.6.4</version.powermock>

        <!-- JBoss dependency versions -->
        <version.wildfly.maven.plugin>1.1.0.Alpha7</version.wildfly.maven.plugin>

        <!-- Define the version of the JBoss BOMs we want to import to specify
        tested stacks. -->
        <version.jboss.bom>10.0.0.Final</version.jboss.bom>


        <shiro.realm.jpa>$jpaRealm</shiro.realm.jpa>
        <shiro.realm.activeDirectory>$activeDirectoryRealm</shiro.realm.activeDirectory>
        <shiro.cache.manager.infinispan>com.pvstream.pilot.api.core.security.InfinispanCacheManager</shiro.cache.manager.infinispan>

        <restricted.resource.1>/restricted1/*</restricted.resource.1>

        <s3.bucket.dev>swd-api-app-artifacts-dev</s3.bucket.dev>

        <datasource.pvstream>pvstream</datasource.pvstream>
        <datasource.hardware>hardware</datasource.hardware>

        <datasource.pvstream.qa>pvstream_qa</datasource.pvstream.qa>
        <datasource.hardware.qa>hardware_qa</datasource.hardware.qa>

        <datasource.pvstream.local>pvstream_local</datasource.pvstream.local>
        <datasource.hardware.local>hardware_local</datasource.hardware.local>

        <datasource.pvstream.local.username>pvstream</datasource.pvstream.local.username>
        <datasource.pvstream.local.password>power$14</datasource.pvstream.local.password>

        <storage.factory.class.local>com.pvstream.pilot.api.core.util.StorageProfileProducer</storage.factory.class.local>

        <shiro.realm>${shiro.realm.jpa}</shiro.realm>
        <shiro.cache.manager>${shiro.cache.manager.infinispan}</shiro.cache.manager>
        <s3.bucket>${s3.bucket.dev}</s3.bucket>
        <storage.factory.class>${storage.factory.class.local}</storage.factory.class>
        <profile.repository.decorator.class>com.pvstream.pilot.api.core.dal.repository.EmptyDecoratorImpl</profile.repository.decorator.class>
        <migration.decorator.class>com.pvstream.pilot.api.core.dal.repository.MigrationRepositoryEmptyDecoratorImpl</migration.decorator.class>
        <dev.decorator.class>com.pvstream.pilot.api.core.dal.repository.DevRepositoryEmptyDecoratorImpl</dev.decorator.class>
        <mail.decorator.class>com.pvstream.pilot.api.core.dal.repository.SendMailRepositoryEmptyDecoratorImpl</mail.decorator.class>

        <wildfly.local.hostname>127.0.0.1</wildfly.local.hostname>
        <wildfly.local.port>10090</wildfly.local.port>

        <wildfly.qa.hostname>3.122.179.103</wildfly.qa.hostname>
        <wildfly.qa.port>10990</wildfly.qa.port>
        <wildfly.qa.username>admin</wildfly.qa.username>
        <wildfly.qa.password>Power$14</wildfly.qa.password>

        <wildfly.uat.hostname>18.184.242.131</wildfly.uat.hostname>
        <wildfly.uat.port>10990</wildfly.uat.port>
        <wildfly.uat.username>admin</wildfly.uat.username>
        <wildfly.uat.password>Power$14</wildfly.uat.password>

        <wildfly.prod.hostname>94.130.109.64</wildfly.prod.hostname>
        <wildfly.prod.port>10090</wildfly.prod.port>
        <wildfly.prod.username>admin</wildfly.prod.username>
        <wildfly.prod.password>power$14</wildfly.prod.password>

        <wildfly.tecso.hostname>3.124.192.179</wildfly.tecso.hostname>
        <wildfly.tecso.port>10990</wildfly.tecso.port>
        <wildfly.tecso.username>admin</wildfly.tecso.username>
        <wildfly.tecso.password>Power$14</wildfly.tecso.password>

        <migration.db.url.local>localhost</migration.db.url.local>
        <migration.db.url.dev>192.168.0.50</migration.db.url.dev>
        <migration.db.url.qa>test-pvs-db-01.cahloogzco9e.eu-central-1.rds.amazonaws.com</migration.db.url.qa>
        <migration.db.url.uat>uat-pvs-db-01.cahloogzco9e.eu-central-1.rds.amazonaws.com</migration.db.url.uat>
        <migration.db.url.prod>94.130.104.31</migration.db.url.prod>
        <migration.db.url.tecso>tecso-prod-pvs-db01.cahloogzco9e.eu-central-1.rds.amazonaws.com</migration.db.url.tecso>

        <migration.db.user.local>root</migration.db.user.local>
        <migration.db.user.dev>pvstream</migration.db.user.dev>
        <migration.db.user.qa>pvstream</migration.db.user.qa>
        <migration.db.user.uat>pvstream</migration.db.user.uat>
        <migration.db.user.prod>pvstream</migration.db.user.prod>
        <migration.db.user.tecso>pvstream</migration.db.user.tecso>

        <migration.db.schema>pvstream</migration.db.schema>

        <migration.db.passwd.local>power$</migration.db.passwd.local>
        <migration.db.passwd.dev>power$</migration.db.passwd.dev>
        <migration.db.passwd.qa>Power$14</migration.db.passwd.qa>
        <migration.db.passwd.uat>Power$14</migration.db.passwd.uat>
        <migration.db.passwd.prod>Power$141</migration.db.passwd.prod>
        <migration.db.passwd.tecso>Power$14</migration.db.passwd.tecso>

        <persistence.hibernate.hbm2ddl.auto>validate</persistence.hibernate.hbm2ddl.auto>
        <ui.skip>false</ui.skip>
        <maven.test.skip>false</maven.test.skip>

        <ui.build.args>build-war-test</ui.build.args>

        <npm.dev></npm.dev>
    </properties>
    
    <dependencyManagement>
        <dependencies>
            <!-- JBoss distributes a complete set of Java EE 7 APIs including a Bill
            of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection)
            of artifacts. We use this here so that we always get the correct versions
            of artifacts. Here we use the jboss-javaee-7.0-with-tools stack (you can
            read this as the JBoss stack of the Java EE 7 APIs, with some extras tools
            for your project, such as Arquillian for testing) and the jboss-javaee-7.0-with-hibernate
            stack you can read this as the JBoss stack of the Java EE 7 APIs, with extras
            from the Hibernate family of projects) -->
            <dependency>
                <groupId>org.wildfly.bom</groupId>
                <artifactId>wildfly-javaee7-with-tools</artifactId>
                <version>${version.jboss.bom}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <dependencies>
        <dependency>
            <groupId>org.mindrot</groupId>
            <artifactId>jbcrypt</artifactId>
            <version>0.3m</version>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${version.httpclient}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${version.httpcore}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.deltaspike.core</groupId>
            <artifactId>deltaspike-core-api</artifactId>
            <version>${version.deltaspike}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.deltaspike.core</groupId>
            <artifactId>deltaspike-core-impl</artifactId>
            <version>${version.deltaspike}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>5.0.10.Final</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- jsoup HTML parser library @ http://jsoup.org/ -->
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.10.1</version>
        </dependency>
        <!--dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-data-module-api</artifactId>
            <version>${version.deltaspike}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-data-module-impl</artifactId>
            <version>${version.deltaspike}</version>
            <scope>runtime</scope>
        </dependency-->

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>

        <!--dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
            <scope>provided</scope>
        </dependency-->
        <!--dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
        </dependency-->

        <!--dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency-->

        <dependency>
        	<groupId>org.apache.commons</groupId>
        	<artifactId>commons-lang3</artifactId>
        	<version>3.4</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.7</version>
            <scope>provided</scope>
        </dependency>

        <!--dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.5</version>
        </dependency-->

        <dependency>
        	<groupId>com.fasterxml.jackson.core</groupId>
        	<artifactId>jackson-core</artifactId>
        	<version>2.8.9</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.8.9</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-core</artifactId>
            <version>${version.security.shiro}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-web</artifactId>
            <version>${version.security.shiro}</version>
        </dependency>

        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.2</version>
        </dependency>

        <dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.1</version>
        </dependency>
        <!-- amazon sdk core -->
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-core</artifactId>
            <version>${version.aws.java.sdk}</version>
        </dependency>

        <!-- amazon sdk S3 -->
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-s3</artifactId>
            <version>${version.aws.java.sdk}</version>
        </dependency>

        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-core</artifactId>
            <version>8.1.0.Final</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-jaxrs</artifactId>
			<version>${version.resteasy.jboss}</version>
        </dependency>

		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-multipart-provider</artifactId>
			<version>${version.resteasy.jboss}</version>
		</dependency>

        <!-- Unit testing: REST services -->
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>tjws</artifactId>
            <version>${version.resteasy.jboss}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-client</artifactId>
            <version>${version.resteasy.jboss}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson-provider</artifactId>
            <version>${version.resteasy.jboss}</version>
            <scope>test</scope>
        </dependency>

        <!-- Unit testing: mockito -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock-legacy</artifactId>
            <version>2.8.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock</artifactId>
            <version>${version.powermock}</version>
            <type>pom</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <version>${version.powermock}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4-common</artifactId>
            <version>${version.powermock}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>${version.powermock}</version>
            <scope>test</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>

        <!-- testing: archiver-->
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
            <version>2.2.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.shrinkwrap.descriptors</groupId>
            <artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
            <version>2.0.0-alpha-8</version>
            <scope>test</scope>
        </dependency>


        <!-- jasperreports -->
        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>6.3.0</version>

            <exclusions>
              <exclusion>
                <groupId>org.bouncycastle</groupId>
				<artifactId>bctsp-jdk14</artifactId>
              </exclusion>
              <exclusion>
                <groupId>bouncycastle</groupId>
				<artifactId>bcprov-jdk14</artifactId>
              </exclusion>
              <exclusion>
                <groupId>bouncycastle</groupId>
				<artifactId>bcmail-jdk14</artifactId>
              </exclusion>

            </exclusions>

        </dependency>

        <!-- APACHE BATIK -->
        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <artifactId>batik-dom</artifactId>
            <version>1.10</version>
        </dependency>

        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <artifactId>batik-svggen</artifactId>
            <version>1.10</version>
        </dependency>

        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <artifactId>batik-transcoder</artifactId>
            <version>1.10</version>
        </dependency>

        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <artifactId>fop</artifactId>
            <version>2.3</version>
        </dependency>

        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <artifactId>xmlgraphics-commons</artifactId>
            <version>2.3</version>
        </dependency>

        <dependency>
        	<groupId>org.freemarker</groupId>
        	<artifactId>freemarker</artifactId>
        	<version>2.3.23</version>
        </dependency>

        <dependency>
			<groupId>javax.mail</groupId>
			<artifactId>javax.mail-api</artifactId>
			<version>1.5.5</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
			<groupId>org.imgscalr</groupId>
			<artifactId>imgscalr-lib</artifactId>
			<version>4.2</version>
        </dependency>

        <dependency>
        	<groupId>com.opencsv</groupId>
        	<artifactId>opencsv</artifactId>
        	<version>4.6</version>
        </dependency>

        <dependency>
		  <groupId>com.stripe</groupId>
		  <artifactId>stripe-java</artifactId>
		  <version>2.6.0</version>
        </dependency>

        <dependency>
        	<groupId>org.jfree</groupId>
        	<artifactId>jfreesvg</artifactId>
        	<version>3.1</version>
        </dependency>
        <!-- database DB.migration -->
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>4.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>4.2.4.RELEASE</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>6.0.6</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>4.1.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.1.0</version>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20190722</version>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.ttf</exclude>
                    <exclude>**/*.xlsx</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.ttf</include>
                    <include>**/*.xlsx</include>
                </includes>
            </resource>
        </resources>

        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>

        <pluginManagement>
            <plugins>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.12.4</version>
                    <configuration>
                        <includes>
                            <include>**/*Test.java</include>
                        </includes>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>


        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</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>2.6</version>
                <configuration>
                    <webResources combine.children="append">
                        <resource>
                            <directory>${basedir}/src/main/webapp</directory>
                            <filtering>true</filtering>
                            <excludes>
                            	<exclude>index.html</exclude>
                            </excludes>
                        </resource>

						<resource>
							<directory>${project.basedir}/src/main/reports</directory>
							<targetPath>WEB-INF/classes/jasper</targetPath>
                            <includes>
                            	<include>**/*.*</include>
                            </includes>
                            <excludes>
                            	<exclude>**/*.jrxml</exclude>
                            </excludes>
						</resource>

						<resource>
							<directory>${project.basedir}/lib</directory>
							<targetPath>WEB-INF/lib</targetPath>
                            <includes>
                            	<include>*.jar</include>
                            </includes>
						</resource>


                    </webResources>

                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>${war.final.name}</warName>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</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>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>frontend/dist</directory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                        </fileset>
                        <fileset>
                            <directory>frontend/.tmp</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.0.0</version>

				<executions>
		          <execution>
		            <phase>initialize</phase>
		            <goals>
		              <goal>read-project-properties</goal>
		            </goals>
		            <configuration>
		              <files>
						<file>${properties.file.local}</file>
                        <file>${version.properties.file}</file>
		              </files>
		            </configuration>
		          </execution>
		        </executions>

			</plugin>


			<plugin>
				<groupId>com.alexnederlof</groupId>
				<artifactId>jasperreports-plugin</artifactId>
				<version>2.2</version>
				<executions>
					<execution>
						<phase>process-sources</phase>
						<goals>
							<goal>jasper</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
					<sourceDirectory>src/main/reports</sourceDirectory>
					<outputDirectory>${project.build.directory}/classes/jasper</outputDirectory>
					<outputFileExt>.jasper</outputFileExt>
					<xmlValidation>true</xmlValidation>
					<verbose>false</verbose>
					<numberOfThreads>4</numberOfThreads>
					<failOnMissingSourceDirectory>true</failOnMissingSourceDirectory>
					<sourceScanner>org.codehaus.plexus.compiler.util.scan.StaleSourceScanner</sourceScanner>
				</configuration>
            </plugin>


        </plugins>
    </build>

    <profiles>

        <profile>
            <!-- An optional Arquillian testing profile that executes tests in a remote
            WildFly instance -->
            <!-- Run with: mvn clean test -Parq-wildfly-remote -->
            <id>it-wildfly-remote</id>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.arquillian</groupId>
                    <artifactId>wildfly-arquillian-container-remote</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>

            <build>
                <plugins>

                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.12.4</version>
                        <configuration>
                            <includes>
                                <include>**/*IT.java</include>
                            </includes>
                        </configuration>
                    </plugin>

                </plugins>
            </build>

        </profile>



        <profile>
            <id>wildfly-remote</id>

            <build>
                <plugins>

                    <plugin>
                    	<groupId>org.wildfly.plugins</groupId>
                    	<artifactId>wildfly-maven-plugin</artifactId>
                    	<version>${version.wildfly.maven.plugin}</version>

                    	<configuration>
                    	    <filename>${war.final.name}.war</filename>
	                    	<hostname>${wildfly.local.hostname}</hostname>
	                    	<port>${wildfly.local.port}</port>
                    	</configuration>
                    </plugin>

                </plugins>
            </build>

        </profile>

        <profile>
            <id>wildfly-remote-qa</id>

            <build>
                <plugins>

                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-plugin</artifactId>
                        <version>${version.wildfly.maven.plugin}</version>

                        <configuration>
                            <filename>${war.final.name}.war</filename>
                            <hostname>${wildfly.qa.hostname}</hostname>
                            <port>${wildfly.qa.port}</port>
                            <username>${wildfly.qa.username}</username>
                            <password>${wildfly.qa.password}</password>
                        </configuration>
                    </plugin>

                </plugins>
            </build>

        </profile>

        <profile>
            <id>wildfly-remote-uat</id>

            <properties>
                <persistence.hibernate.hbm2ddl.auto>none</persistence.hibernate.hbm2ddl.auto>
            </properties>

            <build>
                <plugins>

                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-plugin</artifactId>
                        <version>${version.wildfly.maven.plugin}</version>

                        <configuration>
                            <filename>${war.final.name}.war</filename>
                            <hostname>${wildfly.uat.hostname}</hostname>
                            <port>${wildfly.uat.port}</port>
                            <username>${wildfly.uat.username}</username>
                            <password>${wildfly.uat.password}</password>
                        </configuration>
                    </plugin>

                </plugins>
            </build>

        </profile>

        <profile>
            <id>wildfly-remote-prod</id>

            <properties>
                <persistence.hibernate.hbm2ddl.auto>none</persistence.hibernate.hbm2ddl.auto>
            </properties>

            <build>
                <plugins>

                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-plugin</artifactId>
                        <version>${version.wildfly.maven.plugin}</version>

                        <configuration>
                            <filename>${war.final.name}.war</filename>
                            <hostname>${wildfly.prod.hostname}</hostname>
                            <port>${wildfly.prod.port}</port>
                            <username>${wildfly.prod.username}</username>
                            <password>${wildfly.prod.password}</password>
                        </configuration>
                    </plugin>

                </plugins>
            </build>

        </profile>

        <profile>
            <id>wildfly-remote-tecso</id>

            <properties>
                <persistence.hibernate.hbm2ddl.auto>none</persistence.hibernate.hbm2ddl.auto>
            </properties>

            <build>
                <plugins>

                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-plugin</artifactId>
                        <version>${version.wildfly.maven.plugin}</version>

                        <configuration>
                            <filename>${war.final.name}.war</filename>
                            <hostname>${wildfly.tecso.hostname}</hostname>
                            <port>${wildfly.tecso.port}</port>
                            <username>${wildfly.tecso.username}</username>
                            <password>${wildfly.tecso.password}</password>
                        </configuration>
                    </plugin>

                </plugins>
            </build>

        </profile>

        <profile>
            <id>dev</id>

            <properties>
                <grunt.dev>dev</grunt.dev>
                <migration.decorator.class>com.pvstream.pilot.api.core.dal.repository.MigrationRepositoryDecoratorImpl</migration.decorator.class>
                <dev.decorator.class>com.pvstream.pilot.api.core.dal.repository.DevRepositoryDecoratorImpl</dev.decorator.class>
            </properties>

        </profile>
        <profile>
            <id>skip-mail</id>
            <properties>
                <mail.decorator.class>com.pvstream.pilot.api.core.dal.repository.SendMailRepositoryDecoratorImpl</mail.decorator.class>
            </properties>
        </profile>

        <profile>
            <id>qa-db</id>
            <properties>
                <datasource.pvstream>${datasource.pvstream.qa}</datasource.pvstream>
                <datasource.hardware>${datasource.hardware.qa}</datasource.hardware>
            </properties>
        </profile>

        <profile>
            <id>local-db</id>
            <properties>
                <datasource.pvstream>${datasource.pvstream.local}</datasource.pvstream>
                <datasource.hardware>${datasource.hardware.local}</datasource.hardware>
            </properties>
        </profile>


        <profile>
            <id>quick</id>
            <properties>
                <ui.skip>true</ui.skip>
                <maven.test.skip>true</maven.test.skip>
            </properties>
        </profile>

        <profile>
            <id>local-services</id>
            <properties>
                <profile.repository.decorator.class>com.pvstream.pilot.api.core.dal.repository.ProfileRepositoryDecoratorImpl</profile.repository.decorator.class>
            </properties>
        </profile>
        <profile>
            <id>qa-amazon</id>

            <properties>
                <persistence.hibernate.hbm2ddl.auto>none</persistence.hibernate.hbm2ddl.auto>
                <grunt.dev>dev</grunt.dev>
            </properties>

        </profile>

        <profile>
            <id>stage-amazon</id>

            <properties>
                <persistence.hibernate.hbm2ddl.auto>none</persistence.hibernate.hbm2ddl.auto>
                <grunt.dev></grunt.dev>
            </properties>

        </profile>

        <profile>
            <id>prod-amazon</id>

            <properties>
                <persistence.hibernate.hbm2ddl.auto>none</persistence.hibernate.hbm2ddl.auto>
                <grunt.dev></grunt.dev>
            </properties>

        </profile>
        <profile>
            <id>root</id>
            <properties>
                <war.final.name>ROOT</war.final.name>
            </properties>
        </profile>

        <profile>
            <id>env-test</id>
            <properties>
                <ui.build.args>build-war-test</ui.build.args>
            </properties>
        </profile>

        <profile>
            <id>env-prod</id>
            <properties>
                <ui.build.args>build-war-prod</ui.build.args>
            </properties>
        </profile>

        <profile>
            <id>env-tecso</id>
            <properties>
                <ui.build.args>build-war-tecso</ui.build.args>
            </properties>
        </profile>

        <profile>
            <id>ui</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>1.3</version>
                        <executions>
                            <execution>
                                <!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
                                <id>install node and npm</id>
                                <goals>
                                    <goal>install-node-and-npm</goal>
                                </goals>
                                <!-- optional: default phase is "generate-resources" -->
                                <phase>generate-resources</phase>
                            </execution>
                            <execution>
                                <id>npm install</id>
                                <goals>
                                    <goal>npm</goal>
                                </goals>

                                <!-- optional: default phase is "generate-resources" -->
                                <phase>generate-resources</phase>

                                <configuration>
                                    <arguments>install</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>npm run-script build</id>
                                <goals>
                                    <goal>npm</goal>
                                </goals>

                                <!-- optional: default phase is "generate-resources" -->
                                <phase>generate-resources</phase>

                                <configuration>
                                    <arguments>run ${ui.build.args}</arguments>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <nodeVersion>v7.4.0</nodeVersion>
                            <workingDirectory>frontend</workingDirectory>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration>
                            <webResources>
                                <resource>
                                    <directory>frontend/dist</directory>
                                </resource>
                            </webResources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

         <profile>
            <id>db-migration-dev</id>
            <properties>
                <mysql.driver.version>6.0.6</mysql.driver.version>
                <database.driver>com.mysql.cj.jdbc.Driver</database.driver>
                <database.url>jdbc:mysql://${migration.db.url.dev}:3306/pvstream?zeroDateTimeBehavior=convertToNull&amp;characterEncoding=utf8</database.url>
                <database.user>${migration.db.user.dev}</database.user>
                <database.password>${migration.db.passwd.dev}</database.password>
            </properties>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.flywaydb</groupId>
                        <artifactId>flyway-maven-plugin</artifactId>
                        <version>5.0.6</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>migrate</goal>
                                    <goal>info</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <locations>
                                <location>filesystem:${basedir}/src/main/resources/DB/migration/</location>
                            </locations>
                            <encoding>UTF-8</encoding>
                            <outOfOrder>true</outOfOrder>
                            <validateOnMigrate>false</validateOnMigrate>
                            <ignoreMissingMigrations>true</ignoreMissingMigrations>
                            <placeholderReplacement>false</placeholderReplacement>
                            <table>schema_version</table>
                            <driver>${database.driver}</driver>
                            <url>${database.url}</url>
                            <user>${database.user}</user>
                            <password>${database.password}</password>
                            <schemas>
                                <schema>${migration.db.schema}</schema>
                            </schemas>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>

        <profile>
            <id>db-migration-qa</id>
            <properties>
                <mysql.driver.version>6.0.6</mysql.driver.version>
                <database.driver>com.mysql.cj.jdbc.Driver</database.driver>
                <database.url>jdbc:mysql://${migration.db.url.qa}:3306/pvstream?zeroDateTimeBehavior=convertToNull&amp;characterEncoding=utf8</database.url>
                <database.user>${migration.db.user.qa}</database.user>
                <database.password>${migration.db.passwd.qa}</database.password>
            </properties>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.flywaydb</groupId>
                        <artifactId>flyway-maven-plugin</artifactId>
                        <version>5.0.6</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>migrate</goal>
                                    <goal>info</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <locations>
                                <location>filesystem:${basedir}/src/main/resources/DB/migration/</location>
                            </locations>
                            <encoding>UTF-8</encoding>
                            <outOfOrder>true</outOfOrder>
                            <ignoreMissingMigrations>true</ignoreMissingMigrations>
                            <placeholderReplacement>false</placeholderReplacement>
                            <table>schema_version</table>
                            <driver>${database.driver}</driver>
                            <url>${database.url}</url>
                            <user>${database.user}</user>
                            <password>${database.password}</password>
                            <schemas>
                                <schema>${migration.db.schema}</schema>
                            </schemas>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>

        <profile>
            <id>db-migration-local</id>
            <properties>
                <mysql.driver.version>6.0.6</mysql.driver.version>
                <database.driver>com.mysql.cj.jdbc.Driver</database.driver>
                <database.url>jdbc:mysql://${migration.db.url.local}:3306/pvstream?zeroDateTimeBehavior=convertToNull&amp;characterEncoding=utf8</database.url>
                <database.user>${migration.db.user.local}</database.user>
                <database.password>${migration.db.passwd.local}</database.password>
            </properties>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.flywaydb</groupId>
                        <artifactId>flyway-maven-plugin</artifactId>
                        <version>5.0.6</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>migrate</goal>
                                    <goal>info</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <locations>
                                <location>filesystem:${basedir}/src/main/resources/DB/migration/</location>
                            </locations>
                            <encoding>UTF-8</encoding>
                            <outOfOrder>true</outOfOrder>
                            <ignoreMissingMigrations>true</ignoreMissingMigrations>
                            <placeholderReplacement>false</placeholderReplacement>
                            <table>schema_version</table>
                            <driver>${database.driver}</driver>
                            <url>${database.url}</url>
                            <user>${database.user}</user>
                            <password>${database.password}</password>
                            <schemas>
                                <schema>${datasource.pvstream}</schema>
                            </schemas>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>

        <profile>
            <id>db-migration-UAT</id>
            <properties>
                <mysql.driver.version>6.0.6</mysql.driver.version>
                <database.driver>com.mysql.cj.jdbc.Driver</database.driver>
                <database.url>jdbc:mysql://${migration.db.url.uat}:3306/pvstream?zeroDateTimeBehavior=convertToNull&amp;characterEncoding=utf8</database.url>
                <database.user>${migration.db.user.uat}</database.user>
                <database.password>${migration.db.passwd.uat}</database.password>
            </properties>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.flywaydb</groupId>
                        <artifactId>flyway-maven-plugin</artifactId>
                        <version>5.0.6</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>migrate</goal>
                                    <goal>info</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <locations>
                                <location>filesystem:${basedir}/src/main/resources/DB/migration/</location>
                            </locations>
                            <encoding>UTF-8</encoding>
                            <outOfOrder>true</outOfOrder>
                            <ignoreMissingMigrations>true</ignoreMissingMigrations>
                            <placeholderReplacement>false</placeholderReplacement>
                            <table>schema_version</table>
                            <driver>${database.driver}</driver>
                            <url>${database.url}</url>
                            <user>${database.user}</user>
                            <password>${database.password}</password>
                            <schemas>
                                <schema>${datasource.pvstream}</schema>
                            </schemas>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>

        <profile>
            <id>db-migration-PROD</id>
            <properties>
                <mysql.driver.version>6.0.6</mysql.driver.version>
                <database.driver>com.mysql.cj.jdbc.Driver</database.driver>
                <database.url>jdbc:mysql://${migration.db.url.prod}:3306/pvstream?zeroDateTimeBehavior=convertToNull&amp;characterEncoding=utf8&amp;serverTimezone=UTC</database.url>
                <database.user>${migration.db.user.prod}</database.user>
                <database.password>${migration.db.passwd.prod}</database.password>
            </properties>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.flywaydb</groupId>
                        <artifactId>flyway-maven-plugin</artifactId>
                        <version>5.0.6</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>migrate</goal>
                                    <goal>info</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <locations>
                                <location>filesystem:${basedir}/src/main/resources/DB/migration/</location>
                            </locations>
                            <encoding>UTF-8</encoding>
                            <outOfOrder>true</outOfOrder>
                            <ignoreMissingMigrations>true</ignoreMissingMigrations>
                            <placeholderReplacement>false</placeholderReplacement>
                            <table>schema_version</table>
                            <driver>${database.driver}</driver>
                            <url>${database.url}</url>
                            <user>${database.user}</user>
                            <password>${database.password}</password>
                            <schemas>
                                <schema>${datasource.pvstream}</schema>
                            </schemas>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
        <profile>
            <id>db-migration-tecso</id>
            <properties>
                <mysql.driver.version>6.0.6</mysql.driver.version>
                <database.driver>com.mysql.cj.jdbc.Driver</database.driver>
                <database.url>jdbc:mysql://${migration.db.url.tecso}:3306/pvstream?zeroDateTimeBehavior=convertToNull&amp;characterEncoding=utf8</database.url>
                <database.user>${migration.db.user.tecso}</database.user>
                <database.password>${migration.db.passwd.tecso}</database.password>
            </properties>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.flywaydb</groupId>
                        <artifactId>flyway-maven-plugin</artifactId>
                        <version>5.0.6</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>migrate</goal>
                                    <goal>info</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <locations>
                                <location>filesystem:${basedir}/src/main/resources/DB/migration/</location>
                            </locations>
                            <encoding>UTF-8</encoding>
                            <outOfOrder>true</outOfOrder>
                            <ignoreMissingMigrations>true</ignoreMissingMigrations>
                            <placeholderReplacement>false</placeholderReplacement>
                            <table>schema_version</table>
                            <driver>${database.driver}</driver>
                            <url>${database.url}</url>
                            <user>${database.user}</user>
                            <password>${database.password}</password>
                            <schemas>
                                <schema>${datasource.pvstream}</schema>
                            </schemas>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>
</project>
