<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2013-2015 Vasilis Vryniotis <bbriniotis@datumbox.com>

    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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.datumbox</groupId>
    <artifactId>datumbox-framework</artifactId>
    <version>0.6.0</version>
    
    <name>Datumbox Machine Learning Framework</name>
    <description>Datumbox is an open-source Machine Learning Framework written in Java which allows the rapid development of Machine Learning and Statistical applications.</description>
    <url>https://github.com/datumbox/datumbox-framework/</url>
    <organization>
    	<name>Datumbox</name>
    	<url>http://www.datumbox.com/</url>
    </organization>
    <inceptionYear>2013</inceptionYear>
    
    <developers>
        <developer>
            <id>bbriniotis</id>
            <name>Vasilis Vryniotis</name>
            <email>bbriniotis@datumbox.com</email>
            <url>http://blog.datumbox.com/author/bbriniotis/</url>
            <roles>
                <role>Project Lead Developer</role>
            </roles>
        </developer>
    </developers>
    
    <contributors>
        <contributor>
            <name>Eleftherios Bampaletakis</name>
            <email>lmpampaletakis@gmail.com</email>
            <url>http://gr.linkedin.com/pub/eleftherios-bampaletakis/39/875/551</url>
            <roles>
                <role>Java Consultant</role>
            </roles>
        </contributor>
    </contributors>
    
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    
    <issueManagement>
        <url>https://github.com/datumbox/datumbox-framework/issues/</url>
        <system>GitHub Issues</system>
    </issueManagement>
    
    <scm>
        <connection>scm:git:git@github.com:datumbox/datumbox-framework.git</connection>
        <url>scm:git:git@github.com:datumbox/datumbox-framework.git</url>
        <developerConnection>scm:git:git@github.com:datumbox/datumbox-framework.git</developerConnection>
    </scm>
    
    <properties>
        <!-- Build Plugins -->
        <java-version>1.8</java-version>
        <maven-compiler-plugin-version>3.3</maven-compiler-plugin-version>
        <maven-javadoc-plugin-version>2.10.3</maven-javadoc-plugin-version>
        <maven-source-plugin-version>2.4</maven-source-plugin-version>
        <maven-surfire-plugin-version>2.18.1</maven-surfire-plugin-version>
        <maven-jar-plugin-version>2.6</maven-jar-plugin-version>
        <gmaven-plugin-version>1.5</gmaven-plugin-version>
        <license-maven-plugin-version>2.10</license-maven-plugin-version>
        <gpg-plugin-version>1.6</gpg-plugin-version>
        
        <!-- Code Dependencies -->
        <commons-lang-version>3.4</commons-lang-version>
        <commons-math-version>3.5</commons-math-version>
        <commons-csv-version>1.1</commons-csv-version>
        <slf4j-api-version>1.7.12</slf4j-api-version>
        <libsvm-version>3.18.1</libsvm-version>
        <lpsolve-version>5.5.2.0</lpsolve-version>
        <mapdb-version>1.0.7</mapdb-version>
        
        <!-- Test Dependencies -->
        <junit-version>4.12</junit-version>
        <cpsuite-version>1.2.7</cpsuite-version>
        <logback-classic-version>1.1.3</logback-classic-version>
        
        <!-- Configuration -->
        <gpg.keyname>7083A486</gpg.keyname>
        <buildNumber>${maven.build.timestamp}</buildNumber>
        <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>
    
    <build>
        <resources>
           <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>license.txt</exclude>
                </excludes>  
           </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin-version}</version>
                <configuration>
                    <source>${java-version}</source>
                    <target>${java-version}</target>
                    <showDeprecation>true</showDeprecation>
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <!--
                        <arg>-verbose</arg>
                        <arg>-Xlint:all,-options,-path</arg>
                        -->
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin-version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin-version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surfire-plugin-version}</version>
                <configuration>
                    <threadCount>3</threadCount>
                    <parallel>classes</parallel>
                    <argLine>-Xmx512M</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin-version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <archive>                   
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.datumbox.Datumbox</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Author>${project.developers[0].name}</Implementation-Author>
                            <Implementation-Build>${buildNumber}</Implementation-Build>
                            <Implementation-Website>${project.organization.url}</Implementation-Website>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>${gmaven-plugin-version}</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>
                                import java.util.Date
                                import java.text.MessageFormat
                                def vartimestamp = MessageFormat.format("{0,date,yyyy}", new Date())
                                project.properties['currentYear'] = vartimestamp
                            </source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-maven-plugin-version}</version>
                <configuration>
                    <header>src/main/resources/license.txt</header>
                    <properties>
                        <copyrightYears>${project.inceptionYear}-${currentYear}</copyrightYears>
                        <copyrightOwner>${project.developers[0].name}</copyrightOwner>
                        <copyrightEmail>${project.developers[0].email}</copyrightEmail>
                    </properties>
                    <excludes>
                        <exclude>CHANGELOG.md</exclude>
                        <exclude>LICENSE</exclude>
                        <exclude>NOTICE</exclude>
                        <exclude>README.md</exclude>
                        <exclude>TODO.txt</exclude>
                        <exclude>src/main/resources/license.txt</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>${commons-math-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>${commons-csv-version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-api-version}</version>
        </dependency>
        <dependency>
            <groupId>com.facebook.thirdparty</groupId>
            <artifactId>libsvm</artifactId>
            <version>${libsvm-version}</version>
        </dependency>
        <dependency>
            <groupId>com.datumbox</groupId>
            <artifactId>lpsolve</artifactId>
            <version>${lpsolve-version}</version>
        </dependency>
        <dependency>
            <groupId>org.mapdb</groupId>
            <artifactId>mapdb</artifactId>
            <version>${mapdb-version}</version>
        </dependency>
        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.takari.junit</groupId>
            <artifactId>takari-cpsuite</artifactId>
            <version>${cpsuite-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback-classic-version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <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>${gpg-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
