<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>sfm-reflect</artifactId>
	<packaging>bundle</packaging>

	<parent>
		<groupId>org.simpleflatmapper</groupId>
		<artifactId>sfm-parent</artifactId>
		<version>3.17.0</version>
	</parent>

	<description>Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.</description>

	<developers>
		<developer>
			<id>arnaudroger</id>
			<name>Arnaud Roger</name>
			<email>arnaud.roger@gmail.com</email>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>The MIT License (MIT)</name>
			<url>http://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<dependencies>
		<dependency>
			<groupId>org.simpleflatmapper</groupId>
			<artifactId>sfm-util</artifactId>
			<version>3.17.0</version>
			<classifier>${jar.classifier}</classifier>
		</dependency>
		<dependency>
			<groupId>org.simpleflatmapper</groupId>
			<artifactId>sfm-converter</artifactId>
			<version>3.17.0</version>
			<classifier>${jar.classifier}</classifier>
		</dependency>
		<dependency>
			<groupId>org.simpleflatmapper</groupId>
			<artifactId>sfm-test</artifactId>
			<version>3.17.0</version>
			<classifier>${jar.classifier}</classifier>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.simpleflatmapper</groupId>
			<artifactId>sfm-tuples</artifactId>
			<version>3.17.0</version>
			<classifier>${jar.classifier}</classifier>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<version>2.5.4</version>
				<configuration>
					<classifier>${jar.classifier}</classifier>
					<instructions>
						<Export-Package>
							org.simpleflatmapper.reflect,
							org.simpleflatmapper.reflect.meta,
							org.simpleflatmapper.reflect.asm,
							org.simpleflatmapper.reflect.instantiator,
							org.simpleflatmapper.reflect.getter,
							org.simpleflatmapper.reflect.setter,
							org.simpleflatmapper.reflect.primitive,
							org.simpleflatmapper.reflect.property,
							org.simpleflatmapper.ow2asm,
							org.simpleflatmapper.ow2asm.signature
						</Export-Package>
						<Import-Package>org.simpleflatmapper.util</Import-Package>

						<Require-Capability>osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
						<Provide-Capability>osgi.serviceloader;osgi.serviceloader=org.simpleflatmapper.reflect.meta.AliasProviderProducer,org.simpleflatmapper.reflect.ReflectionService.ClassMetaFactoryProducer</Provide-Capability>

					</instructions>
					<archive>
						<manifestEntries>
							<Automatic-Module-Name>org.simpleflatmapper.reflect</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.pitest</groupId>
				<artifactId>pitest-maven</artifactId>
				<version>1.1.9</version>
				<configuration>
					<targetClasses>
						<param>org.simpleflatmapper.*</param>
					</targetClasses>
					<targetTests>
						<param>org.simpleflatmapper.*</param>
					</targetTests>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
					<execution>
						<id>copy-asm</id>
						<phase>process-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.simpleflatmapper</groupId>
									<artifactId>ow2asm</artifactId>
									<version>5_1</version>
								</artifactItem>
							</artifactItems>
							<outputDirectory>target/classes</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>travis</id>
			<activation>
				<property>
					<name>env.TRAVIS</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<configuration>
							<excludes>
								<exclude>**/ow2asm/**</exclude>
							</excludes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jdk16</id>
			<activation>
				<jdk>1.6</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>com.google.code.maven-replacer-plugin</groupId>
						<artifactId>replacer</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jdk17</id>
			<activation>
				<jdk>1.7</jdk>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.boundary</groupId>
					<artifactId>fasttuple-core</artifactId>
					<version>0.1</version>
					<optional>true</optional>
					<scope>test</scope>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>com.google.code.maven-replacer-plugin</groupId>
						<artifactId>replacer</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jdk18</id>
			<activation>
				<jdk>1.8</jdk>
			</activation>

			<dependencies>
				<dependency>
					<groupId>org.jooq</groupId>
					<artifactId>jool</artifactId>
					<version>0.9.12</version>
					<optional>true</optional>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>com.boundary</groupId>
					<artifactId>fasttuple-core</artifactId>
					<version>0.1</version>
					<optional>true</optional>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>jdk19</id>
			<activation>
				<jdk>[9,11]</jdk>
			</activation>
			<dependencies>
				<dependency>
					<groupId>org.jooq</groupId>
					<artifactId>jool</artifactId>
					<version>0.9.12</version>
					<optional>true</optional>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>com.boundary</groupId>
					<artifactId>fasttuple-core</artifactId>
					<version>0.1</version>
					<optional>true</optional>
					<scope>test</scope>
				</dependency>
				<!--<dependency>-->
					<!--<groupId>org.simpleflatmapper</groupId>-->
					<!--<artifactId>ow2asm</artifactId>-->
					<!--<version>6.0_ALPHA</version>-->
					<!--<scope>provided</scope>-->
				<!--</dependency>-->
			</dependencies>

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

                        <executions>
                            <execution>
                                <id>default-testCompile</id>
                                <phase>test-compile</phase>
                                <configuration>
									<fork>true</fork>
									<compilerArgs>
										<arg>--add-exports</arg>
										<arg>org.simpleflatmapper.reflect/org.simpleflatmapper.reflect.impl=org.simpleflatmapper.reflect.test</arg>
									</compilerArgs>
                                </configuration>
                                <goals>
                                    <goal>testCompile</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-dependency-plugin</artifactId>
						<version>3.0.2</version>
						<executions>
							<execution>
								<id>copy-asm</id>
								<phase>process-resources</phase>
								<goals>
									<goal>unpack</goal>
								</goals>
								<configuration>
									<artifactItems>
										<artifactItem>
											<groupId>org.simpleflatmapper</groupId>
											<artifactId>ow2asm</artifactId>
											<version>6.0</version>
										</artifactItem>
									</artifactItems>
									<outputDirectory>target/classes</outputDirectory>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.20.1</version>
						<dependencies>
							<dependency>
								<groupId>org.apache.maven.surefire</groupId>
								<artifactId>maven-surefire-common</artifactId>
								<version>2.20.1-pj10</version>
							</dependency>
						</dependencies>

						<configuration>
							<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						
						<configuration>
							<failOnError>false</failOnError>
							<additionalDependencies>
								<additionalDependency>
									<groupId>org.simpleflatmapper</groupId>
									<artifactId>ow2asm</artifactId>
									<version>6.0_ALPHA</version>
								</additionalDependency>
							</additionalDependencies>	
						</configuration>
					</plugin>
				</plugins>

			</build>

		</profile>

	</profiles>
</project>
