<?xml version="1.0" encoding="UTF-8"?>
<!--

    @formatter:off
    Copyright © 2009 admin (admin@infrastructurebuilder.org)

    Licensed 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.
    @formatter:on

-->
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.infrastructurebuilder</groupId>
    <artifactId>ibparent</artifactId>
    <version>90</version>
  </parent>

  <!-- Build description -->
  <!-- <groupId>com.googlecode.maven-download-plugin</groupId> -->
  <groupId>org.infrastructurebuilder.usurped</groupId>
  <artifactId>download-maven-plugin</artifactId>
  <version>1.7.1.2</version>
  <packaging>maven-plugin</packaging>

  <name>Download Plugin for Maven</name>
  <!-- Miscellaneous build properties (SCM, license, issues, etc) -->
  <description>This was usurped by IB.  Follows is the original stuff::


    This is a plugin meant to help maven user to download
        different files on different protocol in part of maven build. For the
        first implementation, there will only be a goal that will help
        downloading a maven artifact from the command line. Future version of
        the plugin could include web download, ftp download, scp download and
        so on.
    </description>
  <url>https://github.com/maven-download-plugin/maven-download-plugin</url>
  <inceptionYear>2009</inceptionYear>
  <organization>
    <name>Open-Source</name>
    <url>https://github.com/maven-download-plugin/maven-download-plugin</url>
  </organization>

  <developers>
    <developer>
      <id>mhoule</id>
      <name>Marc-Andre Houle</name>
      <timezone>-4</timezone>
      <roles>
        <role>developer</role>
        <role>lead</role>
      </roles>
    </developer>
    <developer>
      <id>mistria</id>
      <name>Mickael Istria (Red Hat Inc.)</name>
      <organization>JBoss, by Red Hat</organization>
      <organizationUrl>http://www.jboss.org/tools</organizationUrl>
      <timezone>+1</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <!-- Maven 3.2.5 or later is required due to the dependency on Plexus/Sisu -->
  <prerequisites>
    <maven>${maven.version}</maven>
  </prerequisites>

  <scm>
    <connection>scm:git:${git.url}</connection>
    <developerConnection>scm:git:${git.url}</developerConnection>
    <url>scm:git:${git.url}</url>
    <tag>download-maven-plugin-1.7.1.2</tag>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/${team.group.id}/${project.artifactId}/issues/</url>
  </issueManagement>
  <ciManagement>
    <system>Travis-CI</system>
    <url>https://travis-ci.org/${team.group.id}/${project.artifactId}</url>
  </ciManagement>
  <distributionManagement>
    <site>
      <id>internal</id>
      <name>Internal Server</name>
      <url>${target.site.url}</url>
    </site>
  </distributionManagement>

  <properties>
    <test.coverage.percentage.required>43</test.coverage.percentage.required>
    <jacoco.max.missed.classes>5</jacoco.max.missed.classes>
    <scmpublish.content>target/staging/${project.artifactId}</scmpublish.content>
    <gpg.signing.profiles>release,IBgpgsigning</gpg.signing.profiles>
    <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
    <httpclient.version>4.5.14</httpclient.version>
    <team.group.id>infrastructurebuilder</team.group.id>
    <git.http.url>${git.scm.url}.git</git.http.url>
    <git.source.host>github.com</git.source.host>
    <git.scm.url>https://${git.source.host}/${team.group.id}/${project.artifactId}</git.scm.url>
    <git.url>git@${git.source.host}:${team.group.id}/${project.artifactId}.git</git.url>
    <issue.management.url>https://${git.source.host}/${team.group.id}/${project.artifactId}/issues</issue.management.url>
    <ci.url>https://ci.infrastructurebuilder.com</ci.url>
    <maven.compiler.jdk.version>11</maven.compiler.jdk.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-shared-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient-cache</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-provider-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-sec-dispatcher</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-build-api</artifactId>
      <version>0.0.7</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-inline</artifactId>
      <version>4.11.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.tomakehurst</groupId>
      <artifactId>wiremock-jre8-standalone</artifactId>
      <version>2.35.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings
          only. It has no influence on the Maven build itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      org.apache.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-plugin-plugin
                    </artifactId>
                    <versionRange>
                      [3.6.0,)
                    </versionRange>
                    <goals>
                      <goal>descriptor</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <excludes>
              <exclude>**/*.md</exclude>
              <exclude>**/LICENSE</exclude>
              <exclude>**/.*</exclude>
              <exclude>**/*.txt</exclude>
              <exclude>src/**</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <phase>process-classes</phase>
          </execution>
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
        <plugin>
          <groupId>net.revelc.code.formatter</groupId>
          <artifactId>formatter-maven-plugin</artifactId>
          <configuration>
      <excludes>
        <exclude>com/googlecode/</exclude>
      </excludes>
          </configuration>
        </plugin>
    </plugins>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>3.5.3</version>
      </extension>
    </extensions>
  </build>

  <profiles>
    <profile>
      <!-- Handy for starting a mrm copy for debugging purposes -->
      <id>debug-mrm</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>mrm-maven-plugin</artifactId>
            <version>1.5.0</version>
            <executions>
              <execution>
                <goals>
                  <goal>run</goal>
                </goals>
                <phase>validate</phase>
              </execution>
            </executions>
            <configuration>
              <repositories>
                <mockRepo>
                  <source>${project.basedir}/src/it-repo</source>
                </mockRepo>
                <localRepo>
                  <source>${project.build.directory}/local-repo</source>
                </localRepo>
                <proxyRepo />
              </repositories>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>mrm-maven-plugin</artifactId>
            <version>1.5.0</version>
            <executions>
              <execution>
                <goals>
                  <goal>start</goal>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <repositories>
                <mockRepo>
                  <source>${project.basedir}/src/it-repo</source>
                </mockRepo>
                <localRepo>
                  <source>${project.build.directory}/local-repo</source>
                </localRepo>
                <proxyRepo />
              </repositories>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>3.5.1</version>
            <executions>
              <execution>
                <phase>integration-test</phase>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <projectsDirectory>${project.basedir}/src/it</projectsDirectory>
                  <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                  <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                  <invokerPropertiesFile>invoke.properties</invokerPropertiesFile>
                  <preBuildHookScript>prepare.groovy</preBuildHookScript>
                  <postBuildHookScript>verify</postBuildHookScript>
                  <parallelThreads>1C</parallelThreads>
                  <debug>true</debug>
                  <settingsFile>${project.basedir}/src/it/settings.xml</settingsFile>
                  <filterProperties>
                    <mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
                  </filterProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
