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

	<artifactId>jenax-arq-plugins-bundle</artifactId>
	<name>jenax-arq-plugins-bundle</name>
	<packaging>jar</packaging>

	<parent>
		<groupId>org.aksw.jenax</groupId>
		<artifactId>jenax-arq-plugins-parent</artifactId>
		<version>6.1.0-1-SNAPSHOT</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-models-csvw</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.commons</groupId>
			<artifactId>aksw-commons-models-csvw-univocity</artifactId>
		</dependency>

		<!-- Google polyline encoder/decoder for sparql extension functions -->
		<dependency>
			<groupId>com.google.maps</groupId>
			<artifactId>google-maps-services</artifactId>
		</dependency>

		<!-- dbscan -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-math3</artifactId>
		</dependency>

		<!-- Override version of tika -->
		<dependency>
			<groupId>org.ow2.asm</groupId>
			<artifactId>asm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
		</dependency>

		<!-- Uber's h3 library is referenced indirectly via apache sedona -->
		<!--		<dependency>-->
		<!--			<groupId>com.uber</groupId>-->
		<!--			<artifactId>h3</artifactId>-->
		<!--		</dependency>-->

		<!-- javascript -->
		<dependency>
			<groupId>org.openjdk.nashorn</groupId>
			<artifactId>nashorn-core</artifactId>
			<version>15.4</version>
		</dependency>

		<!-- Used only for IteratorClosable and NodeMapperRdfDatatype; try to
		get 
			rid of this dep -->
		<!-- Possibly also used for result set comparison -->
		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-collections</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-plugins-datatypes</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-pathfinding</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-quadengine</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-models-dcat-api</artifactId>
		</dependency>

		<!-- Used for cutsom Aggregators (should probably go to jsa utls) -->
		<dependency>
			<groupId>org.aksw.commons</groupId>
			<artifactId>aksw-commons-collectors</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.commons</groupId>
			<artifactId>aksw-commons-utils-gson</artifactId>
		</dependency>

		<!-- Used for ResultSet comparison -->
		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-utils</artifactId>
		</dependency>

		<!-- Query federation to files in virtual file systems with binary
		search 
			support -->
		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-plugins-service-vfs</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-fromasfilter</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-sameas</artifactId>
		</dependency>

		<!-- Used for binary search via the service clause -->
		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-io-core</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-connection-qlever</artifactId>
		</dependency>

		<!-- Auto-binding of SPARQL and Java functions -->
		<!-- May separate this functionality from resource proxy generation in 
			the future -->
		<!-- <dependency> -->
		<!-- <groupId>org.aksw.jenax</groupId> -->
		<!-- <artifactId>jenax-reprogen-core</artifactId> -->
		<!-- </dependency> -->
		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-functionbinder-core</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-rdfconnection</artifactId>
		</dependency>

		<!-- Used for parsing the CSV options -->
		<dependency>
			<groupId>net.sf.jopt-simple</groupId>
			<artifactId>jopt-simple</artifactId>
		</dependency>

		<!-- Jena -->
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-core</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-arq</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>

		<dependency>
			<groupId>com.jayway.jsonpath</groupId>
			<artifactId>json-path</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>

		<dependency>
			<groupId>commons-validator</groupId>
			<artifactId>commons-validator</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-hdt</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-arq-tika</artifactId>
		</dependency>

		<!-- Geo extensions -->
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-geosparql</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.sis.non-free</groupId>
			<artifactId>sis-embedded-data</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.sis.core</groupId>
			<artifactId>sis-referencing</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.sedona</groupId>
			<artifactId>sedona-common</artifactId>
		</dependency>

		<!-- We should rely on jena-geosparql here but the new
		CoverageSimplifier is not yet in jena ~ 2024-09-11 -->
		<dependency>
			<groupId>org.locationtech.jts</groupId>
			<artifactId>jts-core</artifactId>
		</dependency>

		<!-- <dependency> -->
		<!-- <groupId>com.vividsolutions</groupId> -->
		<!-- <artifactId>jts-core</artifactId> -->
		<!-- </dependency> -->

		<!-- <dependency> -->
		<!-- <groupId>com.vividsolutions</groupId> -->
		<!-- <artifactId>jts-io</artifactId> -->
		<!-- </dependency> -->

		<!-- <dependency> -->
		<!-- <groupId>org.geotools</groupId> -->
		<!-- <artifactId>gt-epsg-hsql</artifactId> -->
		<!-- <version>${geotools.version}</version> -->
		<!-- </dependency> -->

		<!-- <dependency> -->
		<!-- <groupId>org.geotools</groupId> -->
		<!-- <artifactId>gt-geometry</artifactId> -->
		<!-- <version>${geotools.version}</version> -->
		<!-- </dependency> -->

		<!-- <dependency> -->
		<!-- <groupId>org.geotools</groupId> -->
		<!-- <artifactId>gt-referencing</artifactId> -->
		<!-- <version>${geotools.version}</version> -->
		<!-- </dependency> -->

		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
		</dependency>

		<!-- <dependency> -->
		<!-- <groupId>org.springframework</groupId> -->
		<!-- <artifactId>spring-core</artifactId> -->
		<!-- </dependency> -->

		<!-- Unit Testing -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<scope>compile</scope> <!-- HACK because current test container
			version needs junit bundled. -->
		</dependency>

		<dependency>
			<groupId>org.aksw.jenax</groupId>
			<artifactId>jenax-resources-test-config</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<!-- Profile to build a "plugin jar bundle" that can be loaded with fuseki
	or any other jena-based app -->
	<profiles>
		<profile>
			<id>bundle</id>
			<dependencies>
				<dependency>
					<groupId>org.apache.jena</groupId>
					<artifactId>jena-arq</artifactId>
					<scope>provided</scope>
				</dependency>
				<dependency>
					<groupId>org.aksw.jenax</groupId>
					<artifactId>jenax-serviceenhancer-preview</artifactId>
					<scope>provided</scope>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-shade-plugin</artifactId>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>shade</goal>
								</goals>
								<configuration>
									<relocations>
										<relocation>
											<pattern>com.google</pattern>
											<shadedPattern>org.aksw.jenax.shaded.com.google</shadedPattern>
										</relocation>
									</relocations>
									<transformers>
										<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
										<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
										<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
											<addHeader>false</addHeader>
										</transformer>
									</transformers>
									<filters>
										<filter>
											<artifact>*:*</artifact>
											<excludes>
												<exclude>META-INF/*.SF</exclude>
												<exclude>META-INF/*.DSA</exclude>
												<exclude>META-INF/*.RSA</exclude>
												<exclude>META-INF/DEPENDENCIES</exclude>
												<exclude>META-INF/MANIFEST.MF</exclude>
												<exclude>**/module-info.class</exclude>
											</excludes>
										</filter>
									</filters>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Profile that unpacks the class files from the JAR release of this
		maven module. -->
		<!-- Use the command below to create a shaded Fuseki-Mod plugin jar from
		this pom.xml alone. -->
		<!-- The command execution will attempt to download the necessary JAR
		files and only operate on them. -->
		<!-- The Java source code does not have to be present. -->
		<!-- mvn -Punpack-own-classes,bundle -Dmaven.test.skip package -->
		<profile>
			<id>unpack-own-classes</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-dependency-plugin</artifactId>
						<executions>
							<execution>
								<id>unpack-own-classes</id>
								<phase>generate-resources</phase>
								<goals>
									<goal>unpack</goal>
								</goals>
								<configuration>
									<artifactItems>
										<artifactItem>
											<groupId>${project.groupId}</groupId>
											<artifactId>${project.artifactId}</artifactId>
											<version>${project.version}</version>
											<type>jar</type>
											<overWrite>false</overWrite>
											<outputDirectory>${project.build.outputDirectory}</outputDirectory>
										</artifactItem>
									</artifactItems>
									<!-- Skip if classes already exist (normal
									build with sources) -->
									<overWriteIfNewer>false</overWriteIfNewer>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
