<!--
   Copyright 2013 greenbird Integration Technology

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License. 
-->
<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>

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

    <name>greenbird OS parent pom</name>
    <description>
        Parent POM for greenbird OS projects. Adds dependency and plugin management and defines common properties.
    </description>
    <url>https://github.com/greenbird/greenbird-os-parent-pom</url>

    <groupId>com.greenbird</groupId>
    <artifactId>greenbird-os-parent</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>

    <organization>
        <name>greenbird Integration Technology</name>
        <url>http://www.greenbird.com</url>
    </organization>

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

    <properties>
        <!-- Project configuration -->
        <encoding>UTF-8</encoding>
        <jdk.version>1.6</jdk.version>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>

        <!-- Library versions -->
        <apache-mina.version>2.0.7</apache-mina.version>
        <cglib.version>2.2.2</cglib.version>
        <commons-io.version>2.4</commons-io.version>
        <commons-lang.version>3.1</commons-lang.version>
        <derby.version>10.10.1.1</derby.version>
        <guava.version>14.0.1</guava.version>
        <hamcrest.version>1.3</hamcrest.version>
        <javax-inject.version>1</javax-inject.version>
        <junit.version>4.11</junit.version>
        <log4j.version>1.2.17</log4j.version>
        <mockito.version>1.9.5</mockito.version>
        <mule.version>3.3.1</mule.version>
        <mule-rest-router.version>1.2</mule-rest-router.version>
        <powermock.version>1.5.1</powermock.version>
        <slf4j.version>1.7.5</slf4j.version>
        <!-- This should be the version of Spring shipped with the current Mule version -->
        <spring.version>3.1.1.RELEASE</spring.version>
        <spring-data-jpa.version>1.3.2.RELEASE</spring-data-jpa.version>

        <!-- Maven plugin version -->
        <maven-antrun.version>1.7</maven-antrun.version>
        <maven-build-helper.version>1.8</maven-build-helper.version>
        <maven-cobertura.version>2.5.2</maven-cobertura.version>
        <maven-compiler.version>3.1</maven-compiler.version>
        <maven-dependency.version>2.8</maven-dependency.version>
        <maven-findbugs.version>2.5.2</maven-findbugs.version>
        <maven-jar.version>2.4</maven-jar.version>
        <maven-javadoc.version>2.9.1</maven-javadoc.version>
        <maven-jaxb2.version>1.0.5</maven-jaxb2.version>
        <maven-jaxws.version>2.3</maven-jaxws.version>
        <maven-jxr.version>2.3</maven-jxr.version>
        <maven-mule.version>1.9</maven-mule.version>
        <maven-pmd.version>3.0.1</maven-pmd.version>
        <maven-project-info-reports.version>2.7</maven-project-info-reports.version>
        <maven-resources.version>2.6</maven-resources.version>
        <maven-site.version>3.3</maven-site.version>
        <maven-source.version>2.2.1</maven-source.version>
        <maven-surefire.version>2.15</maven-surefire.version>
        <maven-taglist.version>2.4</maven-taglist.version>
        <maven-xml.version>1.0</maven-xml.version>
    </properties>

    <scm>
        <connection>scm:git:git@github.com:greenbird/greenbird-os-parent-pom.git</connection>
        <developerConnection>scm:git:git@github.com:greenbird/greenbird-os-parent-pom.git</developerConnection>
        <url>git@github.com:greenbird/greenbird-os-parent-pom.git</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/greenbird/greenbird-os-parent-pom/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Jenkins</system>
        <url>https://build.greenbird.com/job/greenbird-os-parent-pom/</url>
    </ciManagement>

    <developers>
        <developer>
            <name>Christian Nedregård</name>
            <email>christian.nedregaard@greenbird.com</email>
        </developer>
    </developers>

    <dependencyManagement>
        <dependencies>

            <!-- Apache -->
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.mina</groupId>
                <artifactId>mina-core</artifactId>
                <version>${apache-mina.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Java -->
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${javax-inject.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Log4J -->
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>${log4j.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Mule libraries -->
            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-core</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.mule.patterns</groupId>
                <artifactId>mule-pattern-core</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.patterns</groupId>
                <artifactId>mule-patterns</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- Mule Transports -->
            <dependency>
                <groupId>org.mule.transports</groupId>
                <artifactId>mule-transport-file</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.transports</groupId>
                <artifactId>mule-transport-http</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.transports</groupId>
                <artifactId>mule-transport-jdbc</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.transports</groupId>
                <artifactId>mule-transport-jms</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.transports</groupId>
                <artifactId>mule-transport-quartz</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.transports</groupId>
                <artifactId>mule-transport-vm</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- Mule Modules -->
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-cxf</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-json</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-management</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-scripting</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-spring-config</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-spring-security</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-rest-router</artifactId>
                <version>${mule-rest-router.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.tools.devkit</groupId>
                <artifactId>mule-devkit-annotations</artifactId>
                <version>${mule.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- SLF4J -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${slf4j.version}</version>
                <scope>runtime</scope>
            </dependency>

            <!-- Spring -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-expression</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-core</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${spring.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-jpa</artifactId>
                <version>${spring-data-jpa.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Others -->
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>${cglib.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Test dependencies -->
            <dependency>
                <groupId>org.apache.derby</groupId>
                <artifactId>derby</artifactId>
                <version>${derby.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-core</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.tests</groupId>
                <artifactId>mule-tests-functional</artifactId>
                <version>${mule.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <build>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${maven-antrun.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.mule.tools</groupId>
                    <artifactId>maven-mule-plugin</artifactId>
                    <version>${maven-mule.version}</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler.version}</version>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <encoding>${encoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>${maven-cobertura.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${maven-build-helper.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.jvnet.jax-ws-commons</groupId>
                    <artifactId>jaxws-maven-plugin</artifactId>
                    <version>${maven-jaxws.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xml-maven-plugin</artifactId>
                    <version>${maven-xml.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <!-- 
            Plugins defined here will be executed for all child POMs.
        -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <check>
                        <haltOnFailure>true</haltOnFailure>
                        <branchRate>90</branchRate>
                        <lineRate>90</lineRate>
                        <regexes>
                            <!--
                                DEFAULT COVERAGE CHECK OVERRIDES

                                Classes that does not need to be tested.
                            -->
                            <regex>
                                <pattern>.*Exception</pattern>
                                <branchRate>0</branchRate>
                                <lineRate>0</lineRate>
                            </regex>
                            <regex>
                                <pattern>.*DTO</pattern>
                                <branchRate>0</branchRate>
                                <lineRate>0</lineRate>
                            </regex>
                        </regexes>
                    </check>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>
</project>
