<?xml version="1.0" encoding="UTF-8"?>
<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"
  child.project.url.inherit.append.path="false">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.github.ahmedagdmoun</groupId>
  <artifactId>maven-parent</artifactId>
  <version>13</version>
  <packaging>pom</packaging>
  <name>${project.artifactId}</name>
  <description>Parent POM for maven-based projects in devonfw.</description>
  <url>https://devonfw.com/</url>
  <inceptionYear>2014</inceptionYear>

  <properties>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <flatten.mode>oss</flatten.mode>
    <github.organization>devonfw</github.organization>
    <github.repository>maven-parent</github.repository>
    <github.default.branch>master</github.default.branch>
    <maven.release.repository>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</maven.release.repository>
    <maven.snapshot.repository>https://s01.oss.sonatype.org/content/repositories/snapshots/</maven.snapshot.repository>
    <maven.archetype.version>3.1.2</maven.archetype.version>
    <maven.resources.plugin.version>3.1.0</maven.resources.plugin.version>
    <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
    <maven.install.plugin.version>2.5.2</maven.install.plugin.version>
    <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
    <maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
    <maven.jar.plugin.version>3.1.2</maven.jar.plugin.version>
    <maven.source.plugin.version>3.1.0</maven.source.plugin.version>
    <maven.site.plugin.version>3.7.1</maven.site.plugin.version>
    <maven.checkstyle.plugin.version>3.1.0</maven.checkstyle.plugin.version>
    <maven.changes.plugin.version>2.12.1</maven.changes.plugin.version>
    <maven.changelog.plugin.version>2.3</maven.changelog.plugin.version>
    <maven.project.info.reports.plugin.version>3.0.0</maven.project.info.reports.plugin.version>
    <maven.jxr.plugin.version>3.0.0</maven.jxr.plugin.version>
    <maven.javadoc.plugin.version>3.1.1</maven.javadoc.plugin.version>
    <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
    <maven.surefire.report.plugin.version>2.22.2</maven.surefire.report.plugin.version>
    <maven.pmd.plugin.version>3.9.0</maven.pmd.plugin.version>
    <maven.war.plugin.version>3.2.3</maven.war.plugin.version>
    <maven.antrun.plugin.version>1.8</maven.antrun.plugin.version>
    <maven.help.plugin.version>3.2.0</maven.help.plugin.version>
    <maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
    <mojo.taglist.plugin.version>2.4</mojo.taglist.plugin.version>
    <mojo.cobertura.plugin.version>2.7</mojo.cobertura.plugin.version>
    <mojo.flatten.plugin.version>1.3.0</mojo.flatten.plugin.version>
    <!-- https://github.com/mojohaus/license-maven-plugin/issues/358 -->
    <mojo.license.plugin.version>1.20</mojo.license.plugin.version>
    <mojo.servicedocgen.plugin.version>1.0.0</mojo.servicedocgen.plugin.version>
    <mojo.exec.plugin.version>1.6.0</mojo.exec.plugin.version>
    <sonar.maven.plugin.version>3.7.0.1746</sonar.maven.plugin.version>
    <jacoco.maven.plugin.version>0.8.5</jacoco.maven.plugin.version>
    <owasp.dependency.check.plugin.version>7.1.1</owasp.dependency.check.plugin.version>
    <spotbugs.plugin.version>3.1.12.2</spotbugs.plugin.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven.resources.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.compiler.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven.install.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven.deploy.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven.clean.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven.jar.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven.source.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven.site.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven.checkstyle.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changes-plugin</artifactId>
          <version>${maven.changes.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changelog-plugin</artifactId>
          <version>${maven.changelog.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven.project.info.reports.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>${maven.jxr.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven.javadoc.plugin.version}</version>
          <configuration>
            <!-- http://jira.codehaus.org/browse/MJAVADOC-308 -->
            <!--<maxmemory>5048m</maxmemory> -->
            <notree>true</notree>
            <show>protected</show>
            <encoding>${project.reporting.outputEncoding}</encoding>
            <charset>${project.build.sourceEncoding}</charset>
            <docfilessubdirs>true</docfilessubdirs>
            <stylesheetfile>${user.dir}/src/main/javadoc/stylesheet.css</stylesheetfile>
            <doclint>none</doclint>
            <source>${java.version}</source>
            <doctitle>JavaDocs for ${project.name} ${project.version}</doctitle>
            <windowtitle>JavaDocs for ${project.name} ${project.version}</windowtitle>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire.plugin.version}</version>
          <configuration>
            <!-- Surefire changed the default to the project.build.directory causing trouble with file paths to test resources -->
            <workingDirectory>${basedir}</workingDirectory>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven.surefire.report.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${maven.pmd.plugin.version}</version>
          <configuration>
            <targetJdk>${java.version}</targetJdk>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>${maven.war.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${maven.antrun.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>${maven.help.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven.gpg.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-archetype-plugin</artifactId>
          <version>${maven.archetype.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.archetype</groupId>
          <artifactId>archetype-packaging</artifactId>
          <version>${maven.archetype.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>taglist-maven-plugin</artifactId>
          <version>${mojo.taglist.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>${mojo.cobertura.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>${mojo.flatten.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${mojo.license.plugin.version}</version>
          <configuration>
            <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
            <sortArtifactByName>true</sortArtifactByName>
            <includeTransitiveDependencies>true</includeTransitiveDependencies>
            <useMissingFile>true</useMissingFile>
            <failOnMissing>true</failOnMissing>
            <licenseMerges>
              <licenseMerge>Apache Software License, Version 2.0|The Apache Software License, Version 2.0|Apache 2.0|Apache License, Version 2.0</licenseMerge>
            </licenseMerges>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>servicedocgen-maven-plugin</artifactId>
          <version>${mojo.servicedocgen.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>${mojo.exec.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${sonar.maven.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.maven.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.owasp</groupId>
          <artifactId>dependency-check-maven</artifactId>
          <version>${owasp.dependency.check.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs.plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <includeEmptyDirs>true</includeEmptyDirs>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <fork>true</fork>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <!-- generate and use flattened pom instead of pom.xml -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <configuration>
          <flattenMode>${flatten.mode}</flattenMode>
        </configuration>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- also generate source JARs -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- avoid version in local war files, exclude sources JARs from WARs -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <packagingExcludes>WEB-INF/lib/*-sources.jar</packagingExcludes>
          <warName>${project.artifactId}</warName>
        </configuration>
      </plugin>

      <!-- JaCoCo for test coverage -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <reportSets>
          <reportSet>
            <id>devonfw.javadoc</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>javadoc.aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <configuration>
          <tags>
            <tag>TODO</tag>
            <tag>@todo</tag>
            <tag>FIXME</tag>
            <tag>@deprecated</tag>
            <tag>REVIEW</tag>
          </tags>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <configuration>
          <failOnError>false</failOnError>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>aggregate</report>
              <report>check</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>third-party-report</report>
              <report>aggregate-third-party-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>deploy</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.13</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>repository</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>false</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <!-- also generate javadoc JARs -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Sign artifacts with PGP -->
          <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>
                  <keyname>0xF0AD43FB</keyname>
                  <passphraseServerId>0xF0AD43FB</passphraseServerId>
                  <!-- Prevent gpg from using pinentry programs -->
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- separate eclipse build from command-line... -->
      <id>eclipse</id>
      <activation>
        <property>
          <name>eclipse.application</name>
        </property>
      </activation>
      <build>
        <directory>eclipse-target</directory>
      </build>
    </profile>
    <profile>
      <id>security</id>
      <activation>
        <!-- <activeByDefault>true</activeByDefault> -->
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <configuration>
              <failBuildOnCVSS>8</failBuildOnCVSS>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>licenses</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>aggregate-download-licenses</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>aggregate-download-licenses</goal>
                </goals>
              </execution>

              <execution>
                <id>aggregate-add-third-party</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>aggregate-add-third-party</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>ossrh</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>ossrh</id>
          <name>OSSRH Snapshots</name>
          <url>${maven.snapshot.repository}</url>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <releases>
            <enabled>false</enabled>
          </releases>
        </repository>
      </repositories>
    </profile>
  </profiles>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/${github.organization}/${github.repository}/issues</url>
  </issueManagement>

  <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:https://github.com/${github.organization}/${github.repository}.git</connection>
    <developerConnection>scm:git:https://github.com/${github.organization}/${github.repository}.git</developerConnection>
    <url>https://github.com/${github.organization}/${github.repository}/tree/${github.default.branch}</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>repository</id>
      <name>release repository</name>
      <url>${maven.release.repository}</url>
    </repository>
    <snapshotRepository>
      <id>repository</id>
      <name>snapshot repository</name>
      <url>${maven.snapshot.repository}</url>
    </snapshotRepository>
  </distributionManagement>


  <organization>
    <name>devonfw</name>
    <url>https://github.com/${github.organization}/${github.repository}/graphs/contributors</url>
  </organization>

  <developers>
    <developer>
      <id>hohwille</id>
      <name>J&#246;rg Hohwiller</name>
      <email>hohwille@users.sourceforge.net</email>
      <organization></organization>
      <organizationUrl/>
      <roles>
        <role>admin</role>
        <role>designer</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
      <properties/>
    </developer>
    <developer>
      <id>ksobkowiak</id>
      <name>Krzysztof Sobkowiak</name>
      <email>sobkowiak@onet.eu</email>
      <organization></organization>
      <organizationUrl/>
      <roles>
        <role>admin</role>
        <role>designer</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
      <properties/>
    </developer>
  </developers>

  <contributors>
  </contributors>

  <licenses>
    <license>
      <name>Apache Software License, Version 2.0</name>
      <url>https://github.com/${github.organization}/${github.repository}/blob/${github.default.branch}/LICENSE</url>
      <distribution>repro</distribution>
      <comments/>
    </license>
  </licenses>
</project>
