<?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-modeshape</artifactId>
		<groupId>org.irods.jargon</groupId>
		<version>1.0-SNAPSHOT</version>
	</parent>
	<artifactId>irods-connector</artifactId>
	<name>irods-connector</name>
	<packaging>jar</packaging>
	<description>ModeShape connector implementation for iRODS</description>
	<dependencies>
		<dependency>
			<groupId>javax.jcr</groupId>
			<artifactId>jcr</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.modeshape</groupId>
			<artifactId>modeshape-jcr-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.modeshape</groupId>
			<artifactId>modeshape-jcr</artifactId>
		</dependency>
		<dependency>
			<groupId>org.modeshape</groupId>
			<artifactId>modeshape-schematic</artifactId>
		</dependency>
		<dependency>
			<groupId>org.modeshape</groupId>
			<artifactId>modeshape-common</artifactId>
		</dependency>
		<dependency>
			<groupId>org.irods.jargon</groupId>
			<artifactId>jargon-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-core</artifactId>
			<version>1.3</version>
		</dependency>
		<dependency>
			<groupId>org.infinispan</groupId>
			<artifactId>infinispan-core</artifactId>
		
		</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/modeshape/connector" />
								<property name="package.name" value="org.irods.jargon.modeshape.connector" />
								<property name="buildtime" value="${maven.build.timestamp}" />

								<echo file="${src.dir}/${package.dir}/ConnectorVersion.java"
									message="package ${package.name};${line.separator}" />
								<echo file="${src.dir}/${package.dir}/ConnectorVersion.java"
									append="true" message="public final class ConnectorVersion {${line.separator}" />
								<echo file="${src.dir}/${package.dir}/ConnectorVersion.java"
									append="true"
									message=" public static String VERSION=&quot;${pom.version}&quot;;${line.separator}" />
								<echo file="${src.dir}/${package.dir}/ConnectorVersion.java"
									append="true"
									message=" public static String BUILD_TIME=&quot;${buildtime}&quot;;${line.separator}" />
								<echo file="${src.dir}/${package.dir}/ConnectorVersion.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.modeshape.skip.dir.build.if.root.exists=${test.modeshape.skip.dir.build.if.root.exists}
									test.modeshape.large.test=${test.modeshape.large.test}
									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}
									jargon.test.user.group=${jargon.test.user.group}
									test.resource.group=${jargon.test.resource.group}
									test.irods.scratch.subdir=${jargon.test.irods.scratch.subdir}

								</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>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id> <!-- this is used for inheritance merges -->
						<phase>package</phase> <!-- bind to the packaging phase -->
						<goals>
							<goal>single</goal>
						</goals>
					</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>
											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>
