<?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">
  <parent>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-parent</artifactId>
    <version>52</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jetbrains.intellij.deps</groupId>
  <artifactId>commons-vfs2-project</artifactId>
  <name>Apache Commons VFS Project</name>
  <description>Apache Commons VFS is a Virtual File System library.</description>
  <packaging>pom</packaging>
  <version>3.0.2</version>

  <url>http://commons.apache.org/proper/commons-vfs/</url>
  <inceptionYear>2002</inceptionYear>

  <modules>
    <module>common-vfs2</module>
    <module>commons-vfs2-jackrabbit2</module>
    <module>common-vfs2-examples</module>
    <module>common-vfs2-distribution</module>
  </modules>

  <issueManagement>
    <system>jira</system>
    <url>https://issues.apache.org/jira/browse/VFS</url>
  </issueManagement>

  <scm>
    <connection>scm:git:https://gitbox.apache.org/repos/asf/commons-vfs.git</connection>
    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-vfs.git</developerConnection>
    <url>https://gitbox.apache.org/repos/asf?p=commons-vfs.git</url>
    <tag>commons-vfs-project-2.9.0</tag>
  </scm>

  <developers>
    <developer>
      <name>Adam Murdoch</name>
      <id>adammurdoch</id>
      <email>adammurdoch -at- apache.org</email>
      <organization />
    </developer>
    <developer>
      <name>James Strachan</name>
      <id>jstrachan</id>
      <email>jstrachan -at- apache.org</email>
      <organization>SpiritSoft, Inc.</organization>
    </developer>
    <developer>
      <name>Mario Ivankovits</name>
      <id>imario</id>
      <email>imario -at- apache.org</email>
      <organization>OPS EDV Gmbh</organization>
    </developer>
    <developer>
      <name>Rahul Akolkar</name>
      <id>rahul</id>
      <email>rahul -at- apache.org</email>
      <organization>The Apache Software Foundation</organization>
    </developer>
    <developer>
      <name>James Carman</name>
      <id>jcarman</id>
      <email>jcarman -at- apache.org</email>
      <organization>The Apache Software Foundation</organization>
    </developer>
    <developer>
      <name>Ralph Goers</name>
      <id>rgoers</id>
      <email>rgoers -at- apache.org</email>
      <organization>Intuit</organization>
    </developer>
    <developer>
      <name>Joerg Schaible</name>
      <id>joehni</id>
      <email>joehni -at- apache.org</email>
    </developer>
    <developer>
      <id>ggregory</id>
      <name>Gary Gregory</name>
      <email>ggregory at apache.org</email>
      <url>https://www.garygregory.com</url>
      <organization>The Apache Software Foundation</organization>
      <organizationUrl>https://www.apache.org/</organizationUrl>      
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/New_York</timezone>
      <properties>
        <picUrl>https://people.apache.org/~ggregory/img/garydgregory80.png</picUrl>
      </properties>
    </developer>
    <developer>
      <name>Bernd Eckenfels</name>
      <id>ecki</id>
      <email>ecki -at- apache.org</email>
      <url>http://bernd.eckenfels.net</url>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Rami Ojares</name>
      <email>rami.ojares -at- elisa.fi</email>
    </contributor>
    <contributor>
      <name>Anthony Goubard</name>
      <email>adagoubard -at- chello.nl</email>
    </contributor>
    <contributor>
      <name>Christopher Ottley</name>
      <email>xknight -at- users.sourceforge.net</email>
    </contributor>
    <contributor>
      <name>Dave Marion</name>
      <email>dlmarion -at- apache.org</email>
    </contributor>
    <contributor>
      <name>Scott Bjerstedt</name>
      <email>jcottbjer -at- gmail.com</email>
    </contributor>
    <contributor>
      <name>Jose Juan Montiel</name>
      <email>josejuan.montiel -at- gmail.com</email>
    </contributor>
    <contributor>
      <name>Otto Fowler</name>
      <email>otto -at- apache.org</email>
    </contributor>
  </contributors>

  <properties>
    <commons.encoding>UTF-8</commons.encoding>

    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!-- bare ID without major version or commons- prefix -->
    <commons.componentid>vfs</commons.componentid>
    <commons.packageId>vfs2</commons.packageId>
    <commons.module.name>org.apache.commons.vfs2</commons.module.name>
    <commons.jira.id>VFS</commons.jira.id>
    <commons.jira.pid>12310495</commons.jira.pid>
    <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-vfs</commons.scmPubUrl>
    <commons.siteOutputDirectory>${basedir}/../target/site</commons.siteOutputDirectory>
    <commons.releaseNotesLocation>${basedir}/../RELEASE-NOTES.txt</commons.releaseNotesLocation>
    <commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl>
    <commons.release.version>2.9.0</commons.release.version>
    <!-- Commons Release Plugin -->
    <commons.bc.version>2.8.0</commons.bc.version>
    <commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>
    <commons.releaseManagerKey>86fdc7e2a11262cb</commons.releaseManagerKey>
    <commons.rc.version>RC1</commons.rc.version>
    <commons.release.name>commons-vfs-${commons.release.version}</commons.release.name>
    <commons.release.desc>(requires Java 8)</commons.release.desc>

    <vfs.parent.dir>${basedir}</vfs.parent.dir>
    <version.checkstyle>3.1.2</version.checkstyle>
    <!-- make sure bundle plugin has dependency informations for 'optional' -->
    <commons.osgi.excludeDependencies/>
    <commons.osgi.import>
      org.apache.hadoop.*;resolution:=optional,
      org.apache.jackrabbit.*;resolution:=optional,
      org.apache.tools.ant.*;resolution:=optional,
      org.apache.commons.httpclient.*;resolution:=optional,
      *
    </commons.osgi.import>
    <maven.javadoc.skip>true</maven.javadoc.skip>
    <dependency.locations.enabled>false</dependency.locations.enabled>
    <jackrabbit2.version>2.21.7</jackrabbit2.version>
    <commons.surefire.version>3.0.0-M5</commons.surefire.version>
    <commons.japicmp.version>0.15.3</commons.japicmp.version>
    <commons.jacoco.version>0.8.7</commons.jacoco.version>
    <commons.spotbugs.version>4.3.0</commons.spotbugs.version>
    <commons.spotbugs.impl.version>4.3.0</commons.spotbugs.impl.version>
    <commons.asm.version>9.2</commons.asm.version>
    <commons.pmd.version>6.37.0</commons.pmd.version>
    <commons.javadoc.version>3.3.0</commons.javadoc.version>
    <commons.felix.version>5.1.2</commons.felix.version>
    <commons.animal-sniffer.version>1.20</commons.animal-sniffer.version>
    <biz.aQute.bndlib.version>5.3.0</biz.aQute.bndlib.version>
    <slf4j.version>1.7.26</slf4j.version>
    <log4j2.version>2.14.1</log4j2.version>
    <clirr.skip>true</clirr.skip>
    <japicmp.skip>false</japicmp.skip>
    <jacoco.skip>false</jacoco.skip>
  </properties>

  <build>
    <defaultGoal>clean package apache-rat:check japicmp:cmp javadoc:javadoc spotbugs:check</defaultGoal>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.14.0</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${commons.spotbugs.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${commons.asm.version}</version>
            </dependency>
            <dependency>
              <groupId>com.github.spotbugs</groupId>
              <artifactId>spotbugs</artifactId>
              <version>${commons.spotbugs.impl.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <!--  Fixes org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19 -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${commons.project-info.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.bcel</groupId>
              <artifactId>bcel</artifactId>
              <version>6.5.0</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${version.checkstyle}</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>9.0</version>
            </dependency>
          </dependencies>
          <!-- Keep build/reporting in sync -->
          <configuration>
            <!--<propertiesLocation>${vfs.parent.dir}/checkstyle.properties</propertiesLocation> -->
            <configLocation>${vfs.parent.dir}/checkstyle.xml</configLocation>
            <suppressionsLocation>${vfs.parent.dir}/checkstyle-suppressions.xml</suppressionsLocation>
            <enableRulesSummary>false</enableRulesSummary>
            <propertyExpansion>basedir=${basedir}</propertyExpansion>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <!-- Should agree with config in reporting section -->
          <configuration>
            <excludes combine.children="append">
              <!--  trivial test data text files -->
              <exclude>src/test/resources/test-data/**/*.bin</exclude>
              <exclude>src/test/resources/test-data/**/*.txt</exclude>
              <exclude>src/test/resources/test-data/**/*.tgz</exclude>
              <exclude>src/test/resources/test-data/**/*.tbz2</exclude>
              <exclude>src/test/resources/test-data/test.mf</exclude>
              <!--  implicite exclude does not work if sandbox profile is not activated -->
              <exclude>commons-vfs2-sandbox/**</exclude>
              <exclude>dist/target/**</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <configuration>
            <skip>true</skip>
          </configuration>
          <executions>
            <execution>
              <phase>none</phase>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <resources>
      <resource>
        <directory>${basedir}/osgi</directory>
        <targetPath>osgi</targetPath>
        <includes>
          <include>MANIFEST.MF</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>vfs-jar-manifest</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <mkdir dir="${project.build.directory}/osgi" />
                <touch file="${project.build.directory}/osgi/MANIFEST.MF" />
              </target>
            </configuration>
          </execution>
          <execution>
            <id>javadoc.resources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <copy todir="${project.build.directory}/apidocs/META-INF">
                  <fileset dir="${vfs.parent.dir}">
                    <include name="LICENSE.txt" />
                    <include name="NOTICE.txt" />
                  </fileset>
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <!-- to increase memory for tests on Travis CI -->
          <argLine>-Xmx64m</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.github.siom79.japicmp</groupId>
        <artifactId>japicmp-maven-plugin</artifactId>
        <configuration>
          <parameter>
            <overrideCompatibilityChangeParameters>
              <overrideCompatibilityChangeParameter>
                <compatibilityChange>METHOD_NEW_DEFAULT</compatibilityChange>
                <binaryCompatible>true</binaryCompatible>
                <sourceCompatible>true</sourceCompatible>
                <semanticVersionLevel>PATCH</semanticVersionLevel>
              </overrideCompatibilityChangeParameter>
            </overrideCompatibilityChangeParameters>
            <excludes>
              <!--  Package moved to new module -->
              <exclude>org.apache.commons.vfs2.provider.webdav</exclude>
            </excludes>
          </parameter>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <threshold>Normal</threshold>
          <effort>Default</effort>
          <excludeFilterFile>${vfs.parent.dir}/findbugs-exclude-filter.xml</excludeFilterFile>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-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>
        <version>${commons.javadoc.version}</version>
        <configuration>
          <tags>
            <tag>
              <name>todo</name>
              <!-- todo tag for all places -->
              <placement>a</placement>
              <head>To Do:</head>
            </tag>
          </tags>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <threshold>Normal</threshold>
          <effort>Default</effort>
          <excludeFilterFile>${vfs.parent.dir}/findbugs-exclude-filter.xml</excludeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <configuration>
          <targetJdk>${maven.compiler.target}</targetJdk>
          <aggregate>true</aggregate>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.siom79.japicmp</groupId>
        <artifactId>japicmp-maven-plugin</artifactId>
        <configuration>
          <parameter>
            <overrideCompatibilityChangeParameters>
              <overrideCompatibilityChangeParameter>
                <compatibilityChange>METHOD_NEW_DEFAULT</compatibilityChange>
                <binaryCompatible>true</binaryCompatible>
                <sourceCompatible>true</sourceCompatible>
                <semanticVersionLevel>PATCH</semanticVersionLevel>
              </overrideCompatibilityChangeParameter>
            </overrideCompatibilityChangeParameters>
            <excludes>
              <!--  Package moved to new module -->
              <exclude>org.apache.commons.vfs2.provider.webdav</exclude>
            </excludes>
          </parameter>
        </configuration>
      </plugin>
      <!-- cobertura breaks because it cannot parse annotations in methods. -->
      <!--
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${commons.cobertura.version}</version>
      </plugin>
      -->
      <!-- javancss breaks because it cannot parse annotations in methods. -->
      <!--
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javancss-maven-plugin</artifactId>
        <version>2.0</version>
      </plugin>
      -->
    </plugins>
  </reporting>

  <dependencyManagement>
    <dependencies>
      <!-- artifacts of project, versions managed by release-plugin -->
      <dependency>
        <groupId>org.jetbrains.intellij.deps</groupId>
        <artifactId>commons-vfs2</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jetbrains.intellij.deps</groupId>
        <artifactId>commons-vfs2</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jetbrains.intellij.deps</groupId>
        <artifactId>commons-vfs2-sandbox</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jetbrains.intellij.deps</groupId>
        <artifactId>commons-vfs2-examples</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- 3rd party dependencies -->
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>commons-net</groupId>
        <artifactId>commons-net</artifactId>
        <version>3.8.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.4</version>
      </dependency>
      <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <version>3.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.13</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents.client5</groupId>
        <artifactId>httpclient5</artifactId>
        <version>5.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.21</version>
      </dependency>
      <dependency>
        <groupId>ant</groupId>
        <artifactId>ant</artifactId>
        <version>1.6.5</version>
      </dependency>
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch</artifactId>
        <version>0.1.55</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.12.0</version>
      </dependency>
      <!-- Testing -->
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-slf4j-impl</artifactId>
        <version>${log4j2.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>${log4j2.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>3.11.2</version>
      </dependency>
      <!-- Test FTP with Apache FTP Server (MINA) -->
      <dependency>
        <groupId>org.apache.ftpserver</groupId>
        <artifactId>ftpserver-core</artifactId>
        <version>1.1.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>
      <!-- Test SFTP with Apache SSHd Server (MINA) -->
      <dependency>
        <groupId>org.apache.sshd</groupId>
        <artifactId>sshd-core</artifactId>
        <version>0.8.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.mina</groupId>
        <artifactId>mina-core</artifactId>
        <version>2.1.4</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk16</artifactId>
        <version>1.46</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.11.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <distributionManagement>
    <repository>
      <id>space-intellij-dependencies</id>
      <url>https://packages.jetbrains.team/maven/p/ij/intellij-dependencies</url>
    </repository>
  </distributionManagement>

  <!-- Releasing VFS as a multi-module build with binary artifacts is somewhat painful. This profile hooks into the commons-parent
    and the apache-pom to get the build done and then uses the assembly to package it up. -->
  <profiles>
    <profile>
      <id>include-sandbox</id>
      <modules>
        <module>commons-vfs2-sandbox</module>
      </modules>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <!-- Don't build the archives here. They are constructed in the dist project -->
              <execution>
            <configuration>
                  <skipAssembly>true</skipAssembly>
            </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
    <id>java11+</id>
    <activation>
      <jdk>[11,)</jdk>
    </activation>
      <build>
        <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
            <!-- -Xmx64m: increases memory for tests on Travis CI -->
            <!--  jdk.tls.client.protocols: For use of older protocol since DSA is no longer in the JRE -->
            <argLine>-Xmx64m -Djdk.tls.client.protocols=TLSv1.2</argLine>
                </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>
