<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">

    <modelVersion>4.0.0</modelVersion>

    <groupId>net.logstash.logback</groupId>
    <artifactId>logstash-logback-encoder</artifactId>
    <version>1.3</version>

    <name>Logstash Logback Encoder</name>
    <description>Logback encoder which will output events as Logstash-compatible JSON</description>
    <url>https://github.com/logstash/logstash-logback-encoder</url>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <scm>
        <connection>scm:git:git@github.com:logstash/logstash-logback-encoder.git</connection>
        <developerConnection>scm:git:git@github.com:logstash/logstash-logback-encoder.git</developerConnection>
    </scm>

    <prerequisites>
        <maven>2.2.1</maven>
    </prerequisites>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <ch.qos.logback.version>1.0.12</ch.qos.logback.version>
        <com.fasterxml.jackson.version>2.2.0</com.fasterxml.jackson.version>
        <commons.io.version>2.4</commons.io.version>
        <commons.lang.version>2.6</commons.lang.version>
        <junit.version>4.11</junit.version>
        <org.hamcrest.version>1.3</org.hamcrest.version>
        <org.mockito.version>1.9.5</org.mockito.version>
        <org.slf4j.version>1.7.5</org.slf4j.version>
    </properties>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>neilprosser</id>
            <name>Neil Prosser</name>
            <email>neil.prosser@gmail.com</email>
            <organization>Nokia</organization>
            <organizationUrl>http://music.nokia.com</organizationUrl>
        </developer>
        <developer>
            <id>lusis</id>
            <name>John E. Vincent</name>
            <email>lusis.org+github.com@gmail.com</email>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${ch.qos.logback.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${ch.qos.logback.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${com.fasterxml.jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons.io.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>${commons.lang.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>${org.hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>${org.hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${org.mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <configuration>
                    <header>LICENSE</header>
                    <strictCheck>true</strictCheck>
                    <aggregate>true</aggregate>
                    <encoding>UTF-8</encoding>
                    <failIfMissing>true</failIfMissing>
                    <skipExistingHeaders>true</skipExistingHeaders>
                    <includes>
                        <include>**/src/main/java/**</include>
                        <include>**/src/test/java/**</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.3.7</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <!-- packages to export -->
                        <Export-Package>net.logstash.logback.encoder</Export-Package>
                        <!-- attach to Logback bundle as fragment -->
                        <Fragment-Host>ch.qos.logback.classic</Fragment-Host>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>com.mycila.maven-license-plugin</groupId>
                                        <artifactId>maven-license-plugin</artifactId>
                                        <versionRange>[1.9.0,)</versionRange>
                                        <goals>
                                            <goal>format</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                        <artifactSet>
                            <excludes>
                                <exclude>ch.qos.logback:*</exclude>
                                <exclude>org.slf4j:*</exclude>
                            </excludes>
                        </artifactSet>
                        <relocations>
                            <relocation>
                                <pattern>org.apache.commons.lang</pattern>
                                <shadedPattern>${project.groupId}.encoder.org.apache.commons.lang</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>org.apache.commons.io</pattern>
                                <shadedPattern>${project.groupId}.encoder.org.apache.commons.io</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>com.fasterxml.jackson</pattern>
                                <shadedPattern>${project.groupId}.encoder.com.fasterxml.jackson</shadedPattern>
                            </relocation>
                        </relocations>
                        <shadedArtifactAttached>true</shadedArtifactAttached>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
