<?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/maven-v4_0_0.xsd">

  <!-- Build the Jena download file.
       Assumes it is run as part of the module build (not run standalone)
       with a complete svn tree for the active codebase available.
  -->

  <modelVersion>4.0.0</modelVersion>
  <artifactId>apache-jena</artifactId>
  <packaging>pom</packaging>
  <name>Apache Jena - Distribution</name>
  <url>https://jena.apache.org/</url>
  <description>
    Apache Jena is a API and toolkit for working with semantic web technologies such as RDF and SPARQL using Java.  This artifact represents the source and binary distribution packages generated for releases.
  </description>

  <parent>
    <groupId>org.apache.jena</groupId>
    <artifactId>jena</artifactId>
    <version>4.3.2</version>
    <relativePath>..</relativePath>
  </parent>

  <organization>
    <name>Apache Jena</name>
    <url>https://jena.apache.org/</url>
  </organization>

  <licenses>
    <license>
      <name>Apache 2.0 License</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <dependencies>
    <!-- 
      Enumerate dependencies explicitly to get source as well.
    -->
    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-arq</artifactId>
      <version>4.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-arq</artifactId>
      <version>4.3.2</version>
      <classifier>sources</classifier>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-core</artifactId>
      <version>4.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-core</artifactId>
      <version>4.3.2</version>
      <classifier>sources</classifier>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-tdb</artifactId>
      <version>4.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-tdb</artifactId>
      <version>4.3.2</version>
      <classifier>sources</classifier>
      <optional>true</optional>
    </dependency>

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

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-rdfconnection</artifactId>
      <version>4.3.2</version>
      <classifier>sources</classifier>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-shacl</artifactId>
      <version>4.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-shacl</artifactId>
      <version>4.3.2</version>
      <classifier>sources</classifier>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-shex</artifactId>
      <version>4.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-shex</artifactId>
      <version>4.3.2</version>
      <classifier>sources</classifier>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-cmds</artifactId>
      <version>4.3.2</version>
    </dependency>

    <!-- Require a logging implementation for command line tools --> 
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-cmds</artifactId>
      <version>4.3.2</version>
      <classifier>sources</classifier>
      <optional>true</optional>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <tarLongFileMode>gnu</tarLongFileMode>
        </configuration>
        <executions>
          <execution>
            <id>create-jena-download</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <appendAssemblyId>false</appendAssemblyId>
              <tarLongFileMode>posix</tarLongFileMode>
              <descriptors>
                <descriptor>assembly-jena-zip.xml</descriptor>
              </descriptors>
              <tarLongFileFormat>gnu</tarLongFileFormat>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
      <!-- 
      Use the dependencies plugin to copy the dependencies into the lib/ directory which makes the scripts work in dev enivronments 
      - -> JENA-1173
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-libs-for-scripts</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <overWriteSnapshots>true</overWriteSnapshots>
              <includeScope>runtime</includeScope>
              <includeTypes>jar</includeTypes>
              <outputDirectory>lib/</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      -->

      <!-- 
      As we copy dependencies into lib/ to make scripts work in dev environments we also need to clean up that directory
      - -> JENA-1173
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>lib/</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      -->
    </plugins>
  </build>

</project>
