<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright 2023 Red Hat

     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

         https://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.patternfly</groupId>
    <artifactId>patternfly-java-bom</artifactId>
    <version>0.9.2</version>
    <packaging>pom</packaging>
    <name>PatternFly Java BOM</name>
    <description>Bill of materials</description>
    <url>https://patternfly-java.github.io</url>
    <inceptionYear>2023</inceptionYear>

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

    <organization>
        <name>Red Hat</name>
        <url>https://developers.redhat.com/</url>
    </organization>

    <developers>
        <developer>
            <id>hpehl</id>
            <name>Harald Pehl</name>
            <email>hpehl@redhat.com</email>
            <organization>Red Hat</organization>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:${github.org}/${github.name}.git</connection>
        <developerConnection>scm:git:git@github.com:${github.org}/${github.name}.git</developerConnection>
        <url>https://github.com/${github.org}/${github.name}</url>
        <tag>HEAD</tag>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/${github.org}/${github.name}/issues</url>
    </issueManagement>
    <distributionManagement>
        <snapshotRepository>
            <id>central</id>
            <url>https://central.sonatype.com/repository/maven-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <version.central.publishing.plugin>0.9.0</version.central.publishing.plugin>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--
              Only declare modules of groupId org.patternfly.
              Do not declare external dependencies.
              Do not duplicate modules from another bom.
            -->
            <!--
              Declare all dependency versions. Do not declare <scope> or <optional>.
              Each module should declare its direct dependencies and possibly overwrite scope/optional.
              Always declare the source jar too and optionally the test-jar.
            -->
            <!-- Order a-z -->
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-charts</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-charts</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-codeeditor</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-codeeditor</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-components</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-components</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-core</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-finder</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-finder</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-gwt</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-gwt</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-icons</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-icons</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-j2cl</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-layouts</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-layouts</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-tokens</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>patternfly-java-tokens</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- Prevent gpg from using pinentry programs -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${version.central.publishing.plugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
