<?xml version="1.0" encoding="utf-8"?>
<!--
    # Copyright (c) 2014-2015, WSO2 Inc. (http://www.wso2.org)
    #
    # 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">
    <parent>
        <groupId>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>1</version>
    </parent>

    <groupId>org.wso2.carbon.metrics</groupId>
    <artifactId>carbon-metrics</artifactId>
    <version>1.3.4</version>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <name>Metrics</name>
    <description>WSO2 Carbon Metrics is an API for WSO2 Carbon Components to use Coda Hale's Metrics library
    </description>
    <inceptionYear>2014</inceptionYear>

    <prerequisites>
        <maven>3.0.1</maven>
    </prerequisites>

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

    <scm>
        <url>https://github.com/wso2/carbon-metrics.git</url>
        <developerConnection>scm:git:https://github.com/wso2/carbon-metrics.git</developerConnection>
        <connection>scm:git:https://github.com/wso2/carbon-metrics.git</connection>
        <tag>v1.3.4</tag>
    </scm>

    <modules>
        <module>service-stubs/org.wso2.carbon.metrics.data.service.stub</module>
        <module>components/org.wso2.carbon.metrics.jdbc.reporter</module>
        <module>components/org.wso2.carbon.metrics.das.reporter</module>
        <module>components/org.wso2.carbon.metrics.manager</module>
        <module>components/org.wso2.carbon.metrics.annotation</module>
        <module>components/org.wso2.carbon.metrics.common</module>
        <module>components/org.wso2.carbon.metrics.impl</module>
        <module>components/org.wso2.carbon.metrics.data.common</module>
        <module>components/org.wso2.carbon.metrics.data.service</module>
        <module>components/org.wso2.carbon.metrics.view.ui</module>
        <module>features/carbon-metrics</module>
        <module>features/repository</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.common</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.manager</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.jdbc.reporter</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.das.reporter</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.impl</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.data.common</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.data.service</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.data.service.stub</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.view.ui</artifactId>
                <version>${carbon.metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.eclipse.osgi</groupId>
                <artifactId>org.eclipse.osgi</artifactId>
                <version>${eclipse.osgi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.eclipse.osgi</groupId>
                <artifactId>org.eclipse.osgi.services</artifactId>
                <version>${equinox.osgi.services.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-jvm</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-stax-api_1.0_spec</artifactId>
                <version>${stax.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-api</artifactId>
                <version>${axiom.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-impl</artifactId>
                <version>${axiom.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon</groupId>
                <artifactId>org.wso2.carbon.core</artifactId>
                <version>${carbon.kernel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon</groupId>
                <artifactId>org.wso2.carbon.ui</artifactId>
                <version>${carbon.kernel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.securevault</groupId>
                <artifactId>org.wso2.securevault</artifactId>
                <version>${securevault.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon</groupId>
                <artifactId>org.wso2.carbon.utils</artifactId>
                <version>${carbon.kernel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon</groupId>
                <artifactId>org.wso2.carbon.registry.core</artifactId>
                <version>${carbon.kernel.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-io.wso2</groupId>
                        <artifactId>commons-io</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.analytics-common</groupId>
                <artifactId>org.wso2.carbon.databridge.agent</artifactId>
                <version>${carbon.analytics.common.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>slf4j.wso2</groupId>
                        <artifactId>slf4j</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.analytics-common</groupId>
                <artifactId>org.wso2.carbon.databridge.commons</artifactId>
                <version>${carbon.analytics.common.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.org.owasp.encoder</groupId>
                <artifactId>encoder</artifactId>
                <version>${encoder.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>${log4j.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${h2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${spring.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>tomcat-catalina</artifactId>
                <version>${tomcat.version}</version>
                <scope>test</scope>
            </dependency>


            <!-- Service Stubs - Start -->
            <dependency>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2</artifactId>
                <version>${axis2.wso2.version}</version>
            </dependency>
            <dependency>
                <groupId>wsdl4j.wso2</groupId>
                <artifactId>wsdl4j</artifactId>
                <version>${wsdl4j.wso2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.logging</groupId>
                <artifactId>pax-logging-api</artifactId>
                <version>${pax.logging.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.schema.wso2</groupId>
                <artifactId>XmlSchema</artifactId>
                <version>${xmlschema.wso2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom.wso2</groupId>
                <artifactId>axiom</artifactId>
                <version>${axiom.wso2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.neethi.wso2</groupId>
                <artifactId>neethi</artifactId>
                <version>${neethi.wso2.version}</version>
            </dependency>
            <!-- Service Stubs - End -->

            <!-- Features - Start -->
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.server.feature</artifactId>
                <version>${carbon.metrics.version}</version>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.metrics</groupId>
                <artifactId>org.wso2.carbon.metrics.ui.feature</artifactId>
                <version>${carbon.metrics.version}</version>
                <type>zip</type>
            </dependency>
            <!-- Features - End -->
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.scr.ds-annotations</artifactId>
                <version>${apache.felix.scr.ds.annotations.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.ds-annotations</artifactId>
            <version>${apache.felix.scr.ds.annotations.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean install</preparationGoals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                    <excludeFilterFile>${project.parent.basedir}/findbugs-exclude.xml</excludeFilterFile>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven.bundle.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.wso2.maven</groupId>
                    <artifactId>carbon-p2-plugin</artifactId>
                    <version>${carbon.p2.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven.war.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.axis2</groupId>
                    <artifactId>axis2-java2wsdl-maven-plugin</artifactId>
                    <version>${axis2.wso2.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build.helper.maven.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugs.maven.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>pedantic</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.rat</groupId>
                        <artifactId>apache-rat-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>README.md</exclude>
                                <exclude>.travis.yml</exclude>
                                <exclude>**/*.json</exclude>
                                <exclude>**/images/*</exclude>
                                <exclude>**/plugins/**</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <carbon.metrics.version>1.3.4</carbon.metrics.version>
        <junit.version>4.12</junit.version>
        <metrics.version>3.2.5</metrics.version>
        <metrics.version.range>[3.1.0, 4.0.0)</metrics.version.range>
        <eclipse.osgi.version>3.11.0.v20160603-1336</eclipse.osgi.version>
        <equinox.osgi.services.version>3.5.100.v20160504-1419</equinox.osgi.services.version>
        <carbon.kernel.version>4.5.1</carbon.kernel.version>
        <carbon.kernel.version.range>[4.5.0, 5.0.0)</carbon.kernel.version.range>
        <!-- Registry Core exports version 1.0.1 -->
        <carbon.registry.version.range>[1.0.0, 5.0.0)</carbon.registry.version.range>
        <carbon.analytics.common.version>5.2.13</carbon.analytics.common.version>
        <carbon.analytics.common.version.range>[5.2.0, 6.0.0)</carbon.analytics.common.version.range>
        <carbon.p2.plugin.version>5.1.2</carbon.p2.plugin.version>
        <securevault.version>1.1.3</securevault.version>
        <stax.api.version>1.0.1</stax.api.version>
        <axiom.version>1.2.19</axiom.version>
        <axiom.version.range>[1.2.0,1.3.0)</axiom.version.range>
        <commons-io.version>2.5</commons-io.version>
        <commons-io.wso2.version.range>[2.0.0, 3.0.0)</commons-io.wso2.version.range>
        <gson.version>2.8.5</gson.version>
        <gson.version.range>[2.0.0, 3.0.0)</gson.version.range>
        <slf4j.version>1.7.21</slf4j.version>
        <slf4j.version.range>[1.7.0,1.8.0)</slf4j.version.range>
        <log4j.version>1.2.17</log4j.version>
        <!-- Cannot use a latest version (1.4.185). We need to use a compatible version with Carbon's H2 library -->
        <h2.version>1.4.199</h2.version>
        <spring.version>4.3.1.RELEASE</spring.version>
        <mockito.version>1.10.19</mockito.version>
        <javax.ws.rs.version>2.0.1</javax.ws.rs.version>
        <!-- scr plugin version 1.7.4 is required to recognize javadoc comments for scr components -->
        <maven.scr.plugin.version>1.26.0</maven.scr.plugin.version>
        <maven.bundle.plugin.version>3.2.0</maven.bundle.plugin.version>
        <maven.dependency.plugin.version>2.10</maven.dependency.plugin.version>
        <maven.war.plugin.version>2.6</maven.war.plugin.version>
        <build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
        <findbugs.maven.plugin.version>3.0.2</findbugs.maven.plugin.version>
        <tomcat.version>8.0.36</tomcat.version>
        <encoder.version>1.2.0.wso2v1</encoder.version>
        <encoder.version.range>[1.2.0,2)</encoder.version.range>

        <!-- Service Stubs - Start -->
        <commons.logging.version>1.2</commons.logging.version>
        <axis2.wso2.version>1.6.1-wso2v38</axis2.wso2.version>
        <axis2.wso2.version.range>[1.6.0, 1.7.0)</axis2.wso2.version.range>
        <wsdl4j.wso2.version>1.6.2.wso2v4</wsdl4j.wso2.version>
        <xmlschema.wso2.version>1.4.7.wso2v3</xmlschema.wso2.version>
        <axiom.wso2.version>1.2.11-wso2v16</axiom.wso2.version>
        <neethi.wso2.version>2.0.4.wso2v4</neethi.wso2.version>
        <!-- Service Stubs - End -->
        <apache.felix.scr.ds.annotations.version>1.2.4</apache.felix.scr.ds.annotations.version>
        <pax.logging.api.version>1.10.1</pax.logging.api.version>
    </properties>

    <pluginRepositories>
        <pluginRepository>
            <id>wso2.releases</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </pluginRepository>
        <pluginRepository>
            <id>wso2.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
        <pluginRepository>
            <id>wso2-nexus</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>

</project>
