<?xml version="1.0" encoding="ISO-8859-1"?>
<!--

   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

-->
<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>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>20</version>
  </parent>
  <groupId>org.apache.turbine</groupId>
  <artifactId>turbine-parent</artifactId>
  <packaging>pom</packaging>

  <version>6</version>
  <name>Turbine POM</name>
  <description>
    The parent POM for the Apache Turbine and Fulcrum project.
  </description>  
  <url>https://turbine.apache.org</url>
  <inceptionYear>2011</inceptionYear>

  <!-- Now required by versions plugin -->
  <prerequisites>
    <maven>3.0.5</maven>
  </prerequisites>
  
  <issueManagement>
    <system>jira</system>
    <url>https://issues.apache.org/jira/browse/TRB</url>
  </issueManagement>

  <!--
    This section *must* be overwritten by subprojects. It is only to allow
    a release of the turbine-parent POM.
  -->
  <scm>
    <connection>scm:svn:https://svn.apache.org/repos/asf/turbine/maven/turbine-parent/tags/turbine-parent-6</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/turbine/maven/turbine-parent/tags/turbine-parent-6</developerConnection>
    <url>https://svn.apache.org/viewvc/turbine/maven/turbine-parent/tags/turbine-parent-6</url>
  </scm>

  <mailingLists>
    <mailingList>
      <name>Turbine Dev List</name>
      <subscribe>dev-subscribe@turbine.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@turbine.apache.org</unsubscribe>
      <post>dev@turbine.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/turbine-dev/</archive>
    </mailingList>
    <mailingList>
      <name>Turbine User List</name>
      <subscribe>user-subscribe@turbine.apache.org</subscribe>
      <unsubscribe>user-unsubscribe@turbine.apache.org</unsubscribe>
      <post>user@turbine.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/turbine-user/</archive>
    </mailingList>
  </mailingLists>

  <build>
    <pluginManagement>
     <!-- org.apache.maven.plugins, maven sets order by alpha artifact id -->
      <plugins>
        <plugin>
          <!-- build the source and binary distribution packages -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>
            <tarLongFileMode>gnu</tarLongFileMode>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${turbine.compiler.version}</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
            <encoding>${turbine.encoding}</encoding>
            <fork>${turbine.compiler.fork}</fork>
            <compilerVersion>${turbine.compiler.compilerVersion}</compilerVersion>
            <executable>${turbine.compiler.javac}</executable>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${turbine.javadoc.version}</version>
          <configuration>
            <!-- keep only errors and warnings -->
            <quiet>true</quiet>
            <encoding>${turbine.encoding}</encoding>
            <docEncoding>${turbine.docEncoding}</docEncoding>
            <notimestamp>true</notimestamp>
            <links>
              <link>${turbine.javadoc.java.link}</link>
              <link>${turbine.javadoc.javaee.link}</link>
            </links>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
            </archive>
        </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <configuration>
            <encoding>${turbine.resourceEncoding}</encoding>
          </configuration>
        </plugin>
        <!-- Apache parent: scm -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
            <!-- don't deploy site with maven-site-plugin -->
            <skipDeploy>true</skipDeploy>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <configuration>
            <archive>
              <manifest>
                  <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                  <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${turbine.surefire.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!-- org.apache.maven.plugins, alpha order by artifact id -->
      <plugin>
        <!-- generate the Eclipse project files or use m2eclipse  -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.10</version>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>false</downloadJavadocs>
        </configuration>
      </plugin>
      <plugin>
        <!-- generate the IntelliJ project files -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-idea-plugin</artifactId>
        <version>2.2.1</version>        
        <configuration>
          <jdkLevel>${maven.compile.source}</jdkLevel>
          <downloadSources>true</downloadSources>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Specification-Title>${project.name}</Specification-Title>
              <Specification-Version>${project.version}</Specification-Version>
              <Specification-Vendor>${project.organization.name}</Specification-Vendor>
              <Implementation-Title>${project.name}</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
              <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
              <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
              <Implementation-Build>${implementation.build}</Implementation-Build>              
              <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
              <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <!-- source and javadoc plugin are by default in lifecycle phase package, should execute in list order before assembly-plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${turbine.surefire.version}</version>
        <configuration>
          <jvm>${turbine.surefire.java}</jvm>
        </configuration>
      </plugin>

      <plugin> <!-- Thanks to Apache Commons -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-publish-plugin</artifactId>
        <configuration>
          <content>${project.reporting.outputDirectory}</content>
          <pubScmUrl>scm:svn:${turbine.scmPubUrl}</pubScmUrl>
          <checkoutDirectory>${turbine.scmPubCheckoutDirectory}</checkoutDirectory>
          <tryUpdate>true</tryUpdate>
        </configuration>
        <executions>
          <execution>
            <id>scm-publish</id>
            <phase>site-deploy</phase><!-- deploy site with maven-scm-publish-plugin -->
            <goals>
              <goal>publish-scm</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <!-- N.B. plugins defined here in the <reporting> section ignore what's defined in <pluginManagement>
         in the <build> section above, so we have to define the versions here. -->
    <plugins>
      <!-- org.apache.maven.plugins, alpha order by artifact id -->
      <plugin>
        <!-- generate the changes report from changes.xml -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>${turbine.changes.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${turbine.findbugs.version}</version>
        <configuration>
          <threshold>Normal</threshold>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${turbine.javadoc.version}</version>
        <configuration>
          <!-- keep only errors and warnings -->
          <quiet>true</quiet>
          <source>${maven.compiler.source}</source>
          <encoding>${turbine.encoding}</encoding>
          <docEncoding>${turbine.docEncoding}</docEncoding>
          <notimestamp>true</notimestamp>
          <linksource>true</linksource>
          <links>
            <link>${turbine.javadoc.java.link}</link>
            <link>${turbine.javadoc.javaee.link}</link>
          </links>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${turbine.jxr.version}</version>
      </plugin>
      <plugin>
        <!-- generate the PMD reports -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.12.0</version>
        <configuration>
          <minimumTokens>200</minimumTokens>
          <!--linkXref>true</linkXref-->
          <targetJdk>${maven.compile.source}</targetJdk>
          <rulesets>
          <!-- comment default rule sets: basic, imports, unusedcode -->
            <ruleset>/rulesets/java/basic.xml</ruleset>
            <ruleset>/rulesets/java/finalizers.xml</ruleset>
            <ruleset>/rulesets/java/imports.xml</ruleset>
            <ruleset>/rulesets/java/unusedcode.xml</ruleset>
          </rulesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${turbine.project-info.version}</version>
        <configuration>
          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${turbine.site.version}</version>
        <configuration>
          <!-- Exclude the navigation file for Maven 1 sites
                   and the changes file used by the changes-plugin,
                   as they interfere with the site generation. -->
          <moduleExcludes>
            <xdoc>navigation.xml,changes.xml</xdoc>
          </moduleExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${turbine.surefire.version}</version>
      </plugin>
      <!-- get test coverage for regression tests -->
      <!-- [WARN] JavaNCSS got an error while parsing the java file containing an ERROR ParseException, which is caused by Java8 syntax - reports are still generated - and it's already a registered issue:  https://github.com/cobertura/cobertura/issues/176 -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${turbine.jacoco.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0</version>
      </plugin>
      <plugin>
        <!-- check the Apache Licence in all source files -->
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>${turbine.rat.version}</version>
      </plugin>
      <plugin>
        <!-- generate the tag list report -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>2.4</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <!-- Allow overriding the target repository (Thanks to Apache Commons) -->
    <profile>
      <id>test-deploy</id>
      <properties>
        <altDeploymentRepository>id::default::file:target/deploy</altDeploymentRepository>
      </properties>
    </profile>

    <!-- profile to update the Apache parent pom profile of the same name 
        to better suit the requirements of Apache Turbine. (Thanks to Apache Commons) -->
    <profile>
      <id>apache-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <releaseProfiles>apache-release</releaseProfiles>
              <mavenExecutorId>forked-path</mavenExecutorId>              
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-install-plugin</artifactId>
            <configuration>
              <createChecksum>true</createChecksum>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>org.apache.turbine</groupId>
                <artifactId>turbine-parent-assembly</artifactId>
                <version>1.0.1</version>
              </dependency>
            </dependencies>
            <!-- Disable Apache Parent POM built-in source assembly -->
            <executions>
              <execution>
                <id>source-release-assembly</id>
                <configuration>
                  <skipAssembly>true</skipAssembly>
                </configuration>
              </execution>
              <execution>
                <id>turbine-default-assembly</id>
                <phase>pre-integration-test</phase><!-- package phase does not suffice if using profile to set it after javadoc and sources -->
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                  <descriptorRefs>
                    <descriptorRef>binaries-default</descriptorRef>
                    <descriptorRef>source-default</descriptorRef>
                  </descriptorRefs>
                  <tarLongFileFormat>gnu</tarLongFileFormat>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <version>5.1.1</version><!-- 
            - find all configuration parameters here: https://jeremylong.github.io/DependencyCheck/dependency-check-maven/.
            - if process hangs up, check or remove all files including odc.mv.db in maven repo in folder org\owasp\dependency-check-data\4.0\.
            - requires mvn version > 3.3! For older version try to check v 3.2.1 or 3.1.2 -->
            <executions>
               <execution>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
               <skip>${dependency.check.skip}</skip>
               <!--autoUpdate>false</autoUpdate-->
               <!--suppressionFiles>
                  <suppressionFile>${project.basedir}/suppression-owasp-fp.xml</suppressionFile>
               </suppressionFiles-->
            </configuration>
          </plugin>
          <!-- jacoco is skipped by default -->
          <plugin>
              <groupId>org.jacoco</groupId>
              <artifactId>jacoco-maven-plugin</artifactId>
              <version>${turbine.jacoco.version}</version>
              <configuration>
                  <skip>${turbine.jacoco.skip}</skip>
                  <excludes>
                    <exclude>*/*Test*</exclude>
                  </excludes>
              </configuration>
              <executions>
                <execution>
                  <id>default-prepare-agent</id>
                  <goals>
                  <goal>prepare-agent</goal>
                  </goals>
                </execution>
                <execution><!-- check or delete jacoco-sessions.html -->
                    <id>report</id>
                    <phase>prepare-package</phase>
                    <goals>
                      <goal>report</goal>
                    </goals>
                  </execution>
              </executions>
            </plugin>
        </plugins>
      </build>
    </profile>

    <!--
        Configure site plugin to support both Maven2 and Maven3, see:
        http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Using_the_same_version_of_maven-site-plugin_for_both_Maven_2_and_Maven_3
        Thanks to Apache Commons
    -->
    <profile>
      <id>maven-3</id>
      <activation>
        <file>
          <!--  The basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
          <exists>${basedir}</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <dependencies>
              <dependency>
                  <!-- add support for ssh/scp -->
                  <groupId>org.apache.maven.wagon</groupId>
                  <artifactId>wagon-ssh</artifactId>
                  <version>${turbine.wagon-ssh.version}</version>
                </dependency>
              </dependencies>
            <executions>
              <execution>
                <id>attach-descriptor</id>
                <goals>
                  <goal>attach-descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- ignore doclint errors (should be warnings) for site generation, if using java 8 or above -->
    <!-- Use java 8 compatible version of FindBugs -->
    <profile>
        <id>java8</id>
        <activation>
            <jdk>[1.8,)</jdk>  
        </activation>
        <properties>
          <doclint>none</doclint><!-- since javadoc v.3 this is required instead of -Xdoclint:none -->
        </properties>
    </profile>

  </profiles>

  <properties>

    <!-- Default configuration for compiler source and target JVM -->
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <java.version>1.8</java.version>

    <!-- Compiler and surefire plugin settings for "java" profiles -->
    <turbine.compiler.fork>false</turbine.compiler.fork>
    <turbine.compiler.compilerVersion>1.8</turbine.compiler.compilerVersion>
    <turbine.compiler.javac>${JAVA_HOME}/bin/javac</turbine.compiler.javac>
    <turbine.surefire.java>${JAVA_HOME}/bin/java</turbine.surefire.java>

    <!-- Plugin versions (allows same value in reporting and build sections) -->
    <turbine.compiler.version>3.8.0</turbine.compiler.version>   
    <turbine.surefire.version>3.0.0-M3</turbine.surefire.version>
    <turbine.surefire-report.version>3.0.0-M3</turbine.surefire-report.version>
    <turbine.javadoc.version>3.1.0</turbine.javadoc.version>
    <turbine.rat.version>0.12</turbine.rat.version>
    <turbine.changes.version>2.12.1</turbine.changes.version>   
    <turbine.jxr.version>3.0.0</turbine.jxr.version>
    <turbine.project-info.version>3.0.0</turbine.project-info.version>
    <turbine.wagon-ssh.version>3.3.2</turbine.wagon-ssh.version>
    <turbine.site.version>3.7.1</turbine.site.version>
    <turbine.findbugs.version>3.0.3</turbine.findbugs.version>
    <turbine.jacoco.version>0.8.4</turbine.jacoco.version>
    <!-- may replace local settings -->
    <turbine.log4j2.version>2.12.0</turbine.log4j2.version>
    <turbine.jacoco.skip>true</turbine.jacoco.skip>

    <!--
      Encoding of Java source files: Make sure, that the compiler and
      the javadoc generator use the right encoding. Subprojects may
      overwrite this, if they are using another encoding.
    -->
    <turbine.encoding>UTF-8</turbine.encoding>
    <turbine.docEncoding>${turbine.encoding}</turbine.docEncoding>
    <turbine.resourceEncoding>${turbine.encoding}</turbine.resourceEncoding>

    <!-- Define encoding for filtering -->
    <project.build.sourceEncoding>${turbine.encoding}</project.build.sourceEncoding>
    <project.reporting.outputEncoding>${turbine.encoding}</project.reporting.outputEncoding>

    <!-- Javadoc link to Java API.  Default is Java 1.8; components can override to other versions -->
    <turbine.javadoc.java.link>https://docs.oracle.com/javase/8/docs/api/</turbine.javadoc.java.link>
    <!-- servlet 3.1, websocket, JSR-342  -->
    <turbine.javadoc.javaee.link>https://docs.oracle.com/javaee/7/api/</turbine.javadoc.javaee.link>

    <!-- build meta inf -->
    <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZ</maven.build.timestamp.format>
    <implementation.build>${scmBranch}@r${buildNumber};${maven.build.timestamp}</implementation.build>

    <!-- scm publish plugin configuration -->
    <turbine.site.cache>${user.home}/turbine-sites</turbine.site.cache>
    <!-- value modules can override it -->
    <turbine.site.path>${project.artifactId}</turbine.site.path>

    <turbine.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/turbine/content/${turbine.site.path}</turbine.scmPubUrl>
    <turbine.scmPubCheckoutDirectory>${turbine.site.cache}/${turbine.site.path}</turbine.scmPubCheckoutDirectory>

    <!-- maven-surefire-plugin -->
    <test>**/*Test</test>

  </properties>
</project>