<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>org.openforis.collect</groupId>
		<artifactId>collect-installation</artifactId>
		<version>4.0.49</version>
	</parent>
	<artifactId>collect-assembly</artifactId>
	<packaging>pom</packaging>
	<name>Open Foris Collect Tomcat Assembly</name>
	<description>Collect web application packaged together with Apache Tomcat and related dependencies</description>

	<properties>
		<tomcat.version>9.0.14</tomcat.version>
		<output.directory>collect-server</output.directory>
		<output.finalName>collect-server-${project.version}</output.finalName>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack-tomcat</id>
						<phase>process-sources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.apache.tomcat</groupId>
									<artifactId>tomcat</artifactId>
									<version>${tomcat.version}</version>
									<type>zip</type>
									<overWrite>false</overWrite>
									<outputDirectory>${project.build.directory}/</outputDirectory>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<descriptors>
						<descriptor>src/main/assembly/assemblyDescriptor.xml</descriptor>
					</descriptors>
					<appendAssemblyId>false</appendAssemblyId>
					<finalName>${output.finalName}</finalName>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.openforis.collect</groupId>
			<artifactId>collect-webapp</artifactId>
			<version>4.0.49</version>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-pool</groupId>
			<artifactId>commons-pool</artifactId>
		</dependency>
		<dependency>
			<groupId>org.xerial</groupId>
			<artifactId>sqlite-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
		</dependency>
		<dependency>
			<groupId>meteorite.bi</groupId>
			<artifactId>saiku-webapp-full</artifactId>
			<version>2.6_b</version>
			<type>war</type>
		</dependency>
	</dependencies>
</project>