<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>
    <groupId>org.dominokit</groupId>
    <artifactId>domino-slf4j-logger</artifactId>
    <version>2.0.1</version>

    <packaging>jar</packaging>

    <name>domino-slf4j-logger</name>
    <description>provide implementation for using slf4j in gwt/j2cl client code</description>
    <url>https://github.com/domino-slf4j-logger</url>

    <organization>
        <name>Dominokit</name>
        <url>https://github.com/DominoKit</url>
    </organization>

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

    <developers>
        <developer>
            <name>Ahmad K. Bawaneh</name>
            <email>akabme@gmail.com</email>
        </developer>
        <developer>
            <name>Rafat J. Al-Barouki</name>
        </developer>
    </developers>

    <issueManagement>
        <url>https://github.com/DominoKit/domino-slf4j-logger/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <inceptionYear>2019</inceptionYear>

    <scm>
        <connection>scm:git:https://github.com/DominoKit/domino-slf4j-logger.git</connection>
        <developerConnection>scm:git:git@github.com:DominoKit/domino-slf4j-logger.git</developerConnection>
        <url>https://github.com/DominoKit/domino-slf4j-logger</url>
    </scm>

    <properties>
        <snapshot.version>HEAD-SNAPSHOT</snapshot.version>
        <next.release.version>2.0.1</next.release.version>

        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.plugin>3.8.1</maven.compiler.plugin>
        <maven.jar.plugin>3.2.0</maven.jar.plugin>
        <maven.source.plugin>3.0.1</maven.source.plugin>
        <maven.javadoc.plugin>2.10.4</maven.javadoc.plugin>
        <maven.gpg.plugin>1.6</maven.gpg.plugin>
        <maven.nexus.staging.plugin>1.6.8</maven.nexus.staging.plugin>
        <maven.deploy.plugin>3.0.0-M1</maven.deploy.plugin>
        <maven.fmt.plugin>2.9</maven.fmt.plugin>
        <maven.install.plugin>3.0.0-M1</maven.install.plugin>
        <maven.license.plugin>3.0</maven.license.plugin>
        <maven.surfire.plugin>3.0.0-M1</maven.surfire.plugin>
        <maven.gwt.plugin>1.1.0</maven.gwt.plugin>
        <spotless.version>2.46.1</spotless.version>
        <google.java.format.version>1.24.0</google.java.format.version>
        <maven.enforcer.plugin>3.6.3</maven.enforcer.plugin>
        <elemental2.version>1.3.2</elemental2.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.18.1</version>
            <scope>test</scope>
        </dependency>
        <!-- Needed to compile GWTTestCase-based tests -->
        <dependency>
            <groupId>org.gwtproject</groupId>
            <artifactId>gwt-user</artifactId>
            <version>2.12.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.gwtproject</groupId>
            <artifactId>gwt-dev</artifactId>
            <version>2.12.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.16</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.elemental2</groupId>
            <artifactId>elemental2-core</artifactId>
            <version>${elemental2.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.elemental2</groupId>
            <artifactId>elemental2-dom</artifactId>
            <version>${elemental2.version}</version>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.java</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcer.plugin}</version>
                <executions>
                    <execution>
                        <id>enforce-upper-bound-deps</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireUpperBoundDeps/>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>${maven.gwt.plugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <sourceLevel>11</sourceLevel>
                    <failOnError>true</failOnError>
                    <moduleName>org.dominokit.domino.logger.Logging</moduleName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>${spotless.version}</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <java>
                        <includes>
                            <include>src/main/java/**/*.java</include>
                            <include>src/main/resources/**/*.java</include>
                        </includes>
                        <excludes>
                            <exclude>src/main/resources/org/slf4j/*.java</exclude>
                            <exclude>src/main/resources/org/slf4j/**/*.java</exclude>
                        </excludes>
                        <googleJavaFormat>
                            <version>${google.java.format.version}</version>
                        </googleJavaFormat>
                    </java>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${maven.license.plugin}</version>
                <configuration>
                    <header>LICENSE.header</header>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <skipExistingHeaders>true</skipExistingHeaders>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <excludes>
                        <exclude>**/README.md</exclude>
                        <exclude>**/LICENSE</exclude>
                        <exclude>**/LICENSE.header</exclude>
                        <exclude>**/AUTHORS</exclude>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/src/main/resources/**</exclude>
                        <exclude>**/war</exclude>
                        <exclude>**/pom.xml</exclude>
                        <exclude>**/.flattened-pom.xml</exclude>
                        <exclude>**/gwt-unitcache</exclude>
                    </excludes>
                    <properties>
                        <year>${project.inceptionYear}</year>
                        <name>${project.organization.name}</name>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.plugin}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.dominokit</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <snapshotVersionProperty>snapshot.version</snapshotVersionProperty>
                    <releaseVersionProperty>next.release.version</releaseVersionProperty>
                    <!-- Set to true to immediately bump the development version when creating a release branch -->
                    <commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>

                    <!-- Which digit to increase in major.minor.patch versioning, the values being 0.1.2 respectively.
                         By default the rightmost number is increased.
                         Pass in the number via parameter or profile to allow configuration,
                         since everything set in the file can't be overwritten via command line -->
                    <versionDigitToIncrement>${bump.digit}</versionDigitToIncrement>

                    <!-- Execute mvn verify before release -->
                    <preReleaseGoals>verify</preReleaseGoals>
                    <preHotfixGoals>verify</preHotfixGoals>

                    <!-- Configure branches -->
                    <gitFlowConfig>
                        <productionBranch>master</productionBranch>
                        <!-- default is develop, but we use development -->
                        <developmentBranch>development</developmentBranch>
                    </gitFlowConfig>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!-- We are doing this to avoid issues in projects that allow mixed client and server classpath -->
                <!-- and we dont have a standard way to load different implementations in a ServiceLoader style for client side -->
                <!-- check https://github.com/DominoKit/domino-slf4j-logger/issues/2  and https://github.com/foal/gwt-time/discussions/5#discussioncomment-380644 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.plugin}</version>
                    <configuration>
                        <excludes>
                            <exclude>org/slf4j/**/*.class</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin}</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin}</version>
                    <configuration>
                        <failOnError>false</failOnError>
                    </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>
                    <version>${maven.gpg.plugin}</version>
                    <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>0.8.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl>
                        <publishingServerId>central</publishingServerId>
                        <autoPublish>true</autoPublish>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>net.ltgt.gwt.maven</groupId>
                        <artifactId>gwt-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>production</id>
            <activation>
                <property>
                    <name>ci</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>net.ltgt.gwt.maven</groupId>
                        <artifactId>gwt-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
