<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2016 Rob Spoor

  Licensed 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>com.github.robtimus</groupId>
    <artifactId>robtimus-parent</artifactId>
    <version>1.10</version>
    <relativePath />
  </parent>

  <artifactId>sftp-fs</artifactId>
  <version>3.3.1</version>
  <packaging>jar</packaging>

  <name>sftp-fs</name>
  <description>An SFTP NIO.2 file system</description>
  <url>https://robtimus.github.io/sftp-fs/</url>
  <inceptionYear>2016</inceptionYear>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Rob Spoor</name>
      <email>robtimus@users.noreply.github.com</email>
      <url>https://github.com/robtimus/</url>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Pei-Tang Huang</name>
      <url>https://github.com/tan9/</url>
    </contributor>
  </contributors>

  <scm>
    <connection>scm:git:git@github.com:robtimus/sftp-fs.git</connection>
    <developerConnection>scm:git:git@github.com:robtimus/sftp-fs.git</developerConnection>
    <tag>3.3.1</tag>
    <url>https://github.com/robtimus/sftp-fs</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/robtimus/sftp-fs/issues</url>
  </issueManagement>

  <properties>
    <version.fs-core>2.3</version.fs-core>
    <version.jsch>0.2.15</version.jsch>
    <version.junit-support>2.2</version.junit-support>
    <version.simple-pool>1.0</version.simple-pool>
    <version.slf4j>1.7.36</version.slf4j>
    <version.sshd-sftp>2.11.0</version.sshd-sftp>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.github.robtimus</groupId>
      <artifactId>fs-core</artifactId>
      <version>${version.fs-core}</version>
    </dependency>

    <dependency>
      <groupId>com.github.mwiede</groupId>
      <artifactId>jsch</artifactId>
      <version>${version.jsch}</version>
    </dependency>

    <dependency>
      <groupId>com.github.robtimus</groupId>
      <artifactId>simple-pool</artifactId>
      <version>${version.simple-pool}</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.github.robtimus</groupId>
      <artifactId>junit-support</artifactId>
      <version>${version.junit-support}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.sshd</groupId>
      <artifactId>sshd-sftp</artifactId>
      <version>${version.sshd-sftp}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-reload4j</artifactId>
      <version>${version.slf4j}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
            <sourcepath>${project.basedir}/src/main/java</sourcepath>
            <links>
              <link>https://robtimus.github.io/fs-core/apidocs/</link>
            </links>
            <offlineLinks>
              <offlineLink>
                <url>https://javadoc.io/doc/com.github.mwiede/jsch/${version.jsch}/com.jcraft.jsch/</url>
                <location>${project.basedir}/src/main/apidocs/com.github.mwiede/jsch</location>
              </offlineLink>
            </offlineLinks>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>com.github.robtimus</groupId>
        <artifactId>i18n-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <bundleName>com.github.robtimus.filesystems.sftp.fs</bundleName>
              <className>com.github.robtimus.filesystems.sftp.SFTPMessages</className>
              <licenseText>Apache-2.0</licenseText>
              <licenseCopyrightHolder>Rob Spoor</licenseCopyrightHolder>
              <licenseCopyrightYear>2023</licenseCopyrightYear>
              <publicVisibility>false</publicVisibility>
              <suppressWarnings>nls</suppressWarnings>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.moditect</groupId>
        <artifactId>moditect-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>com.github.robtimus</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/src.xml</descriptor>
            <descriptor>src/main/assembly/bin.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>native-module</id>
      <properties>
        <version.java>11</version.java>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <!-- Allow JUnit to fully access the test classes -->
              <argLine>
                @{argLine}
                --add-opens com.github.robtimus.filesystems.sftp/com.github.robtimus.filesystems.sftp=ALL-UNNAMED
                --add-opens com.jcraft.jsch/com.jcraft.jsch=com.github.robtimus.filesystems.sftp
                --add-modules org.slf4j
              </argLine>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.moditect</groupId>
            <artifactId>moditect-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src/moditect</source>
                  </sources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
