<?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>
	<parent>
		<groupId>com.anaptecs.jeaf.fast-lane</groupId>
		<artifactId>jeaf-fast-lane-impl-project</artifactId>
		<version>1.8.0</version>
	</parent>

	<name>JEAF Fast Lane Impl</name>
	<artifactId>jeaf-fast-lane-impl</artifactId>
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>com.anaptecs.jeaf.tools</groupId>
			<artifactId>jeaf-tools-api</artifactId>
			<version>${jeaf.tools.api.version}</version>
		</dependency>

		<dependency>
			<groupId>com.anaptecs.jeaf.fast-lane</groupId>
			<artifactId>jeaf-fast-lane-api</artifactId>
			<version>${jeaf.fastlane.api.version}</version>
		</dependency>
		
		<dependency>
			<groupId>com.anaptecs.jeaf.json</groupId>
			<artifactId>jeaf-json-impl-runtime</artifactId>
		    <version>${jeaf.json.impl.version}</version>
		    <type>pom</type>
		</dependency>

		<dependency>
			<artifactId>jeaf-jersey-extensions-impl</artifactId>
			<groupId>com.anaptecs.jeaf.jersey</groupId>
			<version>${jeaf.jersey.extensions.version}</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
		<dependency>
		    <groupId>com.fasterxml.jackson.core</groupId>
		    <artifactId>jackson-databind</artifactId>
		    <version>${jackson.version}</version>
		</dependency>

		<!-- Dependencies for Jetty -->
		<!-- As JEAF Fast Lane is build on top of Jetty we need to reference the matching Jetty version. -->
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-server</artifactId>
			<version>${jetty.server.version}</version>
		</dependency>

		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-servlet</artifactId>
			<version>${jetty.server.version}</version>
		</dependency>

		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-util</artifactId>
			<version>${jetty.server.version}</version>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-jetty-http</artifactId>
			<version>${jersey.version}</version>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-server</artifactId>
			<version>${jersey.version}</version>
		</dependency>

		<dependency>
		    <groupId>org.glassfish.jersey.containers</groupId>
		    <artifactId>jersey-container-servlet</artifactId>
		    <version>${jersey.version}</version>
		</dependency>
		
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
			<version>${jersey.version}</version>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
			<version>${jersey.version}</version>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-jaxb</artifactId>
			<version>${jersey.version}</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
		<dependency>
			<groupId>com.squareup.okhttp3</groupId>
			<artifactId>okhttp</artifactId>
			<version>${okhttp.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.yaml/snakeyaml -->
		<dependency>
			<groupId>org.yaml</groupId>
			<artifactId>snakeyaml</artifactId>
			<version>${snakeyaml.version}</version>
		</dependency>

		<!-- 
			JEAF Runtime dependencies
			Runtime dependencies are not scoped as such, because they should not be added manually by projects that 
			make use of JEAF Fast Lane 
		-->
		<dependency>
			<groupId>com.anaptecs.jeaf.x-fun</groupId>
			<artifactId>jeaf-x-fun-impl</artifactId>
			<version>${jeaf.x-fun.impl.version}</version>
		</dependency>

		<dependency>
			<groupId>com.anaptecs.jeaf.x-fun</groupId>
			<artifactId>jeaf-x-fun-default-runtime</artifactId>
			<version>${jeaf.x-fun.impl.version}</version>
			<type>pom</type>
		</dependency>

		<!-- SLF4J Binding is required that Jetty logs are also written using Log4J2 -->
		<dependency>
		    <groupId>org.apache.logging.log4j</groupId>
		    <artifactId>log4j-slf4j-impl</artifactId>
		    <version>${log4j.version}</version>
		</dependency>		

		<dependency>
			<groupId>com.anaptecs.jeaf.core</groupId>
			<artifactId>jeaf-core-service-api</artifactId>
			<version>${jeaf.core.api.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>com.anaptecs.jeaf.generator</groupId>
				<artifactId>jeaf-generator-maven-plugin</artifactId>
				<version>${maven.jeaf-generator-plugin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>Generator</goal>
						</goals>
						<phase>generate-sources</phase>
					</execution>
				</executions>
				<configuration>
					<!-- Define input files and directories where output should be write to. -->
					<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
					<sourceGenDirectory>${project.basedir}/src-gen/main/java</sourceGenDirectory>
					<resourceDirectory>${project.basedir}/src/main/resources</resourceDirectory>
					<resourceGenDirectory>${project.basedir}/src-gen/main/resources</resourceGenDirectory>


					<!-- Configure behavior concerning existing files in src-gen and res-gen directory. It is strongly recommended to clean directories before generating new files. -->
					<cleanSourceGen>true</cleanSourceGen>
					<cleanResourceGen>true</cleanResourceGen>

					<!-- Define resource files that should be ignored when generating message constant classes from resources. -->
					<ignoredResourceFiles>
					</ignoredResourceFiles>

					<!-- Define what should be generated. By default nothing is generated. -->
					<generateMessageConstants>true</generateMessageConstants>

					<!-- Define information that are written to file headers -->
					<fileHeaderCompany>anaptecs GmbH, Ricarda-Huch-Str. 71, 72760 Reutlingen, Germany</fileHeaderCompany>
					<fileHeaderAuthor>JEAF Generator</fileHeaderAuthor>
					<fileHeaderCopyright>Copyright 2004 - 2021. All rights reserved.</fileHeaderCopyright>
					<fileHeaderVersion>JEAF Release 1.5.x</fileHeaderVersion>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.anaptecs.jeaf.maven</groupId>
				<artifactId>jeaf-maven-plugin</artifactId>
				<version>${maven.jeaf-plugin.version}</version>
				<executions>
					<!-- Cleanup run -->
					<execution>
						<id>Clean</id>
						<goals>
							<goal>GenerateJEAFConfig</goal>
						</goals>
						<phase>clean</phase>
						<configuration>
							<testResourceGenDirectory>${basedir}/src-gen/test/resources</testResourceGenDirectory>
							<cleanMetaInfDirectory>true</cleanMetaInfDirectory>
							<cleanOnly>true</cleanOnly>
						</configuration>
					</execution>

					<!-- Generate configuration files for tests -->
					<execution>
						<id>GenerateTestConfigs</id>
						<goals>
							<goal>GenerateJEAFConfig</goal>
						</goals>
						<configuration>
							<testResourceGenDirectory>${basedir}/src-gen/test/resources</testResourceGenDirectory>
							<testTargetDirectory>${basedir}/target/test-classes</testTargetDirectory>
							<excludes>
								<exclude>org.glassfish.jersey.*</exclude>
								<exclude>com.anaptecs.jeaf.fastlane.impl.ManagementResource</exclude>
								<exclude>com.anaptecs.jeaf.fastlane.test.annotation.CustomFastLaneConfig</exclude>
								<exclude>com.anaptecs.jeaf.fastlane.test.annotation.InvalidFastLaneConfig</exclude>
								<exclude>com.anaptecs.jeaf.fastlane.test.annotation.InvalidFastLaneConfig2</exclude>
								<exclude>com.anaptecs.jeaf.fastlane.test.annotation.WorkloadOnlyConfig</exclude>
								<exclude>com.anaptecs.jeaf.fastlane.test.annotation.JMXFastLaneConfig</exclude>
							</excludes>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.anaptecs.jeaf.maven</groupId>
										<artifactId>jeaf-maven-plugin</artifactId>
										<versionRange>[1.5.4,)</versionRange>
										<goals>
											<goal>GenerateJEAFConfig</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.anaptecs.jeaf.generator</groupId>
										<artifactId>jeaf-generator-maven-plugin</artifactId>
										<versionRange>[1.5.11,)</versionRange>
										<goals>
											<goal>Generator</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>