<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    
    <groupId>eu.europa.ec.joinup.sat</groupId>
    <artifactId>demetra-parent</artifactId>
    <version>2.2.0</version>
    <packaging>pom</packaging>
    
    <name>JDemetra+</name>
    <description>Seasonal Adjustment Toolkit</description>
    
    <url>https://github.com/jdemetra/jdemetra-core</url>
    <licenses>
        <license>
            <name>European Union Public Licence (EUPL)</name>
            <url>https://joinup.ec.europa.eu/software/page/eupl/licence-eupl</url>
        </license>
    </licenses>
    
    <repositories>
        <repository>
            <id>netbeans-releases</id>
            <url>http://bits.netbeans.org/nexus/content/groups/netbeans/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>joinup-releases</id>
            <url>https://joinup.ec.europa.eu/nexus/content/repositories/releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>joinup-snapshots</id>
            <url>https://joinup.ec.europa.eu/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    
    <distributionManagement>
        <repository>
            <id>joinup-releases</id>
            <url>https://joinup.ec.europa.eu/nexus/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>joinup-snapshots</id>
            <url>https://joinup.ec.europa.eu/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
  
    <properties>
        <!-- build -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdk.version>1.8</jdk.version>
        <maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
        <maven-source-plugin.version>2.4</maven-source-plugin.version>
        <maven-enforcer-plugin.version>1.4</maven-enforcer-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <findbugs-maven-plugin.version>3.0.0</findbugs-maven-plugin.version>
        <animal-sniffer-maven-plugin.version>1.14</animal-sniffer-maven-plugin.version>
        <!-- dependencies -->
        <junit.version>4.12</junit.version>
        <jsr305.version>3.0.1</jsr305.version>
        <assertj.version>3.6.2</assertj.version>
        <netbeans.version>RELEASE82</netbeans.version>
        <lombok.version>1.16.12</lombok.version>
    </properties>
  
    <modules>
        <!-- core modules -->
        <module>jtstoolkit</module>
        <module>jtss</module>  
        <module>utilities</module>
        <module>demetra-tck</module>
        <module>demetra-workspace</module>
	
        <!-- I/O modules -->
        <module>odbcprovider</module>
        <module>jdbcprovider</module>
        <module>spreadsheetprovider</module>
        <module>sdmxprovider</module>
        <module>commonprovider</module>

        <!-- several apps -->
        <module>jbench</module>
    </modules>
	
    <dependencyManagement>
        <dependencies>
            <!-- dev tools > -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>${jsr305.version}</version>
            </dependency>   
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-util-lookup</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
            </dependency>
            <!-- < dev tools -->
            
            <!-- modules > -->
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-tstoolkit</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-tstoolkit2</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-tss</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-utils</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-odbc</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-jdbc</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-spreadsheet</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-sdmx</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-common</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-workspace</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>eu.europa.ec.joinup.sat</groupId>
                <artifactId>demetra-tck</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <!-- < modules -->
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>            
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>enforce</id>
                            <configuration>
                                <rules>
                                    <DependencyConvergence/>
                                </rules>
                            </configuration>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugs-maven-plugin.version}</version>
                    <configuration>
                        <findbugsXmlOutput>true</findbugsXmlOutput>
                        <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
                        <xmlOutput>true</xmlOutput>
                        <effort>Max</effort>
                        <threshold>Low</threshold>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>${animal-sniffer-maven-plugin.version}</version>
                    <configuration>
                        <signature>
                            <groupId>org.codehaus.mojo.signature</groupId>
                            <artifactId>java18</artifactId>
                            <version>1.0</version>
                        </signature>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-java18</id>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>animal-sniffer-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
  
    <profiles>
        <profile>
            <id>jdemetra-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>            
                </plugins>
            </build>
        </profile>
        <profile>
            <id>travis</id>
            <activation>
                <property>
                    <name>env.TRAVIS</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>            
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
