<?xml version="1.0" encoding="UTF-8"?>
<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>

  <name>bytecompressor-huffman</name>
  <description>Avast fork of https://github.com/nayuki/Huffman-Coding , it adds bytecompressor layer compatibility.</description>
  
  <groupId>com.avast</groupId>
  <artifactId>bytecompressor-huffman</artifactId>
  <version>1.1.2</version>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    <url>https://github.com/avast-open/bytecompressor-huffman</url>
    <licenses>
        <license>
            <name>AThe MIT License (MIT)</name>
            <url>http://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <organization>
        <name>AVAST Software</name>
        <url>http://www.avast.com</url>
    </organization>

    <developers>
        <developer>
            <id>karas</id>
            <name>Lukas Karas</name>
            <email>karas@avast.com</email>
            <organization>AVAST Software</organization>
            <organizationUrl>http://www.avast.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:avast-open/bytecompressor-huffman.git</connection>
        <developerConnection>scm:git:git@github.com:avast-open/bytecompressor-huffman.git</developerConnection>
        <url>git@github.com:avast-open/bytecompressor-huffman.git</url>
    </scm>
  
  
    <properties>
        <timestamp>${maven.build.timestamp}</timestamp>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <scalaVersion>2.9.2</scalaVersion>
        <scalaVersionLong>2.9.2</scalaVersionLong>
    </properties>

 <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Staging Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

    
  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <archive>
            <manifest>
              <useUniqueVersions>false</useUniqueVersions>
              <addClasspath>true</addClasspath>
              <mainClass>com.avast.strup.client.netty.TestMain</mainClass>
              <classpathPrefix>lib/</classpathPrefix>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

        <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>3.1.3</version>

            <configuration>
                <scalaVersion>${scalaVersionLong}</scalaVersion>
            </configuration>

            <executions>

                <execution>
                    <id>compile</id>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                    <phase>compile</phase>
                </execution>

                <execution>
                    <id>test-compile</id>
                    <goals>
                        <goal>testCompile</goal>
                    </goals>
                    <phase>test-compile</phase>
                </execution>

                <execution>
                    <id>compile-2</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>

                <execution>
                    <id>test-compile-2</id>
                    <phase>process-test-resources</phase>
                    <goals>
                        <goal>testCompile</goal>
                    </goals>
                </execution>

                <execution>
                    <id>compile-generated</id>
                    <phase>generate-test-sources</phase>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>

                <execution>
                    <id>compile-3</id>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>

            </executions>
        </plugin>
      
      <plugin>
          <groupId>org.scalatest</groupId>
          <artifactId>scalatest-maven-plugin</artifactId>
          <configuration>
              <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
              <junitxml>.</junitxml>
              <filereports>TestReport.txt</filereports>
          </configuration>
          <executions>
              <execution>
                  <id>test</id>
                  <goals>
                      <goal>test</goal>
                  </goals>
              </execution>
          </executions>
      </plugin>
                
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*.java</include>
                        <include>**/*.scala</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>    
            

    </plugins>

  </build>

  <dependencies>
    
    <dependency>
      <groupId>com.avast</groupId>
      <artifactId>bytecompressor</artifactId>
      <version>1.1.2</version>
    </dependency>
    
    <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>2.4.1</version>
    </dependency>

    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>2.9.2</version>
    </dependency>
    
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>    
    
    <dependency>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest_2.9.1</artifactId>
        <version>1.8</version>
        <scope>test</scope>
    </dependency>
    
  </dependencies>     
  
</project>
