<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>eu.europa.ec.digit.eui</groupId>
    <artifactId>eui-cli-build</artifactId>
    <version>0.1.0</version>
    <packaging>pom</packaging>

    <name>eUI CLI app generator</name>

    <properties>
        <src.path></src.path>
        <target.path></target.path>
        <app.group.id></app.group.id>
        <app.artifact.id></app.artifact.id>
    </properties>

    <profiles>
        <profile>
            <id>build-web-spring-boot</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.7</version>
                        <executions>
                        <execution>
                            <id>pre-install</id>
                            <phase>generate-sources</phase>
                            <configuration>

                            <target>
                                <ant dir="${basedir}" target="generate.web-spring-boot">
                                     <property name="src.path" value="${src.path}"/>
                                     <property name="target.path" value="${target.path}"/>
                                     <property name="app.group.id" value="${app.group.id}"/>
                                     <property name="app.artifact.id" value="${app.artifact.id}"/>
                                     <property name="app.name" value="${app.artifact.id}"/>
                                </ant>
                            </target>

                            </configuration>
                            <goals>
                            <goal>run</goal>
                            </goals>
                        </execution>
                        </executions>
                    </plugin>

                </plugins>

            </build>
        </profile>
    </profiles>

</project>




