<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>ru.entaxy.esb.kaoto</groupId>
        <artifactId>kaoto</artifactId>
        <version>2.7.0</version>
    </parent>
    <artifactId>kaoto-build</artifactId>
    <version>2.7.0.entaxy</version>
    <packaging>pom</packaging>
    <name>ENTAXY :: PLATFORM :: RUNTIME :: MODULES :: KAOTO BUILD</name>
    <description>ENTAXY :: PLATFORM :: RUNTIME :: MODULES :: KAOTO BUILD</description>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>install node and yarn</id>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn install</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn catalog build</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <arguments>workspace @kaoto/camel-catalog run build</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn ui build</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <phase>compile</phase>
                        <configuration>
                            <arguments>workspace @kaoto/kaoto run memory:build</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <descriptor>maven-assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
