<?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>parent</artifactId>
    <groupId>io.prometheus.jmx</groupId>
    <version>0.17.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jmx_prometheus_httpserver</artifactId>
  <name>Prometheus JMX Exporter - Http Server</name>
  <description>See https://github.com/prometheus/jmx_exporter/blob/master/README.md</description>
  <url>http://github.com/prometheus/jmx_exporter</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer>
                  <manifestEntries>
                    <Main-Class>io.prometheus.jmx.WebServer</Main-Class>
                  </manifestEntries>
                </transformer>
              </transformers>
              <createSourcesJar>true</createSourcesJar>
              <shadeSourcesContent>true</shadeSourcesContent>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <includeDependencySources>true</includeDependencySources>
              <dependencySourceIncludes>
                <dependencySourceInclude>${project.groupId}:*</dependencySourceInclude>
              </dependencySourceIncludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.vafer</groupId>
        <artifactId>jdeb</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jdeb</goal>
            </goals>
            <configuration>
              <dataSet>
                <data>
                  <src>${project.build.directory}/${project.build.finalName}.jar</src>
                  <type>file</type>
                  <mapper>
                    <type>perm</type>
                    <prefix>/usr/share/jmx_exporter</prefix>
                    <filemode>644</filemode>
                  </mapper>
                </data>
                <data>
                  <src>${basedir}/src/deb/config</src>
                  <type>directory</type>
                  <mapper>
                    <type>perm</type>
                    <prefix>/etc/jmx_exporter</prefix>
                  </mapper>
                </data>
                <data>
                  <src>${basedir}/src/deb/bin/jmx_exporter</src>
                  <type>file</type>
                  <mapper>
                    <type>perm</type>
                    <prefix>/usr/bin</prefix>
                    <filemode>755</filemode>
                  </mapper>
                </data>
              </dataSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>
</project>
