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

<!--
  ~ JBoss, Home of Professional Open Source.
  ~
  ~ Copyright 2023 Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags.
  ~
  ~ 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>45</version>
        <relativePath/>
    </parent>

    <groupId>org.wildfly.tools</groupId>
    <artifactId>dev-tools</artifactId>
    <name>WildFly: Development Tools</name>
    <version>1.0.5.Final</version>
    <packaging>pom</packaging>

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

    <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false"
         child.scm.url.inherit.append.path="false">
        <connection>scm:git:git://github.com/wildfly/wildfly-dev-tools.git</connection>
        <developerConnection>scm:git:git@github.com:wildfly/wildfly-dev-tools.git</developerConnection>
        <url>https://github.com/wildfly/wildfly/tree/main/</url>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <name>James R. Perkins</name>
            <email>jperkins@redhat.com</email>
            <organization>Red Hat, Inc.</organization>
            <organizationUrl>https://redhat.com</organizationUrl>
        </developer>
    </developers>

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

    <issueManagement>
        <system>Github Issues</system>
        <url>https://github.com/wildfly/wildfly-dev-tools/issues</url>
    </issueManagement>

    <properties>
        <version.nexus.staging.maven.plugin>1.7.0</version.nexus.staging.maven.plugin>
        <repo.sonatype.url>https://oss.sonatype.org</repo.sonatype.url>
        <sonatype.server.id>ossrh</sonatype.server.id>
        <autoReleaseAfterClose>false</autoReleaseAfterClose>
    </properties>

    <modules>
        <module>ide-config</module>
        <module>parent-pom</module>
    </modules>

    <distributionManagement>
        <snapshotRepository>
            <id>${sonatype.server.id}</id>
            <url>${repo.sonatype.url}/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>${sonatype.server.id}</id>
            <url>${repo.sonatype.url}/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>maven-central-release</id>
            <activation>
                <property>
                    <name>maven.central.release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- Semantically ordered -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <configuration>
                            <rules>
                                <requireReleaseDeps>
                                    <message>No Snapshots Allowed!</message>
                                </requireReleaseDeps>
                            </rules>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <additionalOptions>
                                <additionalOption>-html5</additionalOption>
                            </additionalOptions>
                            <detectLinks>true</detectLinks>
                            <doclint>none</doclint>
                            <failOnError>false</failOnError>
                            <show>public</show>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <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.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${version.nexus.staging.maven.plugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>${sonatype.server.id}</serverId>
                            <nexusUrl>${repo.sonatype.url}</nexusUrl>
                            <autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
