<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~    Copyright (C) 2019  Consiglio Nazionale delle Ricerche
  ~     This program is free software: you can redistribute it and/or modify
  ~     it under the terms of the GNU Affero General Public License as
  ~     published by the Free Software Foundation, either version 3 of the
  ~     License, or (at your option) any later version.
  ~
  ~     This program 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 Affero General Public License for more details.
  ~
  ~     You should have received a copy of the GNU Affero General Public License
  ~     along with this program.  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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <version>2.1.9.RELEASE</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <parent>
        <artifactId>archetype</artifactId>
        <groupId>it.cnr.si</groupId>
        <version>1.1.0</version>
    </parent>

    <artifactId>cool-jconon-parent</artifactId>
    <version>4.5.21</version>
    <groupId>it.cnr.si.cool.jconon</groupId>
    <name>Concorsi On-Line Parent</name>

    <properties>
        <jms.version>1.1</jms.version>
        <cool.shared.version>3.2.25</cool.shared.version>
        <spring-boot.version>2.1.9.RELEASE</spring-boot.version>
        <spring.version>5.1.6.RELEASE</spring.version>
        <jasperreports.version>6.0.0</jasperreports.version>
        <slf4j.version>1.7.21</slf4j.version>
        <junit.version>5.4.2</junit.version>
        <cool.mode>development</cool.mode>
        <jaxen.version>1.1.4</jaxen.version>
        <hazelcast.version>3.7.2</hazelcast.version>
        <logback.appender>FILE</logback.appender>
        <start-class>it.cnr.si.cool.jconon.CoolJcononApplication</start-class>
        <git.changelog.maven.plugin.version>1.60</git.changelog.maven.plugin.version>
    </properties>

    <packaging>pom</packaging>

    <modules>
        <module>cool-jconon-webapp-resources</module>
        <module>cool-jconon-webapp</module>
        <module>cool-jconon-print</module>
        <module>cool-jconon-io</module>
        <module>cool-jconon-backend</module>
        <module>cool-jconon-utils</module>
        <module>cool-jconon-remote</module>
        <module>cool-jconon-spid</module>
    </modules>
    <profiles>
        <profile>
            <id>changelog</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-scm-plugin</artifactId>
                            <inherited>false</inherited>
                            <configuration>
                                <includes>docs/CHANGELOG.md</includes>
                                <message>Generate CHANGELOG.md [ci skip]</message>
                                <pushChanges>true</pushChanges>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>docs</id>
            <properties>
                <timestamp>${maven.build.timestamp}</timestamp>
                <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
                <scm.plugin.file.list>publiccode.yml,docs/conf.py</scm.plugin.file.list>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.google.code.maven-replacer-plugin</groupId>
                        <artifactId>maven-replacer-plugin</artifactId>
                        <version>1.3.5</version>
                        <executions>
                            <execution>
                                <id>replace version on conf.py</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>replace</goal>
                                </goals>
                                <configuration>
                                    <filesToInclude>docs/conf.py</filesToInclude>
                                    <replacements>
                                        <replacement>
                                            <token>release.*</token>
                                            <value>release = '${project.version}'</value>
                                        </replacement>
                                    </replacements>
                                </configuration>
                            </execution>
                            <execution>
                                <id>replace version on publiccode</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>replace</goal>
                                </goals>
                                <configuration>
                                    <filesToInclude>*publiccode.yml</filesToInclude>
                                    <replacements>
                                        <replacement>
                                            <token>softwareVersion.*</token>
                                            <value>softwareVersion: ${project.version}</value>
                                        </replacement>
                                        <replacement>
                                            <token>releaseDate.*</token>
                                            <value>releaseDate: '${timestamp}'</value>
                                        </replacement>
                                    </replacements>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <licenses>
        <license>
            <name>GNU AFFERO GENERAL PUBLIC LICENSE</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.html</url>
            <comments>
                Copyright (C) 2019 Consiglio Nazionale delle Ricerche

                This program is free software: you can redistribute it and/or modify
                it under the terms of the GNU Affero General Public License as
                published by the Free Software Foundation, either version 3 of the
                License, or (at your option) any later version.

                This program 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 Affero General Public License for more details.

                You should have received a copy of the GNU Affero General Public License
                along with this program. If not, see https://www.gnu.org/licenses/
            </comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>marco.spasiano</id>
            <name>Marco Spasiano</name>
            <email>marco.spasiano@cnr.it</email>
            <organization>Consiglio Nazionale delle Ricerche</organization>
            <organizationUrl>http://www.cnr.it</organizationUrl>
            <roles>
                <role>project lead</role>
                <role>architet</role>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <id>francesco.uliana</id>
            <name>Francesco Uliana</name>
            <email>francesco@uliana.it</email>
            <roles>
                <role>architet</role>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <id>raffaele.pagano</id>
            <name>Raffaele Pagano</name>
            <email>raffaele.pagano@cnr.it</email>
            <organization>Consiglio Nazionale delle Ricerche</organization>
            <organizationUrl>http://www.cnr.it</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>${spring.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
            </plugin>
            <plugin>
                <groupId>se.bjurr.gitchangelog</groupId>
                <artifactId>git-changelog-maven-plugin</artifactId>
                <version>${git.changelog.maven.plugin.version}</version>
                <configuration>
                    <settingsFile>changelog.json</settingsFile>
                    <file>docs/CHANGELOG.md</file>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <scm>
        <connection>scm:git:ssh://git@git.si.cnr.it/documentale/cool-jconon.git</connection>
        <developerConnection>scm:git:ssh://git@git.si.cnr.it/documentale/cool-jconon.git</developerConnection>
        <tag>4.5.21</tag>
    </scm>

</project>
