<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.e-movimento.tinytools</groupId>
    <artifactId>privilegedaccessor</artifactId>
    <version>1.3.1</version>
    <name>privileged accessor</name>
    <description>
        gives privileged access to private and protected methods and attributes.
        Use it in testing scenarios to set up your objects under test.
    </description>
    <url>http://sebastiandietrich.github.io/privilegedaccessor/</url>
    <packaging>jar</packaging>
    <inceptionYear>2005</inceptionYear>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- Used to upload artifacts to maven central - provides e.g. distributionManagement -->
    <!-- is deprecated - so you might need to add those info here -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <!-- Do NOT provide release or plugin repositories, otherwise automatic deployment of artifacts to public repositories fails -->
    <!-- see https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide -->
    <!-- <repositories></repositories> -->
    <!-- <pluginRepositories></pluginRepositories> -->


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <version.java>11</version.java>
        
        <junit-jupiter.version>5.9.2</junit-jupiter.version> <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
    </properties>

    <scm>
        <url>https://github.com/SebastianDietrich/privilegedaccessor</url>
        <connection>scm:git:git://github.com/SebastianDietrich/privilegedaccessor.git</connection>
        <developerConnection>scm:git:ssh@github.com:SebastianDietrich/privilegedaccessor.git</developerConnection>
    </scm>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/SebastianDietrich/privilegedaccessor/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <id>sebidietrich</id>
            <name>Sebastian Dietrich</name>
            <email>Sebastian.Dietrich at e-movimento.com</email>
            <organization>e-movimento Software Design &amp; Beratung GmbH</organization>
            <timezone>+1</timezone>
            <roles>
                <role>lead</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <organization>
        <name>e-movimento</name>
        <url>http://www.e-movimento.com</url>
    </organization>

    <ciManagement>
        <system>Jenkins</system>
        <url>https://privileged-accessor.ci.cloudbees.com/</url>
    </ciManagement>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>

            <!-- to make sure that maven runs tests with junit - see https://stackoverflow.com/questions/49441049/junit-5-does-not-execute-method-annotated-with-beforeeach -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>

            <!-- to set the version for the compiler -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <source>${version.java}</source>
                    <target>${version.java}</target>
                </configuration>
            </plugin>

            <!-- to generate a jar archive for the sources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- to generate javadocs -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- to be able to build jars -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>

            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.12.1</version>
                <configuration>
                    <locales>en</locales>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>clirr-maven-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <minSeverity>info</minSeverity>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- used to generate zip to deploy to vaadin directory -->
            <id>deploy</id>
            <build>
                <plugins>
                    <!-- to sign artifacts as required by maven central - see https://maven.apache.org/repository/guide-central-repository-upload.html -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <!-- <version>3.0.1</version> -->
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- to ensure that the correct gpg key is taken for signing the artifacts -->
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- to be able to combine project output into a single distributable archive containing dependencies -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>3.4.2</version>
                        <configuration>
                            <descriptors>
                                <descriptor>assembly-descriptor.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </plugin>

                    <!-- to automatically deploy releases to nexus - see http://www.sonatype.com/books/nexus-book/reference/staging-sect-deployment.html#staging-sect-deployment-nexus-staging-maven-plugin -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>sonatype-nexus-staging</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <reporting>
        <plugins>
            <!-- Generates a changes plugin based on changes at sourceforge -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>2.12.1</version>
                <inherited>false</inherited>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>changes-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <githubAPIScheme>https</githubAPIScheme>
                    <githubAPIPort>443</githubAPIPort>
                </configuration>
            </plugin>

            <!-- Generate a report based on the results of unit tests. -->
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.22.2</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report-only</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <!-- TODO, @todo list report -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>

            <!-- Generates a checkstyle report -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.2.1</version>
                <configuration>
                    <configLocation>.settings/checkstyle-checks.xml</configLocation>
                    <sourceDirectory>src/main/java</sourceDirectory>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.5</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.20.0</version>
                <configuration>
                    <targetJdk>${version.java}</targetJdk>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>changelog-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>dual-report</id>
                        <configuration>
                            <type>range</type>
                            <range>1</range>
                        </configuration>
                        <reports>
                            <report>changelog</report>
                            <report>file-activity</report>
                            <report>dev-activity</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dashboard-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>clirr-maven-plugin</artifactId>
                <version>2.8</version>
            </plugin>
        </plugins>
    </reporting>
</project>
