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

  <groupId>com.github.matinh.vdldoc</groupId>
  <artifactId>vdldoc-maven-plugin</artifactId>
  <version>2.0</version>
  <packaging>maven-plugin</packaging>

  <name>Vdldoc Maven Plugin</name>
  <description>
    The Vdldoc Plugin uses Vdldoc to generate Documentation for Facelet tags
    and JSF (composite) components.
  </description>

  <url>http://matinh.github.io/vdldoc-maven-plugin</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <inceptionYear>2016</inceptionYear>

  <scm>
    <connection>scm:git:git@github.com:matinh/vdldoc-maven-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:matinh/vdldoc-maven-plugin.git</developerConnection>
    <url>https://github.com/matinh/vdldoc-maven-plugin</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/matinh/vdldoc-maven-plugin/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <id>matinh</id>
      <name>Martin Höller</name>
      <email>martin.hoeller@xss.co.at</email>
      <url>https://github.com/matinh</url>
      <timezone>+1</timezone>
      <roles>
        <role>Lead Developer</role>
      </roles>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>Maven User List</name>
      <subscribe>users-subscribe@maven.apache.org</subscribe>
      <unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
      <post>users@maven.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
      <otherArchives>
        <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
        <otherArchive>http://maven.40175.n5.nabble.com/Maven-Users-f40176.html</otherArchive>
        <otherArchive>http://maven-users.markmail.org/</otherArchive>
      </otherArchives>
    </mailingList>
  </mailingLists>

  <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>
      <!-- This is actually not used, as we use github's site-maven-plugin (see below). -->
      <name>GitHub Pages</name>
      <id>github</id>
      <url>https://matinh.github.io/vdldoc-maven-plugin/</url>
    </site>
  </distributionManagement>

  <prerequisites>
    <maven>3.3.5</maven>
  </prerequisites>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>


  <!-- =============== project dependencies  =========================== -->

  <dependencies>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>3.6.3</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>3.0</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.6.0</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.3.0</version>
    </dependency>

    <dependency>
      <groupId>org.omnifaces</groupId>
      <artifactId>vdldoc</artifactId>
      <version>3.0</version>
    </dependency>

    <!-- test-scoped dependencies -->

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>4.2</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <pluginManagement>
      <plugins>

        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.22.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>

        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>

        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.9</version>
        </plugin>

        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
          <configuration>
            <excludes>**/HelpMojo.java</excludes>
            <configLocation>sun_checks.xml</configLocation>
            <consoleOutput>true</consoleOutput>
            <!--<violationSeverity>warning</violationSeverity>-->
            <violationIgnore>
              LeftCurly,
              DesignForExtension,
              JavadocPackage,
              JavadocMethod,
              AvoidInlineConditionals
            </violationIgnore>
          </configuration>
          <executions>
            <execution>
              <id>verify-style</id>
              <phase>process-classes</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.13.0</version>
          <configuration>
            <printFailingErrors>true</printFailingErrors>
            <excludeRoots>target</excludeRoots>
            <skipEmptyReport>false</skipEmptyReport>
          </configuration>
          <executions>
            <execution>
              <id>pmd</id>
              <configuration>
                <!--<excludeFromFailureFile>src/main/pmd/excludes-pmd.properties</excludeFromFailureFile>-->
              </configuration>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
            <execution>
              <id>cpd</id>
              <!--<configuration>-->
              <!--<excludeFromFailureFile>src/main/pmd/excludes-cpd.properties</excludeFromFailureFile>-->
              <!--</configuration>-->
              <goals>
                <goal>cpd-check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.5</version>
          <configuration>
            <xmlOutput>true</xmlOutput>
            <xmlOutputDirectory>${project.build.directory}/findbugs</xmlOutputDirectory>
            <!--<excludeFilterFile>src/main/findbugs/excludes.xml</excludeFilterFile>-->
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.7</version>
          <configuration>
            <instrumentation>
              <excludes>
                <exclude>**/HelpMojo.class</exclude>
              </excludes>
            </instrumentation>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
          <goalPrefix>vdldoc</goalPrefix>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </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>
        <!-- we deploy our site to github-pages -->
        <groupId>com.github.github</groupId>
        <artifactId>site-maven-plugin</artifactId>
        <version>0.12</version>
        <configuration>
          <server>github</server>
          <message>deploying new site via maven build</message>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>site</goal>
            </goals>
            <phase>site-deploy</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <!-- skip the default maven-site-plugin execution, as github's
             site-maven-plugin handles site deployment -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
        <configuration>
          <skipDeploy>true</skipDeploy>
        </configuration>
      </plugin>

    </plugins>

  </build>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.4</version>
      </plugin>

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

    </plugins>
  </reporting>

  <profiles>

    <!-- =============== profile for code quality checks =============== -->

    <profile>
      <id>quality-checks</id>
      <activation>
        <property>
          <name>quality-checks</name>
          <value>true</value>
        </property>
      </activation>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-checkstyle-plugin</artifactId>
          </plugin>

          <plugin>
            <artifactId>maven-pmd-plugin</artifactId>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>


    <!-- =============== profile for enhanced reporting =============== -->

    <profile>
      <id>reporting</id>
      <reporting>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.3</version>
            <reportSets>
              <reportSet>
                <id>aggregate</id>
                <reports>
                  <report>javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
          </plugin>

          <plugin>
            <artifactId>maven-jxr-plugin</artifactId>
            <version>3.0.0</version>
            <reportSets>
              <reportSet>
                <id>aggregate</id>
                <reports>
                  <report>aggregate</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

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

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.7</version>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>l10n-maven-plugin</artifactId>
            <version>1.0-alpha-2</version>
            <configuration>
              <locales>
                <locale>de</locale>
                <locale>en</locale>
              </locales>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <reportSets>
              <reportSet>
                <id>default</id>
                <reports>
                  <report>checkstyle</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
          </plugin>

        </plugins>
      </reporting>
    </profile>


    <!-- =============== profile for running integration-tests ========== -->

    <profile>
      <id>run-its</id>
      <build>

        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>3.2.1</version>
            <configuration>
              <debug>true</debug>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <goals>clean site</goals>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>

      </build>
    </profile>


    <!-- =============== profile for release of new version ============= -->

    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.3</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <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>
</project>
