<?xml version="1.0" encoding="UTF-8"?>
<project 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"
         xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.wavemaker.app</groupId>
        <artifactId>wavemaker-app-dependencies</artifactId>
        <version>11.0.0.beta.ee-20220401222842</version>
    </parent>
    <groupId>com.wavemaker.app</groupId>
    <artifactId>wavemaker-app-parent</artifactId>
    <packaging>pom</packaging>
    <version>11.0.0.beta.ee-20220401222842</version>
    <name>wavemaker-app-parent</name>
    <description>wavemaker-app-parent</description>
    <url>https://www.wavemaker.com</url>
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer/>
    </developers>
    <scm>
        <connection>scm:git:https://github.com/wavemaker/wavemaker-app-runtime-services.git</connection>
        <developerConnection>scm:git:https://github.com/wavemaker/wavemaker-app-runtime-services.git
        </developerConnection>
        <url>https://www.wavemaker.com</url>
    </scm>
    <build>
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>src/main/resources</directory>
                <includes>
                    <include>app.properties</include>
                </includes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>app.properties</exclude>
                </excludes>
            </resource>
            <resource>
                <filtering>true</filtering>
                <directory>target/generated-resources</directory>
                <includes>
                    <include>conf/**.properties</include>
                </includes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>target/generated-resources</directory>
                <excludes>
                    <exclude>conf/**.properties</exclude>
                </excludes>
            </resource>
        </resources>
        <filters>
            <filter>profiles/${profile.props.file}/</filter>
        </filters>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>${maven.eclipseLifecycleMappingPlugin.version}</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-antrun-plugin</artifactId>
                                        <versionRange>[1.7,)</versionRange>
                                        <goals>
                                            <goal>run</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.wavemaker.studio</groupId>
                    <artifactId>wavemaker-workspace-sync-plugin</artifactId>
                    <version>${wavemaker.app.build.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.wavemaker.studio</groupId>
                    <artifactId>wavemaker-studio-maven-plugin</artifactId>
                    <version>${wavemaker.app.build.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <version>${maven.propertiesMavenPlugin.version}</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>read-project-properties</goal>
                        </goals>
                        <configuration>
                            <files>
                                <file>profiles/${profile.props.file}</file>
                            </files>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven.mavenResourcesPlugin.version}</version>
                <configuration>
                    <propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${maven.mavenCleanPlugin.version}</version>
                <executions>
                    <execution>
                        <id>clean project</id>
                        <phase>clean</phase>
                    </execution>
                </executions>
                <configuration>
                    <filesets>
                        <!-- Cleanup any war:inplace output -->
                        <fileset>
                            <directory>${basedir}/src/main/webapp/WEB-INF/lib</directory>
                        </fileset>
                        <fileset>
                            <directory>${basedir}/src/main/webapp/WEB-INF/classes</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>${maven.mavenAntrunPlugin.version}</version>
                <executions>
                    <execution>
                        <id>Copy init</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <ant antfile="${basedir}/build.xml" target="init"/>
                            </target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>Copy resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <ant antfile="${basedir}/build.xml" target="generate-resources"/>
                            </target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>UI Build</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <ant antfile="${basedir}/build.xml" target="uiBuild"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.mavenCompilerPlugin.version}</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <fork>true</fork>
                    <encoding>UTF-8</encoding>
                    <compilerArgument>-parameters</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.wavemaker.app.build</groupId>
                <artifactId>wavemaker-app-build-maven-plugin</artifactId>
                <version>${wavemaker.app.build.version}</version>
                <executions>
                    <execution>
                        <id>generate app sources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>pre-compile actions</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>pre-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.wavemaker.app.build</groupId>
                <artifactId>wavemaker-app-package-maven-plugin</artifactId>
                <version>${wavemaker.app.build.version}</version>
                <executions>
                    <execution>
                        <id>package app sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package-app</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package prefab artifact</id>
                        <phase>install</phase>
                        <goals>
                            <goal>package-prefab</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package cordova zip</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package-cordova</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package react native zip</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package-react-native</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.wavemaker.studio</groupId>
                <artifactId>wavemaker-studio-maven-plugin</artifactId>
                <version>${wavemaker.app.build.version}</version>
                <executions>
                    <execution>
                        <id>clean controllers</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>clean-javaservice-controllers</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>Generate controller for the java service</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>generate-javaservice-controllers</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven.mavenWarPlugin.version}</version>
                <configuration>
                    <warSourceExcludes>README.md</warSourceExcludes>
                    <webResources>
                        <resource>
                            <directory>target/ui-build/output-files</directory>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.mavenEnforcerPlugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${maven.minimum.required.version}</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${java.required.version}</version>
                                </requireJavaVersion>
                                <requireProfileIdsExist/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>development</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <profile.props.file>development.properties</profile.props.file>
            </properties>
        </profile>
        <profile>
            <id>deployment</id>
            <properties>
                <profile.props.file>deployment.properties</profile.props.file>
            </properties>
        </profile>
        <profile>
            <id>runtime-dependency</id>
            <activation>
                <property>
                    <name>!exclude-runtime-dependency</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.wavemaker.runtime</groupId>
                    <artifactId>wavemaker-app-runtime-core</artifactId>
                    <version>${wavemaker.app.runtime.services.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <properties>
        <java.required.version>11</java.required.version>
        <maven.eclipseLifecycleMappingPlugin.version>1.0.0</maven.eclipseLifecycleMappingPlugin.version>
        <maven.mavenAntrunPlugin.version>3.0.0</maven.mavenAntrunPlugin.version>
        <maven.mavenCleanPlugin.version>3.1.0</maven.mavenCleanPlugin.version>
        <maven.mavenCompilerPlugin.version>3.8.1</maven.mavenCompilerPlugin.version>
        <maven.mavenEnforcerPlugin.version>3.0.0</maven.mavenEnforcerPlugin.version>
        <maven.mavenResourcesPlugin.version>3.2.0</maven.mavenResourcesPlugin.version>
        <maven.mavenWarPlugin.version>3.3.2</maven.mavenWarPlugin.version>
        <maven.minimum.required.version>3.8.1</maven.minimum.required.version>
        <maven.propertiesMavenPlugin.version>1.0.0</maven.propertiesMavenPlugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.lib.directory>${basedir}/lib</project.lib.directory>
        <profile.props.file>development.properties</profile.props.file>
        <wavemaker.app.build.version>11.0.0.beta.ee-20220401222842</wavemaker.app.build.version>
        <wavemaker.app.runtime.services.version>11.0.0.beta.ee-20220401222842</wavemaker.app.runtime.services.version>
    </properties>
</project>
