<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.technologybrewery</groupId>
        <artifactId>parent</artifactId>
        <version>1</version>
    </parent>

    <groupId>org.technologybrewery.fermenter</groupId>
    <version>2.8.0</version>
    <artifactId>root</artifactId>
    <packaging>pom</packaging>

    <name>Fermenter</name>
    <description>
        In brewing, a fermenter is a vessel in which unfinished ingredients become nearly finished beer.
        In Model Driven Architecture, Fermenter is a project that converts functional concepts into nearly finished
        applications. This approach allows for the quick definition and assembly of applications with the focus on
        functional concepts rather than technical underpinnings. Fermenter is an MDA engine that allows common
        concepts to be modeled and spawn any number of generated source files. In turn, this allows developers
        to focus more time on business logic, less time on technical underpinnings, and achieve extremely high levels
        of architectural conformity.
    </description>
    <url>https://github.com/TechnologyBrewery/fermenter</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Ryan Ashcraft</name>
            <email>dryanashcraft@gmail.com</email>
            <organization>Technology Brewery</organization>
            <organizationUrl>https://technologybrewery.org</organizationUrl>
        </developer>
        <developer>
            <name>Eric Konieczny</name>
            <email>ekoniec1@gmail.com</email>
            <organization>Technology Brewery</organization>
            <organizationUrl>https://technologybrewery.org</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:ssh://git@github.com/TechnologyBrewery/fermenter.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/TechnologyBrewery/fermenter.git</developerConnection>
        <url>https://github.com/TechnologyBrewery/fermenter</url>
        <tag>release-2.8.0</tag>
    </scm>

    <modules>
        <module>fermenter-mda</module>
        <module>stout</module>
        <module>ale</module>
        <module>docker</module>
    </modules>

    <properties>
        <cucumber.version>1.2.5</cucumber.version>
        <habushu.version>2.1.0</habushu.version>
        <log4j.version>2.7</log4j.version>
        <slf4j.version>2.0.1</slf4j.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.4</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.11.0</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>4.4</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>2.7.0</version>
                <scope>compile</scope>
            </dependency>
            <!-- Dependency of Json Schema Validator -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>31.1-jre</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>info.cukes</groupId>
                <artifactId>cucumber-java</artifactId>
                <version>${cucumber.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>info.cukes</groupId>
                <artifactId>cucumber-junit</artifactId>
                <version>${cucumber.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>info.cukes</groupId>
                <artifactId>cucumber-spring</artifactId>
                <version>${cucumber.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <systemPropertyVariables>
                            <KRAUSENING_BASE>${project.basedir}/src/test/resources/krausening/base</KRAUSENING_BASE>
                            <KRAUSENING_EXTENSIONS>${project.basedir}/src/test/resources/krausening/extensions
                            </KRAUSENING_EXTENSIONS>
                            <KRAUSENING_PASSWORD>dev</KRAUSENING_PASSWORD>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <systemPropertyVariables>
                            <KRAUSENING_BASE>${project.basedir}/src/test/resources/krausening/base</KRAUSENING_BASE>
                            <KRAUSENING_EXTENSIONS>${project.basedir}/src/test/resources/krausening/extensions
                            </KRAUSENING_EXTENSIONS>
                            <KRAUSENING_PASSWORD>dev</KRAUSENING_PASSWORD>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.masterthought</groupId>
                    <artifactId>maven-cucumber-reporting</artifactId>
                    <version>4.3.0</version>
                    <executions>
                        <execution>
                            <id>execution</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                            <configuration>
                                <projectName>fermenter</projectName>
                                <outputDirectory>${project.build.directory}/cucumber-html-reports</outputDirectory>
                                <jsonFiles>
                                    <!-- supports wildcard or name pattern -->
                                    <param>**/*.json</param>
                                </jsonFiles>
                                <checkBuildResult>false</checkBuildResult>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.technologybrewery.habushu</groupId>
                    <artifactId>habushu-maven-plugin</artifactId>
                    <version>2.3.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.technologybrewery.habushu</groupId>
                <artifactId>habushu-maven-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>ossrh-release,with-python-support</releaseProfiles>
                    <!-- During release preparation, Habushu will automatically update the versions of Habushu modules
                        within their pyproject.toml configurations, however the maven-release-plugin will only commit
                        updates to pom.xml files.  In order to version control both pom.xml and pyproject.toml files
                        that are updated during release preparation, customize the preparation and completion goals
                        to additionally execute the scm:checkin goals -->
                    <preparationGoals>clean verify scm:checkin -Dmessage="[maven-release-plugin] prepare release"</preparationGoals>
                    <completionGoals>clean verify scm:checkin -Dmessage="[maven-release-plugin] prepare for next development iteration"</completionGoals>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>integration-test</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- Require developers to opt-in for Python/Habushu support since it may not be needed
                for all projects and Habushu requires the installation of build tool dependencies (i.e. Poetry)
                that cannot be automatically installed through Maven -->
            <id>with-python-support</id>
            <modules>
                <module>fermenter-mda</module>
                <module>stout</module>
                <module>ale</module>
                <module>docker</module>
                <module>brett</module>
            </modules>
        </profile>
    </profiles>
</project>
