<?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>graphql4sparql-fuseki-mod</artifactId>
	<name>graphql4sparql-fuseki-mod</name>
	<description>GraphQL Fuseki Module</description>

	<parent>
		<groupId>org.aksw.graphql4sparql</groupId>
		<artifactId>graphql4sparql-parent</artifactId>
		<version>0.7.0-SNAPSHOT</version>
	</parent>

	<properties>
		<automatic.module.name>org.apache.jena.fuseki.graphql4sparql</automatic.module.name>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.aksw.graphql4sparql</groupId>
			<artifactId>graphql4sparql-engine</artifactId>
		</dependency>

		<dependency>
			<groupId>org.aksw.graphql4sparql</groupId>
			<artifactId>graphql4sparql-ui</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-fuseki-server</artifactId>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</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>test-deps</id>-->
		<!--			<activation>-->
		<!--				<activeByDefault>true</activeByDefault>-->
		<!--			</activation>-->
		<!--			<dependencies>-->
		<!--				<dependency>-->
		<!--					<groupId>org.apache.jena</groupId>-->
		<!--					<artifactId>jena-fuseki-main</artifactId>-->
		<!--					<scope>compile</scope>-->
		<!--				</dependency>-->
		<!--			</dependencies>-->
		<!--		</profile>-->

		<profile>
			<id>bundle</id>
			<dependencies>
				<dependency>
					<groupId>org.apache.jena</groupId>
					<artifactId>jena-arq</artifactId>
					<scope>provided</scope>
				</dependency>
				<dependency>
					<groupId>org.apache.jena</groupId>
					<artifactId>jena-fuseki-server</artifactId>
					<scope>provided</scope>
				</dependency>
				<dependency>
					<groupId>jakarta.servlet</groupId>
					<artifactId>jakarta.servlet-api</artifactId>
					<version>6.1.0</version>
					<scope>provided</scope>
				</dependency>
				<dependency>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</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>
								    <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
									<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>
	</profiles>
</project>
