<!--
  ~ Copyright (c) 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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.wso2.am.microgw</groupId>
    <artifactId>micro-gateway-parent</artifactId>
    <packaging>pom</packaging>
    <version>4.0.0-m9</version>
    <name>Micro Gateway - Parent</name>

    <url>https://wso2.org</url>
    <organization>
        <name>WSO2</name>
        <url>https://wso2.org/</url>
    </organization>

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

    <scm>
        <url>https://github.com/wso2/product-microgateway.git</url>
        <developerConnection>scm:git:https://github.com/wso2/product-microgateway.git</developerConnection>
        <connection>scm:git:https://github.com/wso2/product-microgateway.git</connection>
        <tag>v4.0.0-m9</tag>
    </scm>

    <modules>
        <module>adapter</module>
        <module>enforcer</module>
        <module>router</module>
        <module>distribution</module>
        <module>test</module>
    </modules>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven.checkstyle.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${shade.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${maven.spotbugs.version}</version>
                </plugin>
                <plugin>
                    <groupId>io.fabric8</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <version>${io.fabric8.docker.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.xolstice.maven.plugins</groupId>
                    <artifactId>protobuf-maven-plugin</artifactId>
                    <version>${protobuf.maven.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build.helper.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <source>8</source>
                        <detectJavaApiLink>false</detectJavaApiLink>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <!--This parameter disables doclint-->
                                <doclint>none</doclint>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <replaceregexp file="resources/docker-compose.yaml" match="wso2\/mg\-router\:.*" replace="wso2/mg-router:${project.version}" byline="true" />
                                <replaceregexp file="resources/docker-compose.yaml" match="wso2\/mg\-adapter\:.*" replace="wso2/mg-adapter:${project.version}" byline="true" />
                                <replaceregexp file="resources/docker-compose.yaml" match="wso2\/mg\-enforcer\:.*" replace="wso2/mg-enforcer:${project.version}" byline="true" />
                                <replaceregexp file="remove-containers.sh" match="micro_gw_version=.*" replace="micro_gw_version=${project.version}" byline="true" />
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean install</preparationGoals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <goals>deploy docker:push</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-models</artifactId>
                <version>${swagger.v3.models.version}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger.parser.v3</groupId>
                <artifactId>swagger-parser</artifactId>
                <version>${swagger.v3.parser.version}</version>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>${org.json.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>net.minidev</groupId>
                <artifactId>json-smart</artifactId>
                <version>${json.smart.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.andes.wso2</groupId>
                <artifactId>andes-client</artifactId>
                <version>${andes.client.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jms_1.1_spec</artifactId>
                <version>${geronimo.jms11.spec.version}</version>
            </dependency>
            <dependency>
                <groupId>com.moandjiezana.toml</groupId>
                <artifactId>toml4j</artifactId>
                <version>${toml4j.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>${protobuf.java.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-netty-shaded</artifactId>
                <version>${grpc.netty.shaded.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-protobuf</artifactId>
                <version>${grpc.protobuf.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-stub</artifactId>
                <version>${grpc.stub.version}</version>
            </dependency>
            <dependency> <!-- necessary for Java 9+ -->
                <groupId>org.apache.tomcat</groupId>
                <artifactId>annotations-api</artifactId>
                <version>${tomcat.annotations.api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>io.envoyproxy.controlplane</groupId>
                <artifactId>api</artifactId>
                <version>${envoy.controlplane.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.com.nimbusds</groupId>
                <artifactId>nimbus-jose-jwt</artifactId>
                <version>${nimbus.jose.jwt.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons.io.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-transport</artifactId>
                <version>${io.netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec-http</artifactId>
                <version>${io.netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec-http2</artifactId>
                <version>${io.netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-handler</artifactId>
                <version>${io.netty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.analytics-common</groupId>
                <artifactId>org.wso2.carbon.databridge.commons</artifactId>
                <version>${analytics.common.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.analytics-common</groupId>
                <artifactId>org.wso2.carbon.databridge.commons.binary</artifactId>
                <version>${analytics.common.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-pool.wso2</groupId>
                <artifactId>commons-pool</artifactId>
                <version>${apache.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.com.lmax</groupId>
                <artifactId>disruptor</artifactId>
                <version>${lmax.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.apimgt</groupId>
                <artifactId>org.wso2.carbon.apimgt.common.gateway</artifactId>
                <version>${apim.common.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <andes.client.version>3.3.12</andes.client.version>
        <apim.common.version>9.0.0</apim.common.version>
        <build.helper.plugin.version>3.2.0</build.helper.plugin.version>
        <commons.version>3.9</commons.version>
        <commons.io.version>2.6</commons.io.version>
        <envoy.controlplane.api.version>0.1.23</envoy.controlplane.api.version>
        <geronimo.jms11.spec.version>1.1.1.wso2v1</geronimo.jms11.spec.version>
        <grpc.netty.shaded.version>1.32.1</grpc.netty.shaded.version>
        <grpc.protobuf.version>1.32.1</grpc.protobuf.version>
        <grpc.stub.version>1.32.1</grpc.stub.version>
        <gson.version>2.8.6</gson.version>
        <guava.version>27.0-jre</guava.version>
        <io.fabric8.docker.plugin.version>0.34.1</io.fabric8.docker.plugin.version>
        <io.netty.version>4.1.54.Final</io.netty.version>
        <json.smart.version>2.3</json.smart.version>
        <log4j.version>2.13.3</log4j.version>
        <maven.checkstyle.plugin.version>3.0.0</maven.checkstyle.plugin.version>
        <maven.checkstyle.version>8.18</maven.checkstyle.version>
        <maven.spotbugs.version>4.0.4</maven.spotbugs.version>
        <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
        <nimbus.jose.jwt.version>7.3.0.wso2v1</nimbus.jose.jwt.version>
        <org.json.version>20180130</org.json.version>
        <os.mvn.plugin.version>1.6.2</os.mvn.plugin.version>
        <protobuf.maven.plugin.version>0.6.1</protobuf.maven.plugin.version>
        <protobuf.java.version>3.14.0</protobuf.java.version>
        <shade.plugin.version>3.2.4</shade.plugin.version>
        <slf4j.version>1.7.21</slf4j.version>
        <swagger.v3.parser.version>2.0.12</swagger.v3.parser.version>
        <swagger.v3.models.version>2.0.8</swagger.v3.models.version>
        <testcontainers.version>1.15.0</testcontainers.version>
        <ryuk.image.version>0.3.0</ryuk.image.version>
        <testng.version>6.11</testng.version>
        <tomcat.annotations.api.version>6.0.53</tomcat.annotations.api.version>
        <toml4j.version>0.7.2</toml4j.version>
        <analytics.common.version>6.1.45</analytics.common.version>
        <apache.commons.version>1.5.6.wso2v1</apache.commons.version>
        <lmax.version>3.4.2.wso2v1</lmax.version>
    </properties>
</project>
