<?xml version="1.0" encoding="UTF-8"?>
<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.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>22</version>
        <relativePath />
    </parent>

    <groupId>org.jboss.windup</groupId>
    <artifactId>windup-openshift-parent</artifactId>
    <version>5.3.0.Final</version>
    <packaging>pom</packaging>

    <name>Windup OpenShift - Parent</name>
    <description>OpenShift image generation for Windup</description>


    <properties>
        <version.fabric8>3.5.28</version.fabric8>
        <version.keycloak>15.1.1</version.keycloak>

        <windup.web.scm.connection>scm:git:https://github.com/windup/windup-openshift.git</windup.web.scm.connection>
        <windup.web.developer.connection>scm:git:git@github.com:windup/windup-openshift.git</windup.web.developer.connection>
        <windup.web.scm.url>http://github.com/windup/windup-openshift</windup.web.scm.url>
    </properties>

    <scm>
        <tag>5.3.0.Final</tag>
        <connection>${windup.web.scm.connection}</connection>
        <developerConnection>${windup.web.developer.connection}</developerConnection>
        <url>${windup.web.scm.url}</url>
    </scm>

    <issueManagement>
        <system>JBoss Jira</system>
        <url>https://issues.jboss.org/browse/WINDUP</url>
    </issueManagement>
    <mailingLists>
        <mailingList>
            <name>Windup Usage and Rules Development</name>
            <post>windup-users@lists.jboss.org</post>
            <archive>http://lists.jboss.org/pipermail/windup-users/</archive>
        </mailingList>
        <mailingList>
            <name>Windup Core Development</name>
            <post>windup-dev@lists.jboss.org</post>
            <archive>http://lists.jboss.org/pipermail/windup-dev/</archive>
        </mailingList>
    </mailingLists>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <modules>
        <module>web</module>
        <module>messaging-executor</module>
        <module>cli</module>
        <module>templates</module>
    </modules>

    <profiles>
        <profile>
          <id>podman</id>
          <activation>
            <property>
              <name>!env.DOCKER_HOST</name>
            </property>
            <file>
              <missing>/var/run/docker.sock</missing>
            </file>
            <os>
                <name>linux</name>
                <family>unix</family>
            </os>
          </activation>
          <build>
            <plugins>
              <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-maven-plugin</artifactId>
                <version>${version.fabric8}</version>
                <configuration>
                    <dockerHost>unix:///run/user/1000/podman/podman.sock</dockerHost>
                </configuration>
              </plugin>
              <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                  <execution>
                    <id>start-async-podman-service</id>
                    <phase>generate-test-resources</phase>
                    <goals>
                      <goal>exec</goal>
                    </goals>
                    <configuration>
                      <executable>podman</executable>
                      <arguments>
                        <argument>system</argument>
                        <argument>service</argument>
                        <argument>-t</argument>
                        <argument>0</argument>
                      </arguments>
                      <async>true</async>
                    </configuration>
                  </execution>
                </executions>
              </plugin>
            </plugins>
          </build>
        </profile>
    </profiles>
</project>
