<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.eclipse.dirigible</groupId>
        <artifactId>dirigible-components-parent</artifactId>
        <version>12.42.0</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <name>Components - API - Modules</name>
    <artifactId>dirigible-components-api-modules-javascript</artifactId>
    <packaging>jar</packaging>
    
    <dependencies>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>requirejs</artifactId>
            <version>${requirejs.version}</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>Windows</id>
            <activation>
                <os>
                    <family>Windows</family>
                </os>
            </activation>
            <properties>
                <script.extension>.bat</script.extension>
            </properties>
        </profile>
        <profile>
            <id>unix</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <script.extension>.sh</script.extension>
            </properties>
        </profile>
    </profiles>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-ts-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>
                                ${basedir}/src/main/resources/META-INF/dirigible/modules/build-source${script.extension}
                            </executable>
                            <workingDirectory>src/main/resources/META-INF/dirigible/modules</workingDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <license.header.location>../../../licensing-header.txt</license.header.location>
        <parent.pom.folder>../../../</parent.pom.folder>
    </properties>

</project>
