<?xml version="1.0" encoding="UTF-8"?>
<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>io.earcam</groupId>
		<artifactId>io.earcam.instrumental</artifactId>
		<version>0.1.0</version>
	</parent>

	<groupId>io.earcam.instrumental</groupId>
	<artifactId>io.earcam.instrumental.lade</artifactId>
	<packaging>jar</packaging>

	<description>Not just the usual fudge of ClassLoader.defineClass() - loads in-memory JARs returning valid resource URLs</description>

	<!--  
		Issues with surefire and JUnit 5 (due to multiple executions of surefire), mean
		that we're stuck on JUnit 4 for now
	-->
	<distributionManagement>
		<site>
			<id>site</id>
			<url>${site.url}${earcam.project.name.short}/</url>
		</site>
	</distributionManagement>

	<properties>
		<skip.execution.pitest>false</skip.execution.pitest>
		<tidy.skip>false</tidy.skip>
		<earcam.project.name.short>lade</earcam.project.name.short>
	</properties>

	<dependencies>
		<dependency>
			<groupId>io.earcam</groupId>
			<artifactId>io.earcam.unexceptional</artifactId>
		</dependency>

		<dependency>
			<groupId>io.earcam.utilitarian</groupId>
			<artifactId>io.earcam.utilitarian.io</artifactId>
		</dependency>

		<dependency>
			<groupId>io.earcam.utilitarian</groupId>
			<artifactId>io.earcam.utilitarian.security</artifactId>
		</dependency>

		<dependency>
			<groupId>io.earcam.instrumental</groupId>
			<artifactId>io.earcam.instrumental.reflect</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		
		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>java-hamcrest</artifactId>
		</dependency>

		<dependency>
			<groupId>org.ops4j.pax.tinybundles</groupId>
			<artifactId>tinybundles</artifactId>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<inherited>true</inherited>
				<executions>
					<execution>
						<id>default-test</id>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
					<execution>
						<id>test-as-system-classloader</id>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<forkCount>1</forkCount>
							<reuseForks>false</reuseForks>
							<argLine>-Djava.system.class.loader=${project.artifactId}.InMemoryClassLoader</argLine>
<!-- 							<systemProperties> -->
<!-- 								<java.system.class.loader>${project.artifactId}.InMemoryClassLoader</java.system.class.loader> -->
<!-- 							</systemProperties> -->
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
