<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>it.fabioformosa</groupId>
  <artifactId>metamorphosis-parent</artifactId>
  <packaging>pom</packaging>

  <version>3.0.0</version>

  <name>metamorphosis</name>
  <description>Metamorphosis helps you convert entities from/to DTOs . "Nothing is lost, nothing is created, everything is transformed." - Lavoisier</description>

  <url>https://github.com/fabioformosa/j-metamorphosis</url>
  
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://github.com/fabioformosa/j-metamorphosis/blob/master/LICENSE</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git://github.com/fabioformosa/j-metamorphosis.git</connection>
    <developerConnection>scm:git:git@github.com:fabioformosa/j-metamorphosis.git</developerConnection>
    <url>https://github.com/fabioformosa/j-metamorphosis</url>
    <tag>metamorphosis-parent-3.0.0</tag>
  </scm>

  <developers>
    <developer>
      <name>Fabio Formosa</name>
      <url>https://github.com/fabioformosa</url>
    </developer>
  </developers>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <spring.version>5.1.2.RELEASE</spring.version>
  </properties>
  
  
  <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>
  </distributionManagement>
    
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <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>
          <preparationGoals>clean</preparationGoals>
<!--           <releaseProfiles>resources</releaseProfiles> -->
          <localCheckout>true</localCheckout>
          <pushChanges>false</pushChanges>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
        </configuration>
        <dependencies>
          <dependency>
          <groupId>org.apache.maven.scm</groupId>
          <artifactId>maven-scm-provider-gitexe</artifactId>
          <version>1.9.5</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.7</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-javadoc-plugin</artifactId>
          <version>3.0.1</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                    <doclint>none</doclint>
                </configuration>
            </execution>
          </executions>
        </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
    
      <!-- CORE -->
        <dependency>
          <groupId>it.fabioformosa</groupId>
          <artifactId>metamorphosis-core</artifactId>
          <version>${project.version}</version>
        </dependency>
        <dependency>
          <groupId>it.fabioformosa</groupId>
          <artifactId>metamorphosis-test</artifactId>
          <version>${project.version}</version>
        </dependency>
        
      <!-- SPRING -->
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-core</artifactId>
          <version>${spring.version}</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-context</artifactId>
          <version>${spring.version}</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-test</artifactId>
          <version>${spring.version}</version>
          <scope>test</scope>
        </dependency>
    <!-- Misc -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.8</version>
      </dependency>
      <dependency>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
          <version>1.2.3</version>
      </dependency>
      
    <!-- TEST -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>2.19.0</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
    
  </dependencyManagement>
  
  <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>
  
  <modules>
    <module>metamorphosis-core</module>
    <module>metamorphosis-jpa</module>
    <module>metamorphosis-test</module>
  </modules>
  
</project>