<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~ Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com).
 ~
 ~ WSO2 LLC. 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>com.wso2.openbanking.accelerator</groupId>
        <artifactId>open-banking</artifactId>
        <version>3.2.30-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>open-banking-react-apps</artifactId>
    <packaging>pom</packaging>
    <name>WSO2 Open Banking - React Apps</name>

    <modules>
        <module>bfsi-bff</module>
        <module>bfsi-apps/consent-manager-dashboard</module>
        <module>bfsi-apps/consent-approval-ui</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>react-apps initialize: npm install</id>
                            <goals>
                                <goal>exec</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <executable>npm</executable>
                                <arguments>
                                    <argument>install</argument>
                                </arguments>
                            </configuration>
                        </execution>

                        <execution>
                            <id>react-apps compile: npm run build</id>
                            <goals>
                                <goal>exec</goal>
                            </goals>
                            <phase>compile</phase>
                            <configuration>
                                <executable>npm</executable>
                                <arguments>
                                    <argument>run</argument>
                                    <argument>build</argument>
                                </arguments>
                            </configuration>
                        </execution>
                    </executions>

                    <configuration>
                        <environmentVariables>
                            <CI>false</CI> <!-- make it true in order to consider warnings as
                            errors-->
                        </environmentVariables>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
