<?xml version="1.0" encoding="UTF-8"?>
<!--
    JBoss, Home of Professional Open Source
    Copyright 2023, Red Hat, Inc. and/or its affiliates, and individual
    contributors by the @authors tag. See the copyright.txt in the
    distribution for a full listing of individual contributors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<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>51</version>
        <relativePath />
    </parent>

    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-myfaces-feature-pack-parent</artifactId>
    <version>2.0.4.Final</version>

    <name>MyFaces 4.0 Support for WildFly - Parent</name>
    <description>MyFaces 4.0 Support for WildFly - Parent</description>

    <packaging>pom</packaging>

    <url>https://wildfly.org</url>

    <organization>
        <name>WildFly Community</name>
        <url>https://wildfly.org</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>wildfly.org</id>
            <name>WildFly Community</name>
            <organization>wildfly.org</organization>
            <organizationUrl>https://wildfly.org</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:${wildfly.repo.scm.connection}</connection>
        <developerConnection>scm:git:${wildfly.repo.scm.connection}</developerConnection>
        <url>${wildfly.repo.scm.url}</url>
        <tag>2.0.4.Final</tag>
    </scm>

    <issueManagement>
        <system>GH</system>
        <url>https://github.com/wildfly/wildfly-myfaces-feature-pack/issues</url>
    </issueManagement>

    <properties>
        <!-- Compile to Java 11 bytecode -->
        <maven.compiler.release>17</maven.compiler.release>

        <version.junit>4.13.2</version.junit>
        <version.org.apache.myfaces>4.0.3</version.org.apache.myfaces>

        <test.bootable.jar.name>test-wildfly-myfaces.jar</test.bootable.jar.name>
        <test.preview.bootable.jar.name>test-wildfly-myfaces-preview.jar</test.preview.bootable.jar.name>
        <plugin.fork.embedded>true</plugin.fork.embedded>

        <version.org.jboss.jboss-dmr>1.7.0.Final</version.org.jboss.jboss-dmr>
        <version.org.wildfly>40.0.0.Final</version.org.wildfly>
        <version.org.wildfly.core>32.0.0.Final</version.org.wildfly.core>
        <version.org.wildfly.galleon-plugins>8.1.5.Final</version.org.wildfly.galleon-plugins>
        <version.org.wildfly.jar.plugin>13.0.0.Final</version.org.wildfly.jar.plugin>
        <version.org.wildfly.plugin>6.0.0.Final</version.org.wildfly.plugin>

        <!-- maven-release-plugin configuration -->
        <autoVersionSubmodules>true</autoVersionSubmodules>
        <releaseProfiles>jboss-release</releaseProfiles>
        <signTag>true</signTag>
        <tagNameFormat>@{project.version}</tagNameFormat>
        <arguments>-DskipTests</arguments>
        <!-- Do not push changes by default when using the maven-release-plugin:prepare -->
        <pushChanges>false</pushChanges>
        <!-- Use the local directory when using maven-release-plugin:perform -->
        <localCheckout>true</localCheckout>
        <!--JBoss Nexus properties -->
        <nexus.repository.staging>wildfly-staging</nexus.repository.staging>
        <nexus.staging.tag>wildfly-myfaces-feature-pack-${project.version}</nexus.staging.tag>

        <wildfly.repo.scm.connection>
            git@github.com:wildfly/wildfly-myfaces-feature-pack.git
        </wildfly.repo.scm.connection>
        <wildfly.repo.scm.url>
            https://github.com/wildfly/wildfly-myfaces-feature-pack
        </wildfly.repo.scm.url>
    </properties>

    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <modules>
        <module>myfaces-injection</module>
        <module>galleon-content</module>
        <module>myfaces-feature-pack</module>
        <module>testsuite</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <!-- WildFly dependencies -->
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-ee-galleon-pack</artifactId>
                <version>${version.org.wildfly}</version>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-ee-10-feature-pack</artifactId>
                <version>${version.org.wildfly}</version>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-jsf-injection</artifactId>
                <version>${version.org.wildfly}</version>
            </dependency>

            <!-- This BOM makes most of the dependencies from WildFly available for normal (non-plugin use) -->
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-standard-ee-bom</artifactId>
                <version>${version.org.wildfly}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-myfaces-feature-pack-galleon-content</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-preview-feature-pack</artifactId>
                <version>${version.org.wildfly}</version>
                <type>zip</type>
            </dependency>

            <dependency>
                <groupId>org.apache.myfaces.core</groupId>
                <artifactId>myfaces-api</artifactId>
                <version>${version.org.apache.myfaces}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.myfaces.core</groupId>
                <artifactId>myfaces-impl</artifactId>
                <version>${version.org.apache.myfaces}</version>
            </dependency>

            <!-- tests -->
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-standard-test-bom</artifactId>
                <version>${version.org.wildfly}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-core-test-runner</artifactId>
                <version>${version.org.wildfly.core}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-controller-client</artifactId>
                <version>${version.org.wildfly.core}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss</groupId>
                <artifactId>jboss-dmr</artifactId>
                <version>${version.org.jboss.jboss-dmr}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.wildfly.galleon-plugins</groupId>
                    <artifactId>wildfly-galleon-maven-plugin</artifactId>
                    <version>${version.org.wildfly.galleon-plugins}</version>
                </plugin>
                <plugin>
                    <groupId>org.wildfly.plugins</groupId>
                    <artifactId>wildfly-jar-maven-plugin</artifactId>
                    <version>${version.org.wildfly.jar.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.wildfly.plugins</groupId>
                    <artifactId>wildfly-maven-plugin</artifactId>
                    <version>${version.org.wildfly.plugin}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven-and-jdk</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.9,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>[${maven.compiler.release},)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
