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

	<parent>
		<artifactId>maven-parent</artifactId>
		<groupId>org.gcube.tools</groupId>
		<version>1.0.0</version>
		<relativePath />
	</parent>


	<modelVersion>4.0.0</modelVersion>
	<groupId>org.gcube.data.analysis</groupId>
	<artifactId>nlphub</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>war</packaging>

	<properties>
		<tomcat.version>7.0.70</tomcat.version>
		<websocket.version>1.1</websocket.version>
		<distroDirectory>distro</distroDirectory>
		<configDirectory>config</configDirectory>
		<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>


		<!-- Java -->
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<KEYS>${env.KEYS}</KEYS>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>


	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>maven-portal-bom</artifactId>
				<version>LATEST</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.5.3</version>
		</dependency>
		<!-- JSON -->
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.2</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>common-authorization</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>authorization-client</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.resources.discovery</groupId>
			<artifactId>discovery-client</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-configuration-scanner</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.resources</groupId>
			<artifactId>registry-publisher</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-scope</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Information System Client IC-Client -->
		<dependency>
			<groupId>org.gcube.resources.discovery</groupId>
			<artifactId>ic-client</artifactId>
		</dependency>

		<!-- Sevlet jars for compilation, provided by Tomcat -->
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-servlet-api</artifactId>
			<version>${tomcat.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<scope>compile</scope>
		</dependency>


		<!-- LOGGER -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- JUnit TEST -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
	<build>
		<finalName>nlphub</finalName>
		<plugins>
			<!-- Copy static web files before executing gwt:run -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<executions>
					<execution>
						<phase>compile</phase>
						<!--<goals> <goal>exploded</goal> </goals> -->
					</execution>
				</executions>
				<configuration>
					<webappDirectory>${webappDirectory}</webappDirectory>
					<warName>${project.build.finalName}</warName>

					<!-- Include static jar into WEB-INF/lib -->
					<!-- <webResources> <resource> <directory>lib</directory> <includes> 
						<include>*.jar</include> </includes> <targetPath>WEB-INF/lib</targetPath> 
						</resource> </webResources> -->
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>${distroDirectory}/descriptor.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>servicearchive</id>
						<phase>install</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>


		</plugins>
	</build>

</project>