<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>io.sinistral</groupId>
	<artifactId>proteus-techempower</artifactId>
	<packaging>jar</packaging>
	<version>1.0.0</version>
	<name>proteus-techempower</name>
	<url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <rocker.version>1.2.1</rocker.version>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>src/test/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
        </testResources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-compiler-plugin</artifactId>
										<versionRange>[3.3,)</versionRange>
										<goals>
											<goal>compile</goal>
											<goal>testCompile</goal>
										</goals>
									</pluginExecutionFilter>

									<action>
										<execute />
									</action>
								</pluginExecution>
								 <pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.fizzed</groupId>
										<artifactId>rocker-maven-plugin</artifactId>
										<versionRange>[${rocker.version},)</versionRange>
										<goals>
											<goal>generate</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute>
											<runOnIncremental>true</runOnIncremental>
										</execute>
									</action>
								</pluginExecution> 
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<debug>false</debug>
					<compilerArgument>-parameters</compilerArgument>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
					<execution>
						<id>copy-configuration-resources</id>
						<phase>validate</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/conf</outputDirectory>
							<resources>
								<resource>
									<directory>conf</directory>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-asset-resources</id>
						<phase>validate</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/assets</outputDirectory>
							<resources>
								<resource>
									<directory>assets</directory>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.6.0</version>
				<executions>
					<execution>
						<goals>
							<goal>exec</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<executable>java</executable>
					<arguments>
						<argument>-Dlogback.configurationFile=${project.build.directory}/conf/logback.xml</argument>
						<argument>-Dconfig.file=${project.build.directory}/conf/application.conf</argument> 
						<argument>-Xms1g</argument>
						<argument>-Xmx2g</argument>
						<argument>-XX:+AggressiveOpts</argument>
						<argument>-XX:-UseBiasedLocking</argument>
						<argument>-XX:+UseStringDeduplication</argument>
						<argument>-classpath</argument>
						<!-- automatically creates the classpath using all project dependencies, 
							also adding the project build directory -->
						<classpath />
						<argument>io.sinistral.ExampleApplication</argument>

					</arguments>

				</configuration>
			</plugin>
			
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!-- Build an executable JAR -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<classpathPrefix>lib/</classpathPrefix>
							<mainClass>io.sinistral.ExampleApplication</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			 
		  <!-- <plugin>
				<groupId>com.fizzed</groupId>
				<artifactId>rocker-maven-plugin</artifactId>
				<version>1.2.1</version>
				<executions>
					<execution>
						<id>generate-rocker-templates</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>generate</goal>
						</goals>
						<configuration>
					<outputDirectory>${project.basedir}/src</outputDirectory>
					</configuration>
					</execution>
					 
				</executions>
			</plugin> -->
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>io.sinistral</groupId>
			<artifactId>proteus-core</artifactId>
			<version>0.1.7.4-SNAPSHOT</version>
			
		</dependency>
			<dependency>
			<groupId>com.fizzed</groupId>
			<artifactId>rocker-runtime</artifactId>
			<version>${rocker.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fizzed</groupId>
			<artifactId>rocker-compiler</artifactId>
			<version>${rocker.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.github.spullara.mustache.java</groupId>
			<artifactId>compiler</artifactId>
			<version>0.9.6</version>
		</dependency>

		<dependency>
			<groupId>com.zaxxer</groupId>
			<artifactId>HikariCP</artifactId>
			<version>3.3.1</version>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>8.0.18</version>
		</dependency>
	  	<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>42.2.5</version>
		</dependency>  
	</dependencies>
	<repositories>
    <repository>
        <id>oss-sonatype</id>
        <name>oss-sonatype</name>
        <url>https://oss.sonatype.org/content/groups/public/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
</project>
