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

	<artifactId>ontologizerlib-io</artifactId>
	<packaging>jar</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>ontologizerlib-io contains Java classes for file I/O</description>
	<url>https://github.com/ontologizer/OntologizerLib</url>

	<parent>
		<groupId>de.ontologizer</groupId>
		<artifactId>OntologizerLib</artifactId>
		<version>0.1</version>
	</parent>

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

	<dependencies>
		<dependency>
			<groupId>de.ontologizer</groupId>
			<artifactId>ontologizerlib-core</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<!--Use filtering so that maven will replace placeholders with values 
					from the pom e.g. ${project.version} -->
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<!-- Specify the dependencies to copy -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.8</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- Specify the resources which need to be made accessible to the user -->
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>validate</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/resources</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/resources</directory>
									<!--Use filtering so that maven will replace placeholders with values 
										from the pom e.g. ${project.version} -->
									<filtering>true</filtering>
									<includes>
										<include>application.properties</include>
										<include>example.settings</include>
										<include>test.settings</include>
										<include>log4j2.xml</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Generate a jar for the test as well, primarily to make the resources available -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
