<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright © 2019 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. -->
<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.maven</groupId>
    <artifactId>ibversions-maven-plugin-root</artifactId>
    <version>0.21.0</version>
  </parent>

  <artifactId>ibversions-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>

  <name>${project.artifactId}</name>
  <description>Produce a source artifact that describes the executing artifact</description>
  <url>https://github.com/infrastructurebuilder/${project.artifactId}</url>
  <inceptionYear>2019</inceptionYear>

  <properties>
    <test.coverage.percentage.required>77</test.coverage.percentage.required>
    <jacoco.max.missed.classes>1</jacoco.max.missed.classes>

  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.infrastructurebuilder</groupId>
        <artifactId>maven-import-bom</artifactId>
        <version>${maven.import.bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>ibversions-maven-component</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-settings</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.shared</groupId>
      <artifactId>maven-filtering</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-interpolation</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-shared-utils</artifactId>
      <scope>compile</scope>
    </dependency>
		<dependency>
			<groupId>org.infrastructurebuilder</groupId>
			<artifactId>ibexceptions</artifactId>
			<version>${ibexceptions.version}</version>
		</dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <filtering>false</filtering>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-gpg-plugin</artifactId>-->
<!--          <version>3.1.0</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-clean-plugin</artifactId>-->
<!--          <version>3.3.1</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-javadoc-plugin</artifactId>-->
<!--          <version>3.6.0</version>-->
<!--          <configuration>-->
<!--            <additionalparam>-Xdoclint:none</additionalparam>-->
<!--          </configuration>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-source-plugin</artifactId>-->
<!--          <version>3.3.0</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-invoker-plugin</artifactId>-->
<!--          <version>3.6.0</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-compiler-plugin</artifactId>-->
<!--          <version>3.11.0</version>-->
<!--          <configuration>-->
<!--            <release>${compilerVersion}</release>-->
<!--          </configuration>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-plugin-plugin</artifactId>-->
<!--          <version>3.9.0</version>-->
<!--          <configuration>-->
<!--            <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>-->
<!--          <artifactId>maven-surefire-plugin</artifactId>-->
<!--          <version>${test.plugin.version}</version>-->
<!--          <configuration>-->
<!--            <forkCount>0</forkCount>-->
<!--            <argLine>${surefireArgLine}</argLine>-->
<!--            <failIfNoTests>${surefire.failIfNoTests}</failIfNoTests>-->
<!--             - -illegal-access=permit</failIfNoTests> -->
<!--            <trimStackTrace>false</trimStackTrace>-->
<!--            <systemPropertyVariables>-->
<!--              <target_dir>${project.build.directory}</target_dir>-->
<!--            </systemPropertyVariables>-->
<!--          </configuration>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <artifactId>maven-failsafe-plugin</artifactId>-->
<!--          <version>${test.plugin.version}</version>-->
<!--          <configuration>-->
<!--            <forkCount>0</forkCount>-->
<!--            <argLine>${failsafeArgLine}</argLine>-->
<!--             - -illegal-access=permit</argLine> -->
<!--            <trimStackTrace>false</trimStackTrace>-->
<!--            <systemPropertyVariables>-->
<!--            </systemPropertyVariables>-->
<!--          </configuration>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.jacoco</groupId>-->
<!--          <artifactId>jacoco-maven-plugin</artifactId>-->
<!--          <version>${jacoco.version}</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.sonatype.plugins</groupId>-->
<!--          <artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--          <version>1.6.13</version>-->
<!--          <configuration>-->
<!--            <serverId>ossrh</serverId>-->
<!--            <nexusUrl>https://oss.sonatype.org/</nexusUrl>-->
<!--            <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
<!--          </configuration>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-release-plugin</artifactId>-->
<!--          <version>3.0.1</version>-->
<!--          <configuration>-->
<!--            <autoVersionSubmodules>true</autoVersionSubmodules>-->
<!--            <useReleaseProfile>false</useReleaseProfile>-->
<!--            <releaseProfiles>${gpg.signing.profiles}</releaseProfiles>-->
<!--            <goals>deploy</goals>-->
<!--          </configuration>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-deploy-plugin</artifactId>-->
<!--          <version>3.1.1</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-install-plugin</artifactId>-->
<!--          <version>3.1.1</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-jar-plugin</artifactId>-->
<!--          <version>3.3.0</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-resources-plugin</artifactId>-->
<!--          <version>3.3.1</version>-->
<!--        </plugin>-->
<!--        <plugin>-->
<!--          <groupId>org.apache.maven.plugins</groupId>-->
<!--          <artifactId>maven-site-plugin</artifactId>-->
<!--          <version>3.8.2</version>-->
<!--        </plugin>-->

      </plugins>
    </pluginManagement>
    <plugins>
<!--      <plugin>-->
<!--        <groupId>org.codehaus.plexus</groupId>-->
<!--        <artifactId>plexus-component-metadata</artifactId>-->
<!--        <version>2.1.1</version>-->
<!--        <executions>-->
<!--          <execution>-->
<!--            <id>process-classes</id>-->
<!--            <phase>process-classes</phase>-->
<!--            <goals>-->
<!--              <goal>generate-metadata</goal>-->
<!--            </goals>-->
<!--          </execution>-->
<!--        </executions>-->
<!--      </plugin>-->


      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <source>${compilerVersion}</source>
          <nohelp>true</nohelp>
        </configuration>
      </plugin>
    </plugins>
  </build>

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

    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>run-its</id>
      <activation>
        <property>
          <name>skipTests</name>
          <value>!true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <skipInvocation>false</skipInvocation>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <cloneClean>true</cloneClean>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <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>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
            <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>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
