<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>boundbox-parent</artifactId>
    <groupId>org.boundbox</groupId>
    <version>1.2.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>boundbox-library</artifactId>
  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>templating-maven-plugin</artifactId>
                    <versionRange>[1.0-alpha-3,)</versionRange>
                    <goals>
                      <goal>filter-sources</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <annotationProcessors>
            <annotationProcessor>lombok.core.AnnotationProcessor</annotationProcessor>
          </annotationProcessors>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>templating-maven-plugin</artifactId>
        <version>1.0-alpha-3</version>
        <executions>
          <execution>
            <id>filter-src</id>
            <goals>
              <goal>filter-sources</goal>
            </goals>
            <configuration>
              <sourceDirectory>${basedir}/src/main/java-templates</sourceDirectory>
              <outputDirectory>${project.build.directory}/generated-sources/java-templates</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven-shade-plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <minimizeJar>true</minimizeJar>
              <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
              <shadedArtifactAttached>false</shadedArtifactAttached>
              <artifactSet>
                <includes>
                  <include>org.apache.commons:*</include>
                  <include>commons-io:*</include>
                  <include>com.squareup:*</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.apache</pattern>
                  <shadedPattern>org.shaded</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>commons-io</pattern>
                  <shadedPattern>org.shaded</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.squareup</pattern>
                  <shadedPattern>com.shaded</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/license/**</exclude>
                    <exclude>META-INF/*</exclude>
                    <exclude>META-INF/maven/**</exclude>
                    <exclude>LICENSE</exclude>
                    <exclude>NOTICE</exclude>
                    <exclude>/*.txt</exclude>
                    <exclude>templates/**</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <properties>
        <log.level>Level.OFF</log.level>
      </properties>
    </profile>
    <profile>
      <id>coveralls</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>pre-unit-test</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
                </configuration>
              </execution>
              <execution>
                <id>post-unit-test</id>
                <phase>test</phase>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
                  <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <excludes>
                <exclude>**/*Exception.class</exclude>
              </excludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
            <version>2.0.1</version>
            <executions>
              <execution>
                <id>post-unit-test</id>
                <phase>test</phase>
                <goals>
                  <goal>jacoco</goal>
                </goals>
                <configuration>
                  <coverageFile>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</coverageFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>0.12.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>3.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>cglib-nodep</artifactId>
          <groupId>cglib</groupId>
        </exclusion>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <lombok.version>0.12.0</lombok.version>
    <commons-io.version>1.3.2</commons-io.version>
    <junit.version>4.11</junit.version>
    <java.version>1.6</java.version>
    <maven-shade-plugin.version>2.1</maven-shade-plugin.version>
    <maven-compiler-plugin.version>2.5.1</maven-compiler-plugin.version>
    <commons-lang.version>3.1</commons-lang.version>
    <jacoco-maven-plugin.version>0.6.3.201306030806</jacoco-maven-plugin.version>
    <javawriter.version>2.2.0</javawriter.version>
    <easymock.version>3.2</easymock.version>
    <log.level>Level.ALL</log.level>
  </properties>
</project>

