<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>net.bytebuddy</groupId>
    <artifactId>byte-buddy-parent</artifactId>
    <version>0.2</version>
    <packaging>pom</packaging>

    <inceptionYear>2014</inceptionYear>

    <name>Byte Buddy (parent)</name>
    <description>
        Byte Buddy is a Java library for creating Java classes at run time.
        The parent artifact contains configuration information that concern all submodules.
    </description>
    <url>http://bytebuddy.net</url>

    <modules>
        <module>byte-buddy</module>
        <module>byte-buddy-dep</module>
        <module>byte-buddy-benchmark</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <code.level>1.6</code.level>
        <cobertura.exclude.benchmark.generated>
            net/bytebuddy/benchmark/generated/**/*.class
        </cobertura.exclude.benchmark.generated>
        <cobertura.exclude.benchmark.runner>
            net/bytebuddy/benchmark/runner/**/*.class
        </cobertura.exclude.benchmark.runner>
        <distribution.bintray>https://api.bintray.com/maven/raphw/maven/ByteBuddy</distribution.bintray>
        <shade.source>org.objectweb.asm</shade.source>
        <shade.target>net.bytebuddy.jar.asm</shade.target>
        <version.asm>5.0.3</version.asm>
        <version.junit>4.11</version.junit>
        <version.mockito>1.9.5</version.mockito>
        <version.plugin.compiler>3.1</version.plugin.compiler>
        <version.plugin.install>2.5.1</version.plugin.install>
        <version.plugin.javadoc>2.9.1</version.plugin.javadoc>
        <version.plugin.source>2.2.1</version.plugin.source>
        <version.plugin.shade>2.2</version.plugin.shade>
        <version.plugin.gpg>1.4</version.plugin.gpg>
        <version.plugin.jxr>2.3</version.plugin.jxr>
        <version.plugin.release>2.5</version.plugin.release>
        <version.plugin.resources>2.6</version.plugin.resources>
        <version.plugin.cobertura>2.6</version.plugin.cobertura>
        <version.plugin.coveralls>2.2.0</version.plugin.coveralls>
        <version.plugin.checkstyle>2.12.1</version.plugin.checkstyle>
    </properties>

    <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>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>raphw</id>
            <name>Rafael Winterhalter</name>
            <email>rafael.wth@web.de</email>
            <url>http://mydailyjava.blogspot.com</url>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <issueManagement>
        <system>github.com</system>
        <url>https://github.com/raphw/byte-buddy/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git@github.com:raphw/byte-buddy.git</connection>
        <developerConnection>scm:git:git@github.com:raphw/byte-buddy.git</developerConnection>
        <url>git@github.com:raphw/byte-buddy.git</url>
        <tag>byte-buddy-parent-0.2</tag>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>${version.asm}</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-util</artifactId>
                <version>${version.asm}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.mockito}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <!-- Define release properties -->
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>${version.plugin.release}</version>
                <configuration>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>extras</releaseProfiles>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
            <!-- Configure Cobertura support for evaluating test case coverage -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${version.plugin.cobertura}</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <instrumentation>
                        <excludes>
                            <exclude>${cobertura.exclude.benchmark.generated}</exclude>
                            <exclude>${cobertura.exclude.benchmark.runner}</exclude>
                        </excludes>
                    </instrumentation>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                    <check />
                </configuration>
            </plugin>
            <!-- Generate coveralls reports from Travis -->
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>${version.plugin.coveralls}</version>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.plugin.resources}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.plugin.install}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.plugin.compiler}</version>
                    <inherited>true</inherited>
                    <configuration>
                        <source>${code.level}</source>
                        <target>${code.level}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>${version.plugin.jxr}</version>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>
        <repository>
            <id>bintray</id>
            <url>${distribution.bintray}</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>extras</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- Create source code artifact -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.plugin.source}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Create javadoc artifact -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.plugin.javadoc}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Sign artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.plugin.gpg}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>checks</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- Check style on build -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>${version.plugin.checkstyle}</version>
                        <executions>
                            <execution>
                                <id>validate</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <configLocation>checkstyle.xml</configLocation>
                                    <consoleOutput>true</consoleOutput>
                                    <failsOnError>true</failsOnError>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
