<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.guicedee</groupId>
    <artifactId>dev-kit</artifactId>
    <version>62</version>
    <packaging>pom</packaging>

    <name>Development Kit</name>
    <description>The core maven build properties</description>
    <url>https://jwebmp.com</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>

        <maven.assembly.version>3.1.0</maven.assembly.version>
        <maven.jar.version>3.1.0</maven.jar.version>
        <maven.clean.version>3.1.0</maven.clean.version>
        <maven.dependency.version>3.1.1</maven.dependency.version>
        <maven.javadoc.version>3.0.1</maven.javadoc.version>
        <maven.deploy.version>3.0.0-M1</maven.deploy.version>
        <maven.install.version>3.0.0-M1</maven.install.version>
        <maven.source.version>3.0.1</maven.source.version>
        <maven.site.version>3.7.1</maven.site.version>
        <maven.shade.version>3.2.1</maven.shade.version>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <maven.surefire.version>3.0.0-M3</maven.surefire.version>
        <maven.failsafe.version>3.0.0-M1</maven.failsafe.version>
        <maven.resources.version>3.1.0</maven.resources.version>
        <maven.release.version>2.5.3</maven.release.version>
        <maven.versions.version>2.7</maven.versions.version>
        <maven.verifyier.version>1.1</maven.verifyier.version>
        <maven.asm.version>7.2</maven.asm.version>
        <maven.gpg.version>1.6</maven.gpg.version>

        <maven.war.version>3.2.2</maven.war.version>
        <maven.ear.version>3.0.1</maven.ear.version>
        <maven.ejb.version>3.0.1</maven.ejb.version>

        <build.helper.maven.plugin.version>3.0.0</build.helper.maven.plugin.version>

        <netbeans.hint.license>gpl30</netbeans.hint.license>
        <license.dir>${basedir}</license.dir>

        <junit.jupiter.version>5.6.0-M1</junit.jupiter.version>
        <hamcrest.version>1.3</hamcrest.version>
        <assertj.version>3.12.2</assertj.version>
        <mockito.version>3.0.0</mockito.version>
        <mockito.all.version>2.0.2-beta</mockito.all.version>

        <selenium.version>3.141.59</selenium.version>
        <selenium.jupiter.version>3.2.2</selenium.jupiter.version>

        <sonarqube.version>3.7.0.1746</sonarqube.version>
        <jacoco.version>0.8.5</jacoco.version>
        <sonar.profile>The Good Place</sonar.profile>
        <sonar.host.url>https://guicedee.com/sonar</sonar.host.url>
        <sonar.exclusions>**bower_components,**src/test,**/test/**,**/module-info.java</sonar.exclusions>

        <nexus.staging.maven.plugin.version>1.6.8</nexus.staging.maven.plugin.version>

        <jdk.release>11</jdk.release>

        <lombok.version>1.18.10</lombok.version>
        <mapstruct.version>1.3.1.Final</mapstruct.version>

        <surefireArgLine></surefireArgLine>
    </properties>

    <licenses>
        <license>
            <name>GPL 3</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>Marc Magon</name>
        <url>http://jwebmp.com</url>
    </organization>

    <scm>
        <url>https://github.com/GedMarc?tab=repositories</url>
    </scm>

    <developers>
        <developer>
            <id>GedMarc</id>
            <name>Marc Magon</name>
            <email>marc.magon@gmail.com</email>
            <url>https://github.com/GedMarc</url>
        </developer>
    </developers>

    <issueManagement>
        <system>Jira</system>
        <url>https://www.jwebmp.com/jira</url>
    </issueManagement>

    <ciManagement>
        <system>TeamCity</system>
        <url>http://jwebmp.com/teamcity</url>
    </ciManagement>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <version>${mapstruct.version}</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>

        <!-- Test Libraries -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.199</version>
            <scope>test</scope>
        </dependency>


    </dependencies>

    <profiles>
        <profile>
            <id>enable-guicedee</id>
            <modules>
                <module>GuicedEE</module>
            </modules>
        </profile>

        <profile>
            <id>enable-jwebmp</id>
            <modules>
                <module>JWebMP</module>
            </modules>
        </profile>

        <profile>
            <id>enable-entityassist</id>
            <modules>
                <module>EntityAssist</module>
            </modules>
        </profile>


        <profile>
            <id>jwebmp-distribution</id>
            <activation>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>jwebmp-snapshot</id>
                    <name>JWebMPArtifactory-snapshots</name>
                    <url>https://jwebmp.com/artifactory/libs-snapshot-local</url>
                </snapshotRepository>
                <repository>
                    <id>jwebmp-release</id>
                    <name>JWebMPArtifactory-releases</name>
                    <url>https://jwebmp.com/artifactory/libs-release-local</url>
                </repository>
            </distributionManagement>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                    <passphrase>${gpg.passphrase}</passphrase>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

        </profile>

        <profile>
            <id>sonartype-distribution</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>sonar-snapshot</id>
                    <name>SonarType-snapshots</name>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>sonar-release</id>
                    <name>SonarType-releases</name>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                    <passphrase>${gpg.passphrase}</passphrase>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>default-deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <serverId>sonar-snapshot</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            <stagingProgressTimeoutMinutes>300</stagingProgressTimeoutMinutes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>3.0.0-M1</version>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven.clean.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven.shade.version}</version>
                    <configuration>
                        <createDependencyReducedPom>false</createDependencyReducedPom>
                        <createSourcesJar>true</createSourcesJar>
                        <shadeSourcesContent>true</shadeSourcesContent>
                        <shadeTestJar>true</shadeTestJar>
                        <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>

                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludes>
                                    <exclude>1.java</exclude>
                                    <exclude>META-INF/*.SF</exclude>
                                    <exclude>META-INF/*.DSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                </excludes>
                            </filter>
                        </filters>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.ow2.asm</groupId>
                            <artifactId>asm</artifactId>
                            <version>${maven.asm.version}</version>
                            <type>jar</type>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                    <configuration>
                        <source>${jdk.release}</source>
                        <target>${jdk.release}</target>
                        <release>${jdk.release}</release>
                        <annotationProcessorPaths>
                            <annotationProcessorPath>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                                <version>1.18.8</version>
                            </annotationProcessorPath>
                            <path>
                                <groupId>org.mapstruct</groupId>
                                <artifactId>mapstruct-processor</artifactId>
                                <version>1.3.0.Final</version>
                            </path>
                        </annotationProcessorPaths>
                        <compilerArguments>
                            <AaddGeneratedAnnotation>false</AaddGeneratedAnnotation>
                            <Adebug>true</Adebug>
                        </compilerArguments>
                        <failOnError>true</failOnError>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.ow2.asm</groupId>
                            <artifactId>asm</artifactId>
                            <version>${maven.asm.version}</version>
                            <type>jar</type>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven.assembly.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${maven.versions.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven.deploy.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.version}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-verifier-plugin</artifactId>
                    <version>${maven.verifyier.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.junit.jupiter</groupId>
                            <artifactId>junit-jupiter-engine</artifactId>
                            <version>${junit.jupiter.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
                            <version>1.3.0.Final</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <argLine>--add-opens java.base/java.lang=com.google.guice,javassist ${surefireArgLine}
                        </argLine>
                        <testFailureIgnore>true</testFailureIgnore>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven.site.version}</version>

                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-site-renderer</artifactId>
                            <version>1.8.1</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.6.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven.resources.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.version}</version>
                    <configuration>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <offlineLinks>
                            <offlineLink>
                                <!--suppress UnresolvedMavenProperty -->
                                <url>https://docs.oracle.com/javase/${jdk.release}/docs/api/</url>
                                <location>${project.basedir}</location>
                            </offlineLink>
                        </offlineLinks>
                        <failOnError>false</failOnError>
                        <javadocExecutable>/opt/jdk${jdk.release}/bin/javadoc</javadocExecutable>
                        <additionalOptions>
                            <additionalOption>-Xdoclint:none</additionalOption>
                        </additionalOptions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadoc</id>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonarqube.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven.release.version}</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <goals>deploy</goals>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                </plugin>


                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven.war.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>${maven.ear.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ejb-plugin</artifactId>
                    <version>${maven.ejb.version}</version>
                </plugin>


                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>

                <plugin>
                    <groupId>org.moditect</groupId>
                    <artifactId>moditect-maven-plugin</artifactId>
                    <version>1.0.0.Beta2</version>
                </plugin>


                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>

            </plugins>
        </pluginManagement>


        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/java</source>
                                <source>src/jre11/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <!-- Benchmarking-->

            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>1.21</version>
                <scope>test</scope>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-generator-annprocess</artifactId>
                <version>1.21</version>
                <scope>test</scope>
                <type>jar</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>
