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

  <groupId>de.powerstat.phplib</groupId>
  <artifactId>templateengine</artifactId>
  <version>1.0</version>
  <packaging>jar</packaging>

  <name>PowerStatsTemplateEngine</name>
  <description>Java port of phplib template engine. See https://sourceforge.net/projects/phplib/ or https://pear.php.net/package/HTML_Template_PHPLIB for more.</description>
  <url>https://www.powerstat.de/TemplateEngine.html</url>
  
  <organization>
    <name>Dipl.-Inform Kai Hofmann</name>
    <url>http://www.powerstat.de/</url>
  </organization>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <license.inceptionYear>2015</license.inceptionYear>
    <license.licenseName>Apache License, Version 2.0</license.licenseName>
  </properties>

  <profiles>
    <!-- GPG Signature on release -->
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <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>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
  </profiles>

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

  <developers>
    <developer>
      <id>powerstat</id>
      <name>Kai Hofmann</name>
      <email>powerstat@web.de</email>
      <url>http://www.powerstat.de/</url>
      <roles>
        <role>manager</role>
        <role>architect</role>
        <role>developer</role>
        <role>tester</role>
        <role>security</role>
        <role>translator</role>
      </roles>
      <timezone>Europe/Berlin</timezone>
      <properties>
        <picUrl>http://www.powerstat.de/pics/KaiHofmann.jpeg</picUrl>
      </properties>
    </developer>

  </developers>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <site>
      <id>powerstat</id>
      <url>sftp://${web.server}/TemplateEngine/</url>
    </site>
  </distributionManagement>

  <scm>
    <connection>scm:git:https://github.com/PowerStat/TemplateEngine.git</connection>
    <developerConnection>scm:git:https://github.com/PowerStat/TemplateEngine.git</developerConnection>
    <url>https://github.com/PowerStat/TemplateEngine</url>
    <tag>V1.0</tag>
  </scm>

  <repositories>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <fork>true</fork>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <optimize>false</optimize>
          <debug>true</debug>
          <release>11</release>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <show>protected</show>
          <failOnError>false</failOnError>
          <!-- Not working!
          <sourceFileExcludes>
            <sourceFileExclude>**/module-info.java</sourceFileExclude>
          </sourceFileExcludes>
          -->
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.1</version>
        <dependencies>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.4.1</version>
          </dependency>

        </dependencies>
        <configuration>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.22.1</version>
        <dependencies>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.4.1</version>
          </dependency>

        </dependencies>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.3</version>
      </plugin>

      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
        <version>3.6.0.1398</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <archive>
            <manifestEntries>
              <!-- <Build-Number>${buildNumber}</Build-Number> -->
              <Version>${project.version}</Version>
              <GIT>https://github.com/fritzbox.git</GIT>
              <SCM-Revision>${buildNumber}</SCM-Revision>
            </manifestEntries>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
          <finalName>${project.artifactId}</finalName>
        </configuration>
      </plugin>
<!--    
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
            <configuration>
              <useLastComittedrevision>true</useLastComittedrevision>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
        </configuration>
      </plugin>
-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <localCheckout>true</localCheckout>
          <pushChanges>false</pushChanges>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
          <tagNameFormat>V@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <releaseProfiles>releases</releaseProfiles>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.11.2</version>
          </dependency>
          
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-api</artifactId>
            <version>1.11.2</version>
          </dependency>
          
          <!-- 
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-git-commons</artifactId>
            <version>1.11.2</version>
          </dependency>
          -->
          
        </dependencies>
      </plugin>
      
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
        <executions>
          <execution>
            <id>default-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.19</version>
        <configuration>
          <addSvnKeyWords>false</addSvnKeyWords>
          <licenseName>Apache License, Version 2.0</licenseName>
          <licenseResolver>${project.baseUri}/src/license</licenseResolver>
        </configuration>
        <executions>
          <execution>
            <id>add-third-party</id>
            <goals>
              <goal>add-third-party</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <useMissingFile>true</useMissingFile>
               <thirdPartyFilename>META-INF/DEPENDENCY-LICENSES.txt</thirdPartyFilename>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M2</version>
        <executions>
          <execution>
            <id>enforce</id>
            <configuration>
              <rules>
                <dependencyConvergence />
              </rules>
            </configuration>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0</version>
      </plugin>
<!--
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <version>5.0.0</version>
        <!- - 
        <configuration>
          <skipProvidedScope>true</skipProvidedScope>
          <skipRuntimeScope>true</skipRuntimeScope>
          <failBuildOnCVSS>8</failBuildOnCVSS>
          <suppressionFiles>
            <suppressionFile>project-suppression.xml</suppressionFile>
          </suppressionFiles>
        </configuration>
        - ->
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
-->

      <!--
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jdeps-plugin</artifactId>
        <version>3.1.1</version>
      </plugin>
      -->
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
            <version>3.3.3</version>
          </dependency>
          
        </dependencies>
      </plugin>
      
      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <version>1.4.8</version>
        <dependencies>
          <dependency>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-junit5-plugin</artifactId>
            <version>0.8</version>
          </dependency>
          
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctor-maven-plugin</artifactId>
        <version>1.6.0</version>
        <executions>
          <execution>
            <id>output-html</id>              
            <phase>generate-resources</phase> 
            <goals>
              <goal>process-asciidoc</goal> 
            </goals>
            <configuration>
              <backend>xhtml5</backend>
              <sourceHighlighter>coderay</sourceHighlighter>
              <attributes>
                <toc>left</toc>
              </attributes>
            </configuration>
          </execution>

          <execution>
            <id>output-pdf</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>process-asciidoc</goal>
            </goals>
            <configuration>
              <backend>pdf</backend>
            </configuration>
          </execution>

        </executions>
        
        <dependencies>
          <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj-pdf</artifactId>
            <version>1.5.0-alpha.18</version>
          </dependency>
        </dependencies>
        
      </plugin>

    </plugins>
  </build>

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

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.22.1</version>
        <configuration>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.3</version>
        <reportSets>
          <reportSet>
            <reports>
              <!-- select non-aggregate reports -->
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <configLocation>checkstyle-config.xml</configLocation>
          <checkstyleXmlOutput>true</checkstyleXmlOutput>
          <checkstyleXmlOutputDirectory>target/site</checkstyleXmlOutputDirectory>
          <xmlOutput>true</xmlOutput>
          <failsOnError>false</failsOnError>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <excludes>**/module-info.java,**/package-info.java</excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.11.0</version>
        <configuration>
          <pmdXmlOutput>true</pmdXmlOutput>
          <pmdXmlOutputDirectory>target/site</pmdXmlOutputDirectory>
          <xmlOutput>true</xmlOutput>
          <includeTests>true</includeTests>
          <targetJdk>1.8</targetJdk>
          <excludes>**/module-info.java,**/package-info.java</excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>3.1.11</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <spotbugsXmlWithMessages>true</spotbugsXmlWithMessages>
          <spotbugsXmlOutputDirectory>target/site</spotbugsXmlOutputDirectory>
          <failOnError>false</failOnError>
          <includeTests>true</includeTests>
          <excludes>**/module-info.java,**/package-info.java</excludes>
          <dependencies>
            <dependency>
              <groupId>com.mebigfatguy.fb-contrib</groupId>
              <artifactId>fb-contrib</artifactId>
              <version>7.4.3.sb</version>
            </dependency>

            <plugin>
              <groupId>com.h3xstream.findsecbugs</groupId>
              <artifactId>findsecbugs-plugin</artifactId>
              <version>LATEST</version>
            </plugin>

            <!-- 
            <dependency>
              <groupId>com.github.spotbugs</groupId>
              <artifactId>spotbugs</artifactId>
              <version>3.1.12</version>
            </dependency>
            -->

          </dependencies>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <show>private</show>
          <failOnError>false</failOnError>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0</version>
      </plugin>
 
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <version>5.0.0</version>
      </plugin>
      
      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <version>1.4.8</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>      
      </plugin>

    </plugins>

  </reporting>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.4.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.11.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.11.2</version>
    </dependency>
 
   </dependencies>

</project>
