<?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>logspace</artifactId>
    <groupId>io.logspace</groupId>
    <version>0.3.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>logspace-jvm-agent</artifactId>
  <name>Logspace JVM Agent</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <shadeTestJar>false</shadeTestJar>
          <createSourcesJar>true</createSourcesJar>
          <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
          <shadeSourcesContent>true</shadeSourcesContent>
          <relocations>
            <relocation>
              <pattern>io.logspace.agent</pattern>
              <shadedPattern>io.logspace.jvm.agent</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.slf4j</pattern>
              <shadedPattern>io.logspace.jvm.agent.shaded.slf4j</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>build.properties</exclude>
              </excludes>
            </filter>
          </filters>
          <transformers>
            <transformer>
              <manifestEntries>
                <Premain-Class>io.logspace.jvm.agent.Premain</Premain-Class>
                <Agent-Class>io.logspace.jvm.agent.Premain</Agent-Class>
              </manifestEntries>
            </transformer>
          </transformers>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <executions>
          <execution>
            <id>integration-test</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <excludes>
                <exclude>none</exclude>
              </excludes>
              <includes>
                <include>**/*IT.java</include>
              </includes>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/*IT.java</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <properties>
    <project.build.compiler.version>1.6</project.build.compiler.version>
  </properties>
</project>

