<project>
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jboss.windup</groupId>
        <artifactId>windup-openshift-parent</artifactId>
        <version>4.1.0-SNAPSHOT</version>
    </parent>

    <artifactId>windup-web-openshift-messaging-executor</artifactId>

    <properties>
        <version.fabric8>3.5.28</version.fabric8>
        <version.keycloak>2.5.5.Final</version.keycloak>
        <docker.name.windup.web.executor>%a:%v</docker.name.windup.web.executor>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-maven-plugin</artifactId>
                <version>${version.fabric8}</version>
                <executions>
                    <execution>
                        <id>fabric8</id>
                        <phase>package</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <mode>kubernetes</mode>
                    <buildStrategy>docker</buildStrategy>
                    <images>
                        <image>
                            <name>${docker.name.windup.web.executor}</name>
                            <build>
                                <from>registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift</from>
                                <cmd>/opt/rhamt-cli/bin/openshift-launch.sh</cmd>
                                <assembly>
                                    <targetDir>/</targetDir>
                                    <descriptor>assembly/assembly.xml</descriptor>
                                </assembly>
                            </build>
                        </image>
                    </images>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.jboss.windup.web</groupId>
                                    <artifactId>windup-web-executor</artifactId>
                                    <version>${project.version}</version>
                                    <outputDirectory>${project.build.directory}/rhamt-cli</outputDirectory>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                            <excludes>**/logging.properties,**/rhamt-cli</excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
