<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C)  2020. Dynamia Soluciones IT S.A.S - NIT 900302344-1 All Rights Reserved.
  ~ Colombia - South America
  ~
  ~ This file is free software: you can redistribute it and/or modify it  under the terms of the
  ~  GNU Lesser General Public License (LGPL v3) as published by the Free Software Foundation,
  ~   either version 3 of the License, or (at your option) any later version.
  ~
  ~  This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  ~   without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  ~   See the GNU Lesser General Public License for more details. You should have received a copy of the
  ~   GNU Lesser General Public License along with this file.
  ~   If not, see <https://www.gnu.org/licenses/>.
  ~
  -->

<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>

    <packaging>pom</packaging>
    <groupId>tools.dynamia.reports</groupId>
    <artifactId>tools.dynamia.reports.parent</artifactId>
    <version>1.2.0</version>
    <name>DynamiaReports</name>
    <description>DynamiaTools extension for build in app reports with queries and charts</description>
    <inceptionYear>2018</inceptionYear>
    <url>https://www.dynamia.tools/modules/reports</url>

    <organization>
        <name>Dynamia Soluciones IT SAS</name>
        <url>http://www.dynamiasoluciones.com</url>
    </organization>

    <developers>
        <developer>
            <name>Mario Serrano Leones</name>
            <email>mario@dynamiasoluciones.com</email>
            <organization>Dynamia Soluciones IT</organization>
            <organizationUrl>https://www.dynamiasoluciones.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/dynamia-projects/dynamia-reports</url>
    </scm>

    <properties>
        <dynamiatools.version>4.0.0.Final</dynamiatools.version>
        <saas.version>2.5.0</saas.version>
        <java.version>11</java.version>
        <groovy.version>3.0.7</groovy.version>
        <groovy.compiler>1.12.1</groovy.compiler>
        <maven.compiler>3.8.1</maven.compiler>
        <source.encoding>UTF-8</source.encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <licenses>
        <license>
            <name>GNU Lesser General Public License (LGPL v3)</name>
            <url>https://www.gnu.org/licenses/lgpl-3.0.en.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>api</module>
        <module>core</module>
        <module>ui</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>${groovy.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${source.encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>${groovy.compiler}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                            <goal>compile</goal>
                            <goal>compileTests</goal>
                            <goal>groovydoc-jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <invokeDynamic>true</invokeDynamic>
                    <docTitle>Dynamia Reports</docTitle>
                    <windowTitle>Dynamia Reports</windowTitle>
                    <footer>Powered By DynamiaTools</footer>
                    <includeClasspath>PROJECT_AND_PLUGIN</includeClasspath>
                    <classifier>javadoc</classifier>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${groovy.version}</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </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>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.20</version>
                <configuration>
                    <verbose>false</verbose>
                    <licenseName>lgpl_v3</licenseName>
                    <roots>
                        <root>src/main/java</root>
                        <root>src/main/groovy</root>
                        <root>src/test</root>
                    </roots>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <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>

    <profiles>
        <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.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


</project>
