<?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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>com.facebook.thirdparty</groupId>
    <artifactId>libsvm</artifactId>
    <version>3.18.1</version>

    <name>libsvm</name>
    <description>Presto compatible fork of libsvm</description>
    <url>https://github.com/cberner/libsvm</url>

    <inceptionYear>2014</inceptionYear>

    <licenses>
        <license>
            <name>BSD 3-Clause License</name>
            <url>http://www.csie.ntu.edu.tw/~cjlin/libsvm/COPYRIGHT</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com/cberner/libsvm.git</connection>
        <developerConnection>scm:git:git@github.com:cberner/libsvm.git</developerConnection>
        <url>https://github.com/cberner/libsvm</url>
        <tag>HEAD</tag>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>m4</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>m4</executable>
                    <arguments>
                        <argument>java/libsvm/svm.m4</argument>
                    </arguments>
                    <outputFile>target/generated-sources/libsvm/svm.java</outputFile>
                    <workingDirectory>${project.basedir}</workingDirectory>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.basedir}/java/libsvm</source>
                                <source>${project.basedir}/target/generated-sources/libsvm</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <source>1.7</source>
                    <encoding>UTF-8</encoding>
                    <maxmemory>1G</maxmemory>
                    <additionalparam>-quiet</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>default</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <fail>true</fail>
                    <failFast>false</failFast>
                    <rules>
                        <requireMavenVersion>
                            <version>3.1.1</version>
                        </requireMavenVersion>
                        <requireJavaVersion>
                            <version>1.7</version>
                        </requireJavaVersion>
                    </rules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                            <goal>test-jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
