<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2018, 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>
    <parent>
        <groupId>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>5</version>
    </parent>
    <groupId>org.wso2.charon</groupId>
    <artifactId>charon-parent</artifactId>
    <packaging>pom</packaging>
    <version>4.0.29</version>
    <name>WSO2 Charon - Parent</name>
    <description>WSO2 Charon - SCIM Implementation</description>
    <url>http://wso2.com</url>

    <scm>
        <connection>scm:git:https://github.com/wso2/charon</connection>
        <developerConnection>scm:git:https://github.com/wso2/charon</developerConnection>
        <url>https://github.com/wso2/charon</url>
        <tag>v4.0.29</tag>
    </scm>

    <modules>
        <module>modules/charon-core</module>
        <module>modules/charon-utils</module>
        <module>modules/charon-impl</module>
        <module>modules/charon-samples</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.json.wso2</groupId>
                <artifactId>json</artifactId>
                <version>${json.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-api</artifactId>
                <version>${axiom.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-impl</artifactId>
                <version>${axiom.impl.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>${servlet.api.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>${jsr311.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.msf4j</groupId>
                <artifactId>msf4j-swagger</artifactId>
                <version>${msf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.msf4j</groupId>
                <artifactId>msf4j-core</artifactId>
                <version>${msf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.charon</groupId>
                <artifactId>org.wso2.charon3.core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.charon</groupId>
                <artifactId>org.wso2.charon3.utils</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${fasterxml.jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>${commons.lang.version}</version>
            </dependency>
            <!-- Pax Logging -->
            <dependency>
                <groupId>org.ops4j.pax.logging</groupId>
                <artifactId>pax-logging-api</artifactId>
                <version>${pax.logging.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-1.2-api</artifactId>
                <version>${log4j.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-inline</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
            </dependency>
                <dependency>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <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>Internal Releases</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
-->
    </distributionManagement>

    <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>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>-->
    </repositories>

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>3.3.2</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler.plugin.version}</version>
                    <inherited>true</inherited>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <source>${src.java.version}</source>
                        <target>${target.java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${war.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${bundle.plugin.version}</version>
                    <configuration>
                        <obrRepository>NONE</obrRepository>
                        <instructions>
                            <SCM-Revision>${buildNumber}</SCM-Revision>
                        </instructions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>${maven.buildnumber.plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <doCheck>false</doCheck>
                        <doUpdate>false</doUpdate>
                    </configuration>
                </plugin>
                <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                    <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </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.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
            </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
    </build>

    <profiles>
        <profile>
            <id>wso2-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration> <!-- add this to disable checking -->
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                        <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <commons-logging.osgi.version.range>[1.2,2.0)</commons-logging.osgi.version.range>
        <axiom.osgi.version.range>[1.2.11, 2.0.0)</axiom.osgi.version.range>
        <json.version>3.0.0.wso2v1</json.version>
        <axiom.api.version>1.2.22</axiom.api.version>
        <axiom.impl.version>1.2.22</axiom.impl.version>
        <servlet.api.version>2.5</servlet.api.version>
        <jsr311.api.version>1.1.1</jsr311.api.version>
        <project.scm.id>my-scm-server</project.scm.id>

        <!--plugin versions-->
        <compiler.plugin.version>3.8.1</compiler.plugin.version>

        <war.plugin.version>3.2.3</war.plugin.version>
        <bundle.plugin.version>4.2.0</bundle.plugin.version>

        <maven.buildnumber.plugin.version>1.4</maven.buildnumber.plugin.version>

        <src.java.version>1.8</src.java.version>
        <target.java.version>1.8</target.java.version>

        <msf4j.version>2.7.3</msf4j.version>
        <fasterxml.jackson.core.version>2.12.6.1</fasterxml.jackson.core.version>
        <commons.lang.version>2.6</commons.lang.version>
        <commons-lang.wso2.osgi.version.range>[2.6.0, 3.0.0)</commons-lang.wso2.osgi.version.range>

        <slf4j.version>1.7.26</slf4j.version>
        <maven.findbugsplugin.version>3.0.4</maven.findbugsplugin.version>
        <maven.surefire.plugin.version>2.22.0</maven.surefire.plugin.version>

        <!-- Pax Logging Version -->
        <pax.logging.api.version>1.10.1</pax.logging.api.version>

        <log4j.api.version>2.12.0</log4j.api.version>
        <testng.version>6.9.10</testng.version>
        <jacoco.version>0.8.6</jacoco.version>
        <mockito.version>3.10.0</mockito.version>

        <sonar.projectKey>wso2_charon</sonar.projectKey>
        <sonar.moduleKey>${artifactId}</sonar.moduleKey>
        <sonar.organization>wso2</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    
        <jacoco.version>0.8.12</jacoco.version>
    </properties>

</project>
