<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2001-2015, Zoltan Farkas All Rights Reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-->
<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>

  <groupId>org.spf4j</groupId>
  <artifactId>spf4j-aether</artifactId>
  <packaging>jar</packaging>
  <parent>
    <groupId>org.spf4j</groupId>
    <artifactId>spf4j</artifactId>
    <version>8.9.0</version>
  </parent>
  <name>${project.artifactId}</name>
  <description>Maven artifact retrieval utilities</description>

  <dependencies>
    <dependency>
      <groupId>org.spf4j</groupId>
      <artifactId>spf4j-slf4j-test</artifactId>
      <scope>test</scope>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-aether-provider</artifactId>
      <version>3.3.9</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-impl</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-connector-basic</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-transport-file</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-transport-http</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>findbugs-annotations</artifactId>
      <version>3.0.1</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.2</version>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <properties>
            <property>
              <name>listener</name>
              <value>org.spf4j.test.log.junit4.Spf4jTestLogRunListener</value>
            </property>
          </properties>          
        </configuration>
      </plugin>
                       
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-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-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>create avsc destination folder</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <mkdir dir="target/generated-sources/spf4j-core" />
                <copy todir="target/generated-sources/spf4j-core" verbose="true">
                  <fileset dir="${project.build.directory}/../../spf4j-core/src/main/java/">
                    <include name="org/spf4j/io/Streams.java" />
                    <include name="org/spf4j/io/AppendableWriter.java" />
                    <include name="org/spf4j/io/compress/Compress.java" />
                    <include name="org/spf4j/io/BufferedInputStream.java" />
                    <include name="org/spf4j/recyclable/impl/ArraySuppliers.java" />
                    <include name="org/spf4j/recyclable/SizedRecyclingSupplier.java" />
                    <include name="org/spf4j/recyclable/NonValidatingRecyclingSupplier.java" />
                    <include name="org/spf4j/recyclable/impl/Powerof2ThreadLocalRecyclingSupplier.java" />
                    <include name="org/spf4j/recyclable/impl/Powerof2SizedGlobalRecyclingSupplier.java" />
                    <include name="org/spf4j/recyclable/Disposable.java" />
                    <include name="org/spf4j/recyclable/*Exception.java" />
                    <include name="org/spf4j/recyclable/impl/ThreadLocalRecyclingSupplier.java" />
                    <include name="org/spf4j/base/IntMath.java" />
                    <include name="org/spf4j/base/ReferenceType.java" />
                    <include name="org/spf4j/base/IntSequence.java" />
                  </fileset>
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/spf4j-core/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
