<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>
  <parent>
    <groupId>jp.skypencil.findbugs.slf4j</groupId>
    <artifactId>findbugs-slf4j</artifactId>
    <version>1.2.4</version>
  </parent>
  <artifactId>bug-pattern</artifactId>
  <url>https://github.com/KengoTODA/findbugs-slf4j</url>
  <build>
    <plugins>
      <plugin>
        <!--
          Copy meta files to default outputDirectory at "prepare-package" phase.

          Because of findbugs specification, an edu.umd.cs.findbugs.PluginDoesntContainMetadataException
          instance would be thrown at "test" phase if we put these meta files on '/src/main/resources'.
          We have to copy these meta files after testing.

          See "How to build FindBugs plugin with Maven" thread in FindBugs mailing list
          (findbugs-discuss@cs.umd.edu) to get detail and other solution.

          Note: You should execute "clean" phase before you execute "test" phase.
        -->
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/meta</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createDependencyReducedPom>false</createDependencyReducedPom>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>findbugs</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
  </dependencies>
</project>
