<!--

    Copyright 2011-2023 Erwin Müller <erwin.mueller@anrisoftware.com>

    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>
        <artifactId>globalpom-parent</artifactId>
        <groupId>com.anrisoftware.globalpom</groupId>
        <version>4.7.0</version>
    </parent>

    <artifactId>globalpom-log</artifactId>
    <name>Global POM Logging</name>
    <version>4.7.0</version>
    <description>Logger factory to inject a logger for a class.</description>
    <inceptionYear>2011</inceptionYear>
    <url>https://javadoc.anrisoftware.com/${project.groupId}/${project.artifactId}/${project.version}/</url>

    <properties>
        <globalpom.custom.home>https://project.anrisoftware.com/projects/globalpom-log</globalpom.custom.home>
        <globalpom.custom.license.image.url>https://project.anrisoftware.com/attachments/download/217/apache2.0-small.gif</globalpom.custom.license.image.url>
        <globalpom.custom.central.url>https://search.maven.org/artifact/${project.groupId}/${project.artifactId}/${project.version}/pom</globalpom.custom.central.url>
        <globalpom.custom.scm.repo>https://gitea.anrisoftware.com/com.anrisoftware.globalpom/globalpom-log.git</globalpom.custom.scm.repo>
        <globalpom.custom.scm.github>https://github.com/devent/globalpom-log</globalpom.custom.scm.github>
        <globalpom.custom.scm.pub>scm:git:https://gitea.anrisoftware.com/com.anrisoftware.globalpom/globalpom-log.git</globalpom.custom.scm.pub>
        <globalpom.custom.scm.dev>scm:git:git@anrisoftware.com:anrisoftware.com/globalpom-log.git</globalpom.custom.scm.dev>
        <globalpom.custom.scm.url>${globalpom.custom.home}/repository</globalpom.custom.scm.url>
        <globalpom.custom.jenkins.url>https://jenkins.anrisoftware.com/view/com.anrisoftware.globalpom/job/com.anrisoftware.globalpom-globalpom-log</globalpom.custom.jenkins.url>
        <globalpom.custom.jenkins.build.badge.main>${globalpom.custom.jenkins.url}/job/main/badge/icon</globalpom.custom.jenkins.build.badge.main>
        <globalpom.custom.jenkins.build.link.main>${globalpom.custom.jenkins.url}/job/main</globalpom.custom.jenkins.build.link.main>
        <globalpom.custom.sonarqube.url>https://sonarcloud.io/project/overview?id=devent_globalpom-log</globalpom.custom.sonarqube.url>
        <globalpom.custom.sonarqube.qualitygate.badge>https://sonarcloud.io/api/project_badges/measure?project=devent_globalpom-log\&amp;metric=alert_status</globalpom.custom.sonarqube.qualitygate.badge>
        <globalpom.custom.sonarqube.qualitygate.link>${globalpom.custom.sonarqube.url}</globalpom.custom.sonarqube.qualitygate.link>
        <globalpom.custom.bundle.namespace>com.anrisoftware.globalpom.log</globalpom.custom.bundle.namespace>
        <globalpom.custom.bundle.namespace.internal>com.anrisoftware.globalpom.log.internal</globalpom.custom.bundle.namespace.internal>
        <!-- Sonar -->
        <sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
    </properties>

    <developers>
        <developer>
            <id>EM</id>
            <name>Erwin Müller</name>
            <organization>Advanced Natural Research Institute</organization>
            <email>erwin.mueller@anrisoftware.com</email>
            <roles>
                <role>Owner</role>
                <role>Developer</role>
            </roles>
            <timezone>Europe/Berlin</timezone>
        </developer>
    </developers>

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

    <issueManagement>
        <system>Redmine</system>
        <url>https://project.anrisoftware.com/projects/${project.artifactId}</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git@anrisoftware.com:anrisoftware.com/${project.artifactId}.git</connection>
        <developerConnection>scm:git:git@anrisoftware.com:anrisoftware.com/${project.artifactId}.git</developerConnection>
        <url>https://anrisoftware.com/projects/${project.artifactId}/repository</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <site>
            <id>site-distribution-id</id>
            <url>${site.distribution.url}</url>
        </site>
        <repository>
            <id>public_releases</id>
            <url>https://maven.anrisoftware.com/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>public_snapshots</id>
            <url>https://maven.anrisoftware.com/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-assistedinject</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.anrisoftware.globalpom</groupId>
            <artifactId>globalpom-groovytestutils</artifactId>
            <version>${globalpom.custom.anrisoftware.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>logback.properties</include>
                </includes>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <id>private-repository</id>
            <distributionManagement>
                <site>
                    <id>site-dav</id>
                    <url>${site.dav.url}</url>
                </site>
                <repository>
                    <id>private_repo_releases</id>
                    <url>https://maven.anrisoftware.com/repository/internal/</url>
                </repository>
                <snapshotRepository>
                    <id>private_repo_snapshots</id>
                    <url>https://maven.anrisoftware.com/repository/snapshots/</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>

        <profile>
            <id>osssonatype</id>
            <distributionManagement>
                <site>
                    <id>site-dav</id>
                    <url>${site.dav.url}</url>
                </site>
                <repository>
                    <id>osssonatype_releases</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
                <snapshotRepository>
                    <id>osssonatype_snapshots</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>osssonatype_releases</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- Activate profile with -Psign-artifact -->
            <id>sign-artifact</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>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- Skip signing -Pno-sign -->
            <id>no-sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- De-lombok with -Pdelombok -->
            <id>delombok</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>delombok</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

</project>
