<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ WSO2 Inc. licenses this file to you 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.wso2.commons-httpclient</groupId>
    <artifactId>commons-httpclient-parent</artifactId>
    <version>3.1.0-wso2v7</version>
    <name>Commons HTTP Client - WSO2 Parent</name>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>1.2</version>
    </parent>

    <modules>
        <module>commons-httpclient</module>
        <module>orbit</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/wso2/wso2-commons-httpclient.git</connection>
        <developerConnection>scm:git:https://github.com/wso2/wso2-commons-httpclient.git</developerConnection>
        <url>https://github.com/wso2/wso2-commons-httpclient.git/</url>
        <tag>v3.1.0-wso2v7</tag>
    </scm>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${commons-codec.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${commons-logging.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <properties>
        <commons-codec.version>1.2</commons-codec.version>
        <commons-logging.version>1.0.4</commons-logging.version>
        <junit.version>3.8.1</junit.version>

        <project.scm.id>my-scm-server</project.scm.id>
    </properties>


    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.3</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.4</version>
                    <executions>
                        <execution>
                            <id>default-prepare-agent-by-coverage-enforcer</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <configuration>
                                <propertyName>argLine</propertyName>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-report-by-coverage-enforcer</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <configuration>
                                <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-check-by-coverage-enforcer</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                                <rules>
                                    <!-- implementation is needed only for Maven 2 -->
                                    <rule implementation="org.jacoco.maven.RuleConfiguration">
                                        <element>BUNDLE</element>
                                        <limits>
                                            <!-- implementation is needed only for Maven 2 -->
                                            <limit implementation="org.jacoco.report.check.Limit">
                                                <counter>LINE</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>0.0</minimum>
                                            </limit>
                                        </limits>
                                    </rule>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>
                    <configuration>
                        <!-- to increase memory for tests on travis ci -->
                        <argLine>@{argline} -Xmx64m</argLine>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean install</preparationGoals>
                    <autoVersionSubmodules>false</autoVersionSubmodules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

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

    <distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <name>WSO2 Nexus Release Repository</name>
            <url>https://maven.wso2.org/nexus/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>wso2.snapshots</id>
            <name>WSO2 Snapshot Repository</name>
            <url>https://maven.wso2.org/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

</project>
