<?xml version="1.0" encoding="UTF-8"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<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>org.apache.jena</groupId>
    <artifactId>jena-fuseki</artifactId>
    <version>5.6.0</version>
  </parent>

  <artifactId>jena-fuseki-mod-geosparql</artifactId>

  <name>Apache Jena - Fuseki MOD - GeoSPARQL</name>
  <description>GeoSPARQL Module for Fuseki</description>

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

  <dependencies>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-geosparql</artifactId>
      <version>5.6.0</version>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-fuseki-main</artifactId>
      <version>5.6.0</version>
      <!-- Note: the 'bundle' profile sets this dependency's scope to 'provided'. -->
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-suite</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j2-impl</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.github.bonigarcia</groupId>
      <artifactId>webdrivermanager</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>bundle</id>
      <!-- Profile to create a shaded jar suitable for use as an extra drop-in jar for Fuseki. -->
      <dependencies>
        <dependency>
          <groupId>org.apache.jena</groupId>
          <artifactId>jena-fuseki-main</artifactId>
          <version>5.6.0</version>
          <scope>provided</scope>
        </dependency>

	<!-- For the bundle, jena-geosparql (compile) declared in this pom is needed.
             However, an override is needed for its transitive dependency on jena-arq. -->
        <dependency>
          <groupId>org.apache.jena</groupId>
          <artifactId>jena-arq</artifactId>
          <version>5.6.0</version>
          <scope>provided</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <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>
                    <!-- Some jars are signed but shading breaks
                    that. Don't include signing files. -->
                    <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>
                    <exclude>META-INF/versions/9/OSGI-INF/MANIFEST.MF</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
            <executions>
              <execution>
                <phase>package</phase>
                <!--<phase /><!- - Switch off -->
                <goals>
                  <goal>shade</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
