<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<artifactId>jargon-hive-master</artifactId>
		<groupId>org.irods.jargon</groupId>
		<version>1.0-SNAPSHOT</version>
	</parent>
	<groupId>org.irods.jargon</groupId>
	<artifactId>hive-metadata-indexer</artifactId>
	<name>hive-metadata-indexer</name>
	<packaging>bundle</packaging>
	<properties>
		<hive.version>1.0-SNAPSHOT</hive.version>
		<jena.version>2.12.0</jena.version>
		<indexing.wrapper.version>1.0.0-SNAPSHOT</indexing.wrapper.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.irods.jargon</groupId>
			<artifactId>jargon-indexing-wrapper</artifactId>
			<type>jar</type>
			<version>${indexing.wrapper.version}</version> 
		</dependency>
		<dependency>
			<groupId>org.irods.jargon</groupId>
			<artifactId>jargon-hive</artifactId>
			<type>jar</type>
			<version>${hive.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-simple</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
				<exclusion>
					<artifactId>jcl104-over-slf4j</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-sdb</artifactId>
			<type>jar</type>
			<version>1.3.5</version>
			<exclusions>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-simple</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.derby</groupId>
			<artifactId>derby</artifactId>
			<version>10.6.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.irods.jargon</groupId>
			<artifactId>jargon-hive-3store-integration</artifactId>
			<type>jar</type>
			<version>${hive.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-simple</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-sdb</artifactId>
			<type>jar</type>
			<version>1.5.0</version>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.31</version>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-tdb</artifactId>
			<version>1.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.tika</groupId>
			<artifactId>tika-core</artifactId>
			<version>1.5</version>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-iri</artifactId>
			<version>1.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-arq</artifactId>
			<version>2.12.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-core</artifactId>
			<type>jar</type>
			<version>2.12.0</version>
			<exclusions>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.sl4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-simple</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>run</goal>
						</goals>
						<phase>generate-sources</phase>
						<configuration>
							<tasks>
								<property name="src.dir" value="${project.build.sourceDirectory}" />
								<property name="package.dir"
									value="org/irods/jargon/indexing/hive/metadata" />
								<property name="package.name"
									value="org.irods.jargon.indexing.hive.metadata" />
								<property name="buildtime" value="${maven.build.timestamp}" />

								<echo file="${src.dir}/${package.dir}/HiveIndexerVersion.java"
									message="package ${package.name};${line.separator}" />
								<echo file="${src.dir}/${package.dir}/HiveIndexerVersion.java"
									append="true"
									message="public final class HiveIndexerVersion {${line.separator}" />
								<echo file="${src.dir}/${package.dir}/HiveIndexerVersion.java"
									append="true"
									message=" public static String VERSION=&quot;${project.version}&quot;;${line.separator}" />
								<echo file="${src.dir}/${package.dir}/HiveIndexerVersion.java"
									append="true"
									message=" public static String BUILD_TIME=&quot;${buildtime}&quot;;${line.separator}" />
								<echo file="${src.dir}/${package.dir}/HiveIndexerVersion.java"
									append="true" message="}${line.separator}" />
								<echo message="BUILD ${buildtime}" />
							</tasks>
						</configuration>
					</execution>
					<execution>
						<id>0</id>
						<phase>validate</phase>
						<configuration>
							<tasks>
								<delete file="${basedir}/src/test/resources/testing.properties" />
								<touch file="${basedir}/src/test/resources/testing.properties"
									mkdirs="true" />
								<echo file="${basedir}/src/test/resources/testing.properties"
									append="true">
									test.data.directory=${jargon.test.data.directory}
									test.irods.admin=${jargon.test.irods.admin}
									test.irods.admin.password=${jargon.test.irods.admin.password}
									test.irods.user=${jargon.test.irods.user}
									test.irods.password=${jargon.test.irods.password}
									test.irods.resource=${jargon.test.irods.resource}
									test2.irods.user=${jargon.test.irods.user2}
									test2.irods.password=${jargon.test.irods.password2}
									test2.irods.resource=${jargon.test.irods.resource2}
									test3.irods.user=${jargon.test.irods.user3}
									test3.irods.password=${jargon.test.irods.password3}
									test3.irods.resource=${jargon.test.irods.resource3}
									test.irods.host=${jargon.test.irods.host}
									test.irods.port=${jargon.test.irods.port}
									test.irods.zone=${jargon.test.irods.zone}
									test.irods.scratch.subdir=${jargon.test.irods.scratch.subdir}
									indexer.irodsRdfPath=${indexer.irodsRdfPath}
									indexer.jena.db.driver.class=${indexer.jena.db.driver.class}
									indexer.jena.db.password=${indexer.jena.db.password}
									indexer.jena.db.user=${indexer.jena.db.user}
									indexer.jena.db.uri=${indexer.jena.db.uri}
									indexer.jena.db.uri.prefix=${indexer.jena.db.uri.prefix}
									indexer.jena.db.uri.suffix=${indexer.jena.db.uri.suffix}
									indexer.jena.db.type=${indexer.jena.db.type}
									indexer.idrop.context=${indexer.idrop.context}
								</echo>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<debug>true</debug>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>1.4.0</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>wrap-my-dependency</id>
						<goals>
							<goal>wrap</goal>
						</goals>
						<configuration>
							<wrapImportPackage>;</wrapImportPackage>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<instructions>
						<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Name>${project.artifactId}</Bundle-Name>
						<Bundle-Version>${project.version}</Bundle-Version>
						<Private-Package>org.irods.jargon.*</Private-Package>
						<Export-Package>org.irods.jargon.indexing.hive.metadata.*</Export-Package>
						<Bundle-Activator>org.irods.jargon.indexing.hive.metadata.Activator</Bundle-Activator>
						<Import-Package>
							org.osgi.framework,databook.*,*;resolution:=optional
						</Import-Package>
						<Embed-Dependency>tika-core,jena-iri,jena-arq,jargon-indexing-wrapper,jena-core,sl4j-api,sl4j-log4j12,sl4j-simple,jena-sdb,mysql-connector-java;scope=compile|runtime</Embed-Dependency>
						<Embed-Transitive>false</Embed-Transitive>
					</instructions>
				</configuration>
			</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>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-antrun-plugin
										</artifactId>
										<versionRange>[1.3,)</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
